lspsaga.nvim
lspsaga.nvim copied to clipboard
Errors when opening most float options
Describe the bug
Using { "<leader>ca", "<cmd>Lspsaga code_action<cr>", desc = "Code action" },
im getting errors when opening code_action
Error 13:46:58 msg_show.lua_error Error detected while processing CursorMoved Autocommands for "<buffer=26>":
13:46:58 msg_show Error executing lua callback: ...vim/lazy/lspsaga.nvim/lua/lspsaga/codeaction/preview.lua:104: attempt to perform arithmetic on a table value
stack traceback:
...vim/lazy/lspsaga.nvim/lua/lspsaga/codeaction/preview.lua:104: in function 'create_preview_win'
...vim/lazy/lspsaga.nvim/lua/lspsaga/codeaction/preview.lua:155: in function 'action_preview'
...e/nvim/lazy/lspsaga.nvim/lua/lspsaga/codeaction/init.lua:242: in function 'set_cursor'
...e/nvim/lazy/lspsaga.nvim/lua/lspsaga/codeaction/init.lua:101: in function <...e/nvim/lazy/lspsaga.nvim/lua/lspsaga/codeaction/init.lua:100>
Error 13:47:47 msg_show.lua_error Error detected while processing CursorMoved Autocommands for "<buffer=26>":
13:47:47 msg_show Error executing lua callback: ...vim/lazy/lspsaga.nvim/lua/lspsaga/codeaction/preview.lua:104: attempt to perform arithmetic on a table value
stack traceback:
...vim/lazy/lspsaga.nvim/lua/lspsaga/codeaction/preview.lua:104: in function 'create_preview_win'
...vim/lazy/lspsaga.nvim/lua/lspsaga/codeaction/preview.lua:155: in function 'action_preview'
...e/nvim/lazy/lspsaga.nvim/lua/lspsaga/codeaction/init.lua:242: in function 'set_cursor'
...e/nvim/lazy/lspsaga.nvim/lua/lspsaga/codeaction/init.lua:101: in function <...e/nvim/lazy/lspsaga.nvim/lua/lspsaga/codeaction/init.lua:100>
Steps to reproduce
{
"nvimdev/lspsaga.nvim",
cond = not vim.g.vscode,
event = { "LspAttach" },
dependencies = {
"nvim-treesitter/nvim-treesitter",
"nvim-tree/nvim-web-devicons", -- optional
},
config = function()
local lspsaga = require("lspsaga")
lspsaga.setup({
lightbulb = {
enable = false,
sign = false,
virtual_text = false,
enable_in_insert = false,
},
symbol_in_winbar = {
hide_keyword = true,
folder_level = 0,
},
})
end,
keys = {
{ "gd", "<cmd>Lspsaga peek_definition<cr>", desc = "Peek definition" },
{ "gD", "<cmd>Lspsaga goto_definition<cr>", desc = "Go to definition" },
{ "gt", "<cmd>Lspsaga peek_type_definition<cr>", desc = "Peek type definition" },
{ "gT", "<cmd>Lspsaga goto_type_definition<cr>", desc = "Go to type definition" },
{ "<leader>Lli", "<cmd>Lspsaga incoming_calls<cr>", desc = "Incoming calls" },
{ "<leader>Llo", "<cmd>Lspsaga outgoing_calls<cr>", desc = "Outgoing calls" },
{ "<leader>Lld", "<cmd>Lspsaga diagnostic_jump_next<cr>", desc = "Diagnostic jump next" },
{ "<leader>Llf", "<cmd>Lspsaga finder<cr>", desc = "Finder" },
{ "<leader>ca", "<cmd>Lspsaga code_action<cr>", desc = "Code action" },
{ "K", "<cmd>Lspsaga hover_doc<cr>", desc = "Hover doc" },
-- {
-- "<leader>cA",
-- function()
-- require("lspsaga.codeaction").code_action({ context = { only = "source" } })
-- end,
-- desc = "Code action (source)",
-- },
},
},
then add any lsp setup, doesnt matter really, im using typescript-tools to setup lsp for typescript specifically
Expected behavior
Expect code actions to work without errors, currently it still works i just get a bunch of errors
Neovim version (nvim -v)
NVIM v0.10.0-dev-2258+g1405e5c8c
lspsaga commit
a4d4428
Terminal name/version
kitty 0.34.0
I'm getting similar errors with outgoing_calls, incoming_calls, diagnostic_jump_next and finder as well as code_action and code_action({context={only='source'}})