Closed BenjaminKern closed 8 months ago
Unfortunately, the bug is still present, cf. attached screencast.
can't reproduce. make sure is last commit
Hmm I am using the latest commit, I‘ll try to come up with a minimal reproducable example EDIT: This patch below, fixes it for me locally (which sort of makes sense, since you are checking that vim.snippet._session is null within the autocommand, but outside of the autocmmand you assume that vim.snippet._session is always not null). Still trying to come up with a simple reproducable example
diff --git a/lua/epo/init.lua b/lua/epo/init.lua
index 8fd955a..ef9623f 100644
--- a/lua/epo/init.lua
+++ b/lua/epo/init.lua
@@ -165,8 +165,6 @@ local function signature_help(client, bufnr, lnum)
end,
})
- ---@diagnostic disable-next-line: invisible
- local count = vim.tbl_count(vim.snippet._session.tabstops)
api.nvim_create_autocmd({ 'CursorMovedI', 'CursorMoved' }, {
buffer = ctx.bufnr,
group = g,
@@ -178,7 +176,8 @@ local function signature_help(client, bufnr, lnum)
---@diagnostic disable-next-line: invisible
and vim.snippet._session
---@diagnostic disable-next-line: invisible
- and vim.snippet._session.current_tabstop.index + 1 == count
+ and vim.snippet._session.current_tabstop.index + 1
+ == vim.tbl_count(vim.snippet._session.tabstops)
then
is_out = true
end
When using the following config,
I get the following error message, when jumping into a method with no parameters
Most probably this one here https://github.com/nvimdev/epo.nvim/blob/main/lua/epo/init.lua#L181 needs to adapted. Maybe like
?