feat: configure nvim-dapp for c++/c/rust
This commit is contained in:
parent
850f3e7fc0
commit
18fc525867
3 changed files with 8 additions and 1 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
/nvim/plugins/*
|
||||||
|
|
@ -23,7 +23,7 @@ dap.configurations.cpp = {
|
||||||
program = function()
|
program = function()
|
||||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/build/', 'file')
|
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/build/', 'file')
|
||||||
end,
|
end,
|
||||||
args = '[--gui]',
|
args = {'--gui'},
|
||||||
cwd = '${workspaceFolder}',
|
cwd = '${workspaceFolder}',
|
||||||
stopAtEntry = true,
|
stopAtEntry = true,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -7,3 +7,9 @@ local keymap = vim.api.nvim_set_keymap
|
||||||
|
|
||||||
|
|
||||||
keymap("n", "c" ,":CodeActionMenu<CR>" , opts)
|
keymap("n", "c" ,":CodeActionMenu<CR>" , opts)
|
||||||
|
keymap("n", "<F5>" , ':lua require("dap").toggle_breakpoint()<CR>', opts)
|
||||||
|
keymap("n", "<F6>" , ':lua require("dap").step_over()<CR>', opts)
|
||||||
|
keymap("n", "<F7>" , ':lua require("dap").step_into()<CR>', opts)
|
||||||
|
keymap("n", "<F8>" , ':lua require("dap").continue()<CR>', opts)
|
||||||
|
keymap("n", "<F9>" , ':lua require("dap").close()<CR> :lua require("dapui").toggle()<CR>', opts)
|
||||||
|
keymap("n", "<F10>" , ':lua require("dap").continue()<CR> :lua require("dapui").toggle()<CR>', opts)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue