Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes native snippets do not expand on tab #179

Open
pgosar opened this issue May 30, 2024 · 0 comments
Open

Sometimes native snippets do not expand on tab #179

pgosar opened this issue May 30, 2024 · 0 comments

Comments

@pgosar
Copy link

pgosar commented May 30, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant