mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2025-01-08 08:47:35 +00:00
Add trouble
This commit is contained in:
parent
aa8ed67173
commit
0e30786617
@ -153,12 +153,10 @@ return require('packer').startup(function(use)
|
|||||||
-- LSP
|
-- LSP
|
||||||
|
|
||||||
-- Configure language servers
|
-- Configure language servers
|
||||||
use {
|
use "neovim/nvim-lspconfig"
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
requires = {
|
-- Better display of diagnostics
|
||||||
"jose-elias-alvarez/null-ls.nvim",
|
use "folke/trouble.nvim"
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Generic linter/formatters in diagnostics API
|
-- Generic linter/formatters in diagnostics API
|
||||||
use {
|
use {
|
||||||
|
@ -24,12 +24,25 @@ function M.config_lsp_ui()
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Diagnostics signs
|
-- Diagnostics signs
|
||||||
local signs = { Error = "🔥", Warn = "⚠️", Hint = "🤔", Info = "📝" }
|
local signs = { Error = "🔥", Warn = "⚠️", Hint = "🤔", Info = "➞" }
|
||||||
for type, icon in pairs(signs) do
|
for type, icon in pairs(signs) do
|
||||||
local hl = "DiagnosticSign" .. type
|
local hl = "DiagnosticSign" .. type
|
||||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
local function default_attach(client, bufnr)
|
local function default_attach(client, bufnr)
|
||||||
|
Loading…
Reference in New Issue
Block a user