mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 00:49:03 +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
|
||||
opts = {
|
||||
diagnostics = {
|
||||
underline = true,
|
||||
update_in_insert = false,
|
||||
virtual_text = { spacing = 4, prefix = "●" },
|
||||
severity_sort = true,
|
||||
},
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
jsonls = {},
|
||||
|
@ -61,12 +67,7 @@ return {
|
|||
name = "DiagnosticSign" .. name
|
||||
vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" })
|
||||
end
|
||||
vim.diagnostic.config({
|
||||
underline = true,
|
||||
update_in_insert = false,
|
||||
virtual_text = { spacing = 4, prefix = "●" },
|
||||
severity_sort = true,
|
||||
})
|
||||
vim.diagnostic.config(opts.diagnostics)
|
||||
|
||||
local servers = opts.servers
|
||||
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