-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Could not get neogen to work with LazyVim #172
Comments
I came up with this. I am currently wondering how to integrate it with native snippets support of return {
"danymat/neogen",
dependencies = "nvim-treesitter/nvim-treesitter",
cmd = "Neogen",
keys = {
{
"<leader>ga",
function()
require("neogen").generate({})
end,
desc = "Generate Annotations",
},
},
---@param _ LazyPlugin
---@param opts table
opts = function(_, opts)
local util = require("lazyvim.util")
if util.has("luasnip") then
opts.snippet_engine = "luasnip"
elseif util.has("snippy") then
opts.snippet_engine = "snippy"
end
end,
} |
@rabinadk1 native snippet support has been added according to this issue. Just set |
Thank you very much. I have updated my config to the following. return {
"danymat/neogen",
dependencies = "nvim-treesitter/nvim-treesitter",
cmd = "Neogen",
keys = {
{
"<leader>ga",
function()
require("neogen").generate({})
end,
desc = "Generate Annotations",
},
},
---@param _ LazyPlugin
---@param opts table
opts = function(_, opts)
local snippet_engine = nil
if vim.snippet ~= nil then
snippet_engine = "nvim"
else
local util = require("lazyvim.util")
if util.has("luasnip") then
snippet_engine = "luasnip"
elseif util.has("snippy") then
snippet_engine = "snippy"
elseif vim.g.loaded_vsnip then
snippet_engine = "vsnip"
end
end
opts.snippet_engine = snippet_engine
end,
} |
Weird, do you still have the issue loading Neogen ? |
My configs are:
The text was updated successfully, but these errors were encountered: