We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I want my block comments for lua to be like this:
lua
--[[ some commented-out text or code --]]
So I thought it would be easy to just do something like this:
require("nvim-treesitter.config").setup{ ... context_commentstring = { ... config = { lua = { __default = "-- %s", __multiline = "--[[\n%s\n]]" }, }, }, }
but when commenting a block of code with Comment.nvim the newlines are replaced by spaces.
Am I doing something wrong, or is it just not possible to have newlines in a commentstring.
This is a link to the specific code in my dotfiles repo.
The text was updated successfully, but these errors were encountered:
Hey!
I tried this out myself too and couldn't get it to work with the Lua multiline strings either:
require('Comment').setup { pre_hook = function() return [=[--[[ %s ]]]=] end, }
I think that this plugin can't do much about this though since the commenting plugin needs to handle the commentstring with new lines.
commentstring
I found this issue in Comment.nvim that might be similar to your use case: numToStr/Comment.nvim#38 Maybe this helps?
But you could open an issue/feature request in the Comment.nvim repo since I don't think we could do anything about this in this plugin.
Let me know how it goes!
Sorry, something went wrong.
No branches or pull requests
I want my block comments for
lua
to be like this:So I thought it would be easy to just do something like this:
but when commenting a block of code with Comment.nvim the newlines are replaced by spaces.
Am I doing something wrong, or is it just not possible to have newlines in a commentstring.
This is a link to the specific code in my dotfiles repo.
The text was updated successfully, but these errors were encountered: