mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2025-01-07 07:27:34 +00:00
Add trouble
This commit is contained in:
parent
aa8ed67173
commit
0e30786617
@ -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 {
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user