Add trouble

This commit is contained in:
ViViDboarder 2021-12-10 17:10:28 -08:00
parent aa8ed67173
commit 0e30786617
2 changed files with 18 additions and 7 deletions

View File

@ -153,12 +153,10 @@ return require('packer').startup(function(use)
-- LSP
-- Configure language servers
use {
"neovim/nvim-lspconfig",
requires = {
"jose-elias-alvarez/null-ls.nvim",
},
}
use "neovim/nvim-lspconfig"
-- Better display of diagnostics
use "folke/trouble.nvim"
-- Generic linter/formatters in diagnostics API
use {

View File

@ -24,12 +24,25 @@ function M.config_lsp_ui()
end
-- Diagnostics signs
local signs = { Error = "🔥", Warn = "⚠️", Hint = "🤔", Info = "📝" }
local signs = { Error = "🔥", Warn = "⚠️", Hint = "🤔", Info = "" }
for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
end
if utils.is_plugin_loaded("trouble") then
require("trouble").setup {
fold_open = "",
fold_closed = "",
signs = {
error = signs.Error,
warning = signs.Warning,
hint = signs.Hint,
information = signs.Info,
other = "",
},
}
end
end
local function default_attach(client, bufnr)