feat(lsp): allow overriding options for vim.lsp.buf.format. Fixes #51

This commit is contained in:
Folke Lemaitre 2023-01-13 22:46:16 +01:00
parent 688436c9af
commit 40d363cf3f
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
3 changed files with 20 additions and 2 deletions

View file

@ -12,12 +12,20 @@ return {
},
---@class PluginLspOpts
opts = {
-- options for vim.diagnostic.config()
diagnostics = {
underline = true,
update_in_insert = false,
virtual_text = { spacing = 4, prefix = "" },
severity_sort = true,
},
-- options for vim.lsp.buf.format
-- `bufnr` and `filter` is handled by the LazyVim formatter,
-- but can be also overriden when specified
format = {
formatting_options = nil,
timeout = nil,
},
---@type lspconfig.options
servers = {
jsonls = {},