neogen icon indicating copy to clipboard operation
neogen copied to clipboard

Sometimes native snippets do not expand on tab

Open pgosar opened this issue 8 months ago • 0 comments

This appears to be a pretty random bug buf happens a majority of the time, as such I unfortunately can't really provide a proper reproduction. However, I notice that sometimes, instead of jumping to the next entry to edit in the method documentation comments, pressing tab just inserts a tab character instead. This appears to happen pretty randomly and I've so been unable to replicate it consistently. I am using :Neogen

This is almost certainly not a configuration problem - I attempted the same thing after removing almost everything besides treesitter.

I am using neovim 0.10 and the built in snippet support. Regular snippets from the LSP and other sources work fine. This plugin works if I use the nvim-cmp route in the readme and forego using the builtin nvim snippets.

min repo

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
	vim.fn.system({
		"git",
		"clone",
		"--filter=blob:none",
		"https://github.com/folke/lazy.nvim.git",
		"--branch=stable", -- latest stable release
		lazypath,
	})
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup({
	{
		"nvim-treesitter/nvim-treesitter",
		build = ":TSUpdate",
		config = function()
			require("nvim-treesitter.configs").setup({
				highlight = {
					enable = true,
				},
			})
		end,
	},
	{
		"danymat/neogen",
		config = function()
			require("neogen").setup({ snippet_engine = "nvim" })
		end,
	},
})

-- try running neogit, instead of tabbing through each param it just inserts a tab character
map = function(mode, key, action, opts)
	vim.api.nvim_set_keymap(mode, key, action, opts or {})
end

pgosar avatar May 30 '24 04:05 pgosar