diff options
author | CPea <[email protected]> | 2023-04-24 19:37:35 +0700 |
---|---|---|
committer | CPea <[email protected]> | 2023-04-24 20:01:07 +0700 |
commit | 6000591200d900bf7cc73432102e5a56925f7f4a (patch) | |
tree | e99d043607e47f68e810a6569d9ad40a8d4d8f7b /lua/lvim/lsp/config.lua | |
parent | e69596627c7b4f27a529b3f0a23690f980185f21 (diff) |
fix(lsp): make sure config is a table
Diffstat (limited to 'lua/lvim/lsp/config.lua')
-rw-r--r-- | lua/lvim/lsp/config.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lua/lvim/lsp/config.lua b/lua/lvim/lsp/config.lua index 568441d2..b15ce14b 100644 --- a/lua/lvim/lsp/config.lua +++ b/lua/lvim/lsp/config.lua @@ -76,11 +76,13 @@ return { ["gs"] = { "<cmd>lua vim.lsp.buf.signature_help()<cr>", "show signature help" }, ["gl"] = { function() - local config = vim.tbl_get(vim.diagnostic.config(), "float") + local float = vim.diagnostic.config().float - if config then + if float then + local config = type(float) == "table" and float or {} config.scope = "line" - vim.diagnostic.open_float(0, config) + + vim.diagnostic.open_float(config) end end, "Show line diagnostics", |