-
The {
'numToStr/Comment.nvim',
dependencies = { "JoosepAlviste/nvim-ts-context-commentstring" },
opts = { -- I'll have to call .setup() externally for it to work.
pre_hook = require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook(),
}
}, E5113: Error while calling lua chunk: /home/MyUser/.config/nvim/lua/usr/packages.lua:183: module 'ts_context_commentstring.integrations.com
ment_nvim' not found So my best guess is that I need to call some kind of setup on -- Inside my lazy.lua
{
'numToStr/Comment.nvim',
dependencies = { "JoosepAlviste/nvim-ts-context-commentstring" },
}, -- Inside my init.lua
require('Comment').setup { -- enable Comment plugin alongside support for tsx/jsx
pre_hook = require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook(),
} I wan't sure if it's a plugin problem or a lazy.nvim problem so I opened a discussion first |
Beta Was this translation helpful? Give feedback.
Answered by
mrtnvgr
Mar 4, 2023
Replies: 1 comment
-
You need to call {
"numToStr/Comment.nvim",
dependencies = {
"JoosepAlviste/nvim-ts-context-commentstring",
},
event = "VeryLazy",
config = function()
require("Comment").setup({
pre_hook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook(),
})
end
}, |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
folke
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You need to call
create_pre_hook
in anonymous function