mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-30 02:46:32 +00:00
* feat(nvim): clean config, work in progress * feat: refactored plugins and configs * feat: stylua config, ufo, lsp refactor, cleanup * feat: renamed nvim to nvim-lazy, added alias * feat: renamed nvim-clean to be nvim, updated alias
33 lines
1.3 KiB
Lua
33 lines
1.3 KiB
Lua
return {
|
|
'folke/trouble.nvim',
|
|
lazy = false,
|
|
dependencies = 'nvim-tree/nvim-web-devicons',
|
|
config = function()
|
|
require('trouble').setup {
|
|
auto_preview = false,
|
|
auto_fold = true,
|
|
auto_close = true,
|
|
use_lsp_diagnostic_signs = true,
|
|
}
|
|
vim.keymap.set('n', '<leader>xx', '<cmd>TroubleToggle<cr>', { silent = true, noremap = true })
|
|
vim.keymap.set('n', '<leader>xw', '<cmd>TroubleToggle workspace_diagnostics<cr>', { silent = true, noremap = true })
|
|
vim.keymap.set('n', '<leader>xd', '<cmd>TroubleToggle document_diagnostics<cr>', { silent = true, noremap = true })
|
|
vim.keymap.set('n', '<leader>xl', '<cmd>TroubleToggle loclist<cr>', { silent = true, noremap = true })
|
|
vim.keymap.set('n', '<leader>xq', '<cmd>TroubleToggle quickfix<cr>', { silent = true, noremap = true })
|
|
vim.keymap.set('n', 'gR', '<cmd>TroubleToggle lsp_references<cr>', { silent = true, noremap = true })
|
|
|
|
-- Diagnostic signs
|
|
-- https://github.com/folke/trouble.nvim/issues/52
|
|
local signs = {
|
|
Error = ' ',
|
|
Warning = ' ',
|
|
Hint = ' ',
|
|
Information = ' ',
|
|
}
|
|
for type, icon in pairs(signs) do
|
|
local hl = 'DiagnosticSign' .. type
|
|
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
|
end
|
|
end,
|
|
}
|