Calling dependency function in opts #1189
Unanswered
LamprosPitsillos
asked this question in
Q&A
Replies: 1 comment
-
Your code snippet works in my config.
{
"JoosepAlviste/nvim-ts-context-commentstring",
lazy = true,
opts = {
enable_autocmd = false,
},
} In my own config, on top of {
"numToStr/Comment.nvim",
keys = {
{ "gc", mode = { "n", "v" }, desc = "Comment toggle linewise" },
{ "gb", mode = { "n", "v" }, desc = "Comment toggle blockwise" },
},
opts = function()
local commentstring_avail, commentstring = pcall(require, "ts_context_commentstring.integrations.comment_nvim")
return commentstring_avail and commentstring and { pre_hook = commentstring.create_pre_hook() } or {}
end,
} Can you share the error message? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Using the below config throws an error ( understandably ) about
not being found, since it isnt installed yet.
What is the proper way to handle this?
I thought that using the
config = function ()
andsetup
in there should fix the issue.Beta Was this translation helpful? Give feedback.
All reactions