mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-02 07:47:48 +00:00
feat(nvim): new nvim config (#28)
* 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
This commit is contained in:
32
config/nvim/lua/plugins/trouble.lua
Normal file
32
config/nvim/lua/plugins/trouble.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
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,
|
||||
}
|
||||
Reference in New Issue
Block a user