Add trouble keymap
This commit is contained in:
parent
e115f6e8d6
commit
91aa6f9c8a
@ -65,7 +65,7 @@ require('nvim-surround').setup()
|
||||
require('Comment').setup()
|
||||
require('dapui').setup()
|
||||
require('gitsigns').setup()
|
||||
require("trouble").setup()
|
||||
require("trouble").setup {}
|
||||
require('nvim-autopairs').setup({
|
||||
fast_wrap = {},
|
||||
})
|
||||
@ -244,29 +244,35 @@ map('n','n', 'nzzzv')
|
||||
map('n', 'N', 'Nzzzv')
|
||||
|
||||
-- Same when jumping around
|
||||
map('n','g;', 'g;zz', { silent = true })
|
||||
map('n', 'g;', 'g;zz')
|
||||
|
||||
-- replace ex mode map and use it for repeating 'q' macro
|
||||
map('n','Q', '@q', { silent = true })
|
||||
map('v','Q', '<cmd>norm @q<CR>', { silent = true })
|
||||
map('n', 'Q', '@q')
|
||||
map('v', 'Q', '<cmd>norm @q<CR>')
|
||||
|
||||
-- Shortcut to close quickfix windows
|
||||
map('n','<leader>a', '<cmd>windo lcl|ccl<CR>', { silent = true })
|
||||
map('n', '<leader>a', '<cmd>windo lcl|ccl<CR>')
|
||||
|
||||
-- <Leader>q Closes the current buffer
|
||||
map('n','<leader>q', '<cmd>bdelete<CR>', { silent = true })
|
||||
map('n', '<leader>q', '<cmd>bdelete<CR>')
|
||||
|
||||
-- Easier in-file navigation with Tab and S-Tab
|
||||
map('n', '<S-Tab>', '<C-U>')
|
||||
map('n', '<Tab>', '<C-D>')
|
||||
|
||||
-- Easy buffer navigation
|
||||
map('n','<C-h>', '<C-w>h', { silent = true })
|
||||
map('n','<C-j>', '<C-w>j', { silent = true })
|
||||
map('n','<C-k>', '<C-w>k', { silent = true })
|
||||
map('n','<C-l>', '<C-w>l', { silent = true })
|
||||
map('n', '<C-h>', '<C-w>h')
|
||||
map('n', '<C-j>', '<C-w>j')
|
||||
map('n', '<C-k>', '<C-w>k')
|
||||
map('n', '<C-l>', '<C-w>l')
|
||||
|
||||
map('n','<up>', '<cmd>resize -2<CR>', { silent = true })
|
||||
map('n','<down>', '<cmd>resize +2<CR>', { silent = true })
|
||||
map('n','<left>', '<cmd>vertical resize -2<CR>', { silent = true })
|
||||
map('n','<right>', '<cmd>vertical resize +2<CR>', { silent = true })
|
||||
map('n', '<up>', '<cmd>resize -2<CR>')
|
||||
map('n', '<down>', '<cmd>resize +2<CR>')
|
||||
map('n', '<left>', '<cmd>vertical resize -2<CR>')
|
||||
map('n', '<right>', '<cmd>vertical resize +2<CR>')
|
||||
|
||||
-- Trouble keymap
|
||||
map('n', '<leader>xx', '<cmd>TroubleToggle<cr>', { noremap = true, silent = true })
|
||||
map('n', '<leader>xd', '<cmd>TroubleToggle document_diagnostics<cr>', { noremap = true, silent = true })
|
||||
map('n', '<leader>xl', '<cmd>TroubleToggle loclist<cr>', { noremap = true, silent = true })
|
||||
map('n', '<leader>xq', '<cmd>TroubleToggle quickfix<cr>', { noremap = true, silent = true })
|
||||
|
Loading…
Reference in New Issue
Block a user