mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-24 17:58:51 +02:00
feat(lsp): make diagnostics configurable with {"neovim/nvim-lspconfig", opts = {diagnostics = {}}}
. Fixes #55
This commit is contained in:
parent
40113b2639
commit
1efc925d16
1 changed files with 7 additions and 6 deletions
|
@ -12,6 +12,12 @@ return {
|
||||||
},
|
},
|
||||||
---@class PluginLspOpts
|
---@class PluginLspOpts
|
||||||
opts = {
|
opts = {
|
||||||
|
diagnostics = {
|
||||||
|
underline = true,
|
||||||
|
update_in_insert = false,
|
||||||
|
virtual_text = { spacing = 4, prefix = "●" },
|
||||||
|
severity_sort = true,
|
||||||
|
},
|
||||||
---@type lspconfig.options
|
---@type lspconfig.options
|
||||||
servers = {
|
servers = {
|
||||||
jsonls = {},
|
jsonls = {},
|
||||||
|
@ -61,12 +67,7 @@ return {
|
||||||
name = "DiagnosticSign" .. name
|
name = "DiagnosticSign" .. name
|
||||||
vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" })
|
vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" })
|
||||||
end
|
end
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config(opts.diagnostics)
|
||||||
underline = true,
|
|
||||||
update_in_insert = false,
|
|
||||||
virtual_text = { spacing = 4, prefix = "●" },
|
|
||||||
severity_sort = true,
|
|
||||||
})
|
|
||||||
|
|
||||||
local servers = opts.servers
|
local servers = opts.servers
|
||||||
local capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
local capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue