Improvments to dap, lsp-cmp and trouble
- dap ui listeners - LSPkind for symbols in suggestions' - improving vim lua lsp support - complete options added ( Preview ) - fixed annoying C-d not working ( had overwritten it for code actions) - Added shortcut , s t to open a terminal at the bottom - Added a keymap to exit terminal mode (thnx teejdev) - set inccommand to split ( shows actions that will be taken in a split window) - fixed trouble suggestions toggle (C-t)
This commit is contained in:
@@ -21,16 +21,27 @@ vim.keymap.set('i', '<A-j>', ':m .+1<CR>==gi', {noremap = true})
|
||||
vim.keymap.set('i', '<A-k>', ':m .-2<CR>==gi', {noremap = true})
|
||||
|
||||
-- Diagnostics !
|
||||
vim.keymap.set('n', '<C-T>', function() require('trouble').toggle() end )
|
||||
vim.keymap.set('n', '<C-T>', function() require('trouble').toggle('diagnostics') end )
|
||||
vim.keymap.set('n', '<leader>d', function () vim.diagnostic.open_float() end )
|
||||
vim.keymap.set('n', '<leader>dn', function () vim.diagnostic.goto_next() end )
|
||||
vim.keymap.set('n', '<leader>dp', function () vim.diagnostic.goto_prev() end )
|
||||
vim.keymap.set('n', '<C-d>', function () vim.lsp.buf.code_action() end)
|
||||
vim.keymap.set('n', '<leader>ca', function () vim.lsp.buf.code_action() end)
|
||||
-- Debugging
|
||||
vim.keymap.set('n', '<leader>sb', function () require('dap').toggle_breakpoint() end )
|
||||
vim.keymap.set('n', '<leader>db', function () require('dapui').toggle() end )
|
||||
vim.keymap.set('n', '<leader>b', function () require('dap').toggle_breakpoint() end )
|
||||
vim.keymap.set('n', '<F5>', function () print("Start debug session" ) require('dap').continue() end )
|
||||
vim.keymap.set('n', '<F6>', function () require('dap').step_over() end )
|
||||
vim.keymap.set('n', '<F7>', function () require('dap').step_into() end )
|
||||
|
||||
vim.keymap.set('n', '<leader>=',":Gen Generate<CR>")
|
||||
|
||||
-- Easily hit escape in terminal mode.
|
||||
vim.keymap.set("t", "<esc><esc>", "<c-\\><c-n>")
|
||||
|
||||
-- Open a terminal at the bottom of the screen with a fixed height.
|
||||
vim.keymap.set("n", ",st", function()
|
||||
vim.cmd.new()
|
||||
vim.cmd.wincmd "J"
|
||||
vim.api.nvim_win_set_height(0, 12)
|
||||
vim.wo.winfixheight = true
|
||||
vim.cmd.term()
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user