summaryrefslogtreecommitdiff
path: root/lua/lvim/lsp/handlers.lua
diff options
context:
space:
mode:
authorCPea <[email protected]>2023-03-03 13:28:24 +0700
committerCPea <[email protected]>2023-04-24 19:10:46 +0700
commitbcf24a42b737bfea720326ab84a8b601ca51c7e0 (patch)
treea9fc7a866ceef70f23400765444ac720b81b8432 /lua/lvim/lsp/handlers.lua
parent7a4265fa464cc6b2d1e604cb2fded451a2a9adfb (diff)
refactor(lsp): allow to disable custom handlers config
Diffstat (limited to 'lua/lvim/lsp/handlers.lua')
-rw-r--r--lua/lvim/lsp/handlers.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/lua/lvim/lsp/handlers.lua b/lua/lvim/lsp/handlers.lua
index 84f2ba5f..bdd09e4a 100644
--- a/lua/lvim/lsp/handlers.lua
+++ b/lua/lvim/lsp/handlers.lua
@@ -12,8 +12,12 @@ function M.setup()
float = lvim.lsp.diagnostics.float,
}
vim.diagnostic.config(config)
- vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, lvim.lsp.float)
- vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, lvim.lsp.float)
+
+ if lvim.lsp.handlers.override_config then
+ vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, lvim.lsp.handlers.override_config)
+ vim.lsp.handlers["textDocument/signatureHelp"] =
+ vim.lsp.with(vim.lsp.handlers.signature_help, lvim.lsp.handlers.override_config)
+ end
end
return M