feat(lsp): make diagnostics configurable with {"neovim/nvim-lspconfig", opts = {diagnostics = {}}}
. Fixes #55
This commit is contained in:
@ -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())
|
||||
|
Reference in New Issue
Block a user