Version fonctionnelle du débogueur
This commit is contained in:
parent
1a01a1dd9c
commit
f3cd0b116d
@ -13,6 +13,14 @@ Cette commande :
|
||||
- y copie le fichier init.lua
|
||||
- copie le fichier ~/.local/bin/install-neovim.sh
|
||||
|
||||
## Rust
|
||||
```bash
|
||||
✔ ~> rustup component add rust-analyzer
|
||||
info: downloading component 'rust-analyzer'
|
||||
info: installing component 'rust-analyzer'
|
||||
✔ ~> rust-analyzer --version
|
||||
rust-analyzer 1.73.0 (cc66ad4 2023-10-03)
|
||||
```
|
||||
# Cheatsheet
|
||||
|
||||
## Spell
|
||||
|
74
init.lua
74
init.lua
@ -72,7 +72,7 @@ require('packer').startup(function(use)
|
||||
use {
|
||||
'rcarriga/nvim-dap-ui',-- Debug Adapter UI
|
||||
requires = {
|
||||
{'mfussenegger/nvim-dap', 'nvim-neotest/nvim-nio'},-- Debug Adapter Protocol
|
||||
{'mfussenegger/nvim-dap', 'nvim-neotest/nvim-nio', 'theHamsta/nvim-dap-virtual-text'},-- Debug Adapter Protocol
|
||||
}
|
||||
}
|
||||
-- use 'puremourning/vimspector'
|
||||
@ -261,15 +261,13 @@ require('mason-lspconfig').setup({
|
||||
ensure_installed = {
|
||||
'html',
|
||||
'cssls',
|
||||
'rust_analyzer',
|
||||
'lua_ls',
|
||||
'marksman',
|
||||
'sqlls',
|
||||
'jinja_lsp'
|
||||
},
|
||||
-- handlers = {
|
||||
-- lsp.default_setup,
|
||||
-- },
|
||||
-- 'rust_analyzer',
|
||||
-- non compatible avec rustaceanvim : https://github.com/mrcjkb/rustaceanvim/blob/master/doc/mason.txt
|
||||
})
|
||||
|
||||
require('lspconfig').marksman.setup({})
|
||||
@ -542,21 +540,6 @@ require("noice").setup({
|
||||
|
||||
vim.o.autoread = true
|
||||
vim.g.indentLine_conceallevel = 0 -- pose trop de problème avec le markdown et le json
|
||||
-- vim.keymap.set("n", "<Leader>rb", ':call vimspector#ToggleBreakpoint()<cr>', { buffer = bufnr })
|
||||
-- vim.keymap.set("n", "<Leader>rl", ':call vimspector#Launch()<cr>', { buffer = bufnr })
|
||||
-- vim.api.nvim_create_autocmd("FileType", {
|
||||
-- pattern = { "sql", "mysql", "plsql" },
|
||||
-- callback = function()
|
||||
-- cmp.setup.buffer({
|
||||
-- sources = {
|
||||
-- { name = "vim-dadbod-completion" },
|
||||
-- { name = "buffer" },
|
||||
-- { name = "luasnip" },
|
||||
-- },
|
||||
-- })
|
||||
-- end,
|
||||
-- group = autocomplete_group,
|
||||
-- })
|
||||
|
||||
vim.filetype.add({
|
||||
pattern = { [".*/hypr/.*%.conf"] = "hyprlang" },
|
||||
@ -565,43 +548,40 @@ vim.filetype.add({
|
||||
require'colorizer'.setup()
|
||||
require("nvim-autopairs").setup {} -- ne semble pas pouvoir être intégré dans le use
|
||||
|
||||
-- inlay hints to remove with version 10 of neovim
|
||||
-- require("lsp-inlayhints").setup()
|
||||
-- vim.api.nvim_create_augroup("LspAttach_inlayhints", {})
|
||||
-- vim.api.nvim_create_autocmd("LspAttach", {
|
||||
-- group = "LspAttach_inlayhints",
|
||||
-- callback = function(args)
|
||||
-- if not (args.data and args.data.client_id) then
|
||||
-- return
|
||||
-- end
|
||||
|
||||
-- local bufnr = args.buf
|
||||
-- local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||
-- require("lsp-inlayhints").on_attach(client, bufnr)
|
||||
-- end,
|
||||
-- })
|
||||
------------------------------------------------
|
||||
--
|
||||
--
|
||||
-- local dap = require("dap")
|
||||
|
||||
-- dap.adapters.lldb = {
|
||||
-- type = "executable",
|
||||
-- -- command = "/usr/bin/lldb-vscode", -- adjust as needed
|
||||
-- command = "$HOME/.cargo/bin/rust-lldb", -- adjust as needed
|
||||
-- name = "lldb",
|
||||
-- }
|
||||
--
|
||||
local dap, dapui = require("dap"), require("dapui")
|
||||
dapui.setup()
|
||||
require("nvim-dap-virtual-text").setup()
|
||||
|
||||
dap.adapters.rustlldb = {
|
||||
type = "executable",
|
||||
-- command = "/usr/bin/lldb-vscode", -- adjust as needed
|
||||
command = vim.fn.expand('~').."/.cargo/bin/rust-lldb", -- adjust as needed
|
||||
name = "rustlldb",
|
||||
}
|
||||
|
||||
dap.listeners.before.attach.dapui_config = function()
|
||||
dapui.open()
|
||||
vim.opt.mouse = 'n'
|
||||
end
|
||||
dap.listeners.before.launch.dapui_config = function()
|
||||
dapui.open()
|
||||
vim.opt.mouse = 'n'
|
||||
end
|
||||
dap.listeners.before.event_terminated.dapui_config = function()
|
||||
dapui.close()
|
||||
vim.opt.mouse = ''
|
||||
end
|
||||
dap.listeners.before.event_exited.dapui_config = function()
|
||||
dapui.close()
|
||||
vim.opt.mouse = ''
|
||||
end
|
||||
|
||||
vim.keymap.set('n', '<F5>', require 'dap'.continue)
|
||||
vim.keymap.set('n', '<F6>', require 'dap'.step_over)
|
||||
vim.keymap.set('n', '<F7>', require 'dap'.step_into)
|
||||
vim.keymap.set('n', '<F8>', require 'dap'.step_out)
|
||||
vim.keymap.set('n', '<leader>b', require 'dap'.toggle_breakpoint)
|
||||
vim.keymap.set('n', '<leader>e', require 'dapui'.eval)
|
||||
|
||||
vim.fn.sign_define('DapBreakpoint',{ text ='🟥', texthl ='', linehl ='', numhl =''})
|
||||
vim.fn.sign_define('DapStopped',{ text ='▶️', texthl ='', linehl ='', numhl =''})
|
||||
|
Reference in New Issue
Block a user