add trouble
This commit is contained in:
parent
9adddc4b7a
commit
f763d7b994
2 changed files with 29 additions and 0 deletions
|
|
@ -147,6 +147,32 @@ require('lspkind').init({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
require('trouble').setup {
|
||||||
|
mode = "lsp_document_diagnostics",
|
||||||
|
auto_close = true,
|
||||||
|
action_keys = { -- key mappings for actions in the trouble list
|
||||||
|
-- map to {} to remove a mapping, for example:
|
||||||
|
-- close = {},
|
||||||
|
--close = "q", -- close the list
|
||||||
|
--cancel = "<esc>", -- cancel the preview and get back to your last window / buffer / cursor
|
||||||
|
--refresh = "r", -- manually refresh
|
||||||
|
jump = {"o", "<tab>"}, -- jump to the diagnostic or open / close folds
|
||||||
|
--open_split = { "<c-x>" }, -- open buffer in new split
|
||||||
|
--open_vsplit = { "<c-v>" }, -- open buffer in new vsplit
|
||||||
|
open_tab = { }, -- open buffer in new tab
|
||||||
|
jump_close = {"<cr>"}, -- jump to the diagnostic and close the list
|
||||||
|
toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode
|
||||||
|
toggle_preview = "P", -- toggle auto_preview
|
||||||
|
hover = "K", -- opens a small popup with the full multiline message
|
||||||
|
preview = "p", -- preview the diagnostic location
|
||||||
|
close_folds = {"zM", "zm"}, -- close all folds
|
||||||
|
open_folds = {"zR", "zr"}, -- open all folds
|
||||||
|
toggle_fold = {"zA", "za"}, -- toggle fold of current file
|
||||||
|
previous = "k", -- previous item
|
||||||
|
next = "j" -- next item
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
require('telescope').setup {
|
require('telescope').setup {
|
||||||
defaults = {
|
defaults = {
|
||||||
mappings = {
|
mappings = {
|
||||||
|
|
|
||||||
3
.vimrc
3
.vimrc
|
|
@ -214,6 +214,7 @@ Plug 'ray-x/lsp_signature.nvim'
|
||||||
|
|
||||||
Plug 'RishabhRD/popfix'
|
Plug 'RishabhRD/popfix'
|
||||||
Plug 'RishabhRD/nvim-lsputils'
|
Plug 'RishabhRD/nvim-lsputils'
|
||||||
|
Plug 'folke/trouble.nvim'
|
||||||
|
|
||||||
" Plugins that do specific things
|
" Plugins that do specific things
|
||||||
"Plug 'Shougo/vimproc.vim'
|
"Plug 'Shougo/vimproc.vim'
|
||||||
|
|
@ -304,6 +305,8 @@ nnoremap <silent> ga <cmd>lua require('telescope.builtin').lsp_code_actions({i
|
||||||
vnoremap <silent> ga :<C-U>lua require('telescope.builtin').lsp_range_code_actions({initial_mode = "normal"})<cr>
|
vnoremap <silent> ga :<C-U>lua require('telescope.builtin').lsp_range_code_actions({initial_mode = "normal"})<cr>
|
||||||
nnoremap <silent> ge <cmd>lua vim.lsp.diagnostic.show_line_diagnostics({show_header = false, focusable = false})<CR>
|
nnoremap <silent> ge <cmd>lua vim.lsp.diagnostic.show_line_diagnostics({show_header = false, focusable = false})<CR>
|
||||||
|
|
||||||
|
nnoremap <leader>xx <cmd>TroubleToggle<cr>
|
||||||
|
|
||||||
" Set updatetime for CursorHold
|
" Set updatetime for CursorHold
|
||||||
" 300ms of no cursor movement to trigger CursorHold
|
" 300ms of no cursor movement to trigger CursorHold
|
||||||
set updatetime=500
|
set updatetime=500
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue