diff options
author | CPea <[email protected]> | 2023-04-21 00:58:52 +0700 |
---|---|---|
committer | CPea <[email protected]> | 2023-04-24 19:11:25 +0700 |
commit | 66f82fe49ae5c43366caf8720ad4b9d790c73379 (patch) | |
tree | 6bb72ebc68b83e3410c777c91eb3b5427a7a3b7d /lua/lvim/lsp/config.lua | |
parent | a99b1db9a3f22f6e1b813086c68ad3f8bbb79ca8 (diff) |
move default config to `settings.lua` and keep backward compability
keep backward compability
Diffstat (limited to 'lua/lvim/lsp/config.lua')
-rw-r--r-- | lua/lvim/lsp/config.lua | 37 |
1 files changed, 4 insertions, 33 deletions
diff --git a/lua/lvim/lsp/config.lua b/lua/lvim/lsp/config.lua index 42bebdca..568441d2 100644 --- a/lua/lvim/lsp/config.lua +++ b/lua/lvim/lsp/config.lua @@ -54,37 +54,10 @@ local join_paths = require("lvim.utils").join_paths return { templates_dir = join_paths(get_runtime_dir(), "site", "after", "ftplugin"), - diagnostics = { - signs = { - active = true, - values = { - { name = "DiagnosticSignError", text = lvim.icons.diagnostics.Error }, - { name = "DiagnosticSignWarn", text = lvim.icons.diagnostics.Warning }, - { name = "DiagnosticSignHint", text = lvim.icons.diagnostics.Hint }, - { name = "DiagnosticSignInfo", text = lvim.icons.diagnostics.Information }, - }, - }, - virtual_text = true, - update_in_insert = false, - underline = true, - severity_sort = true, - float = { - focusable = true, - style = "minimal", - border = "rounded", - source = "always", - header = "", - prefix = "", - }, - }, + ---@deprecated use vim.diagnostic.config() instead + diagnostics = {}, document_highlight = false, code_lens_refresh = true, - ---@usage list of the keys to override behavior of the handlers - handlers = { - focusable = true, - style = "minimal", - border = "rounded", - }, on_attach_callback = nil, on_init_callback = nil, automatic_configuration = { @@ -106,11 +79,9 @@ return { local config = vim.tbl_get(vim.diagnostic.config(), "float") if config then - return + config.scope = "line" + vim.diagnostic.open_float(0, config) end - - config.scope = "line" - vim.diagnostic.open_float(0, config) end, "Show line diagnostics", }, |