-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
Configure relative priority of built-in comments (ft.lua) and commentstring #109
Comments
I think you are confused regarding the use of |
Also, please provide the actual issue that you are facing with the plugin. |
Because To illustrate, this is my current (working) pre-hook configuration. All it does is return pre_hook = function(ctx)
if vim.bo.filetype == 'typescriptreact' then
return vim.o.commentstring
end
end
Sorry I was unclear, this is a feature request. |
Yes and No. The integration that is showcased in the readme doesn't update the commentstring. It just returns that string so that it can be used for comment/uncomment.
You would still need to call something to update commentstring (which I don't recommend), hence I have already thought of this before making this plugin and IMO updating commentstring every time is just not worth. Why not just use that string instead of updating a editor's setting? If you get my point, then your request for "priority" will look redundant :) |
We're miscommunicating-- I'm not suggesting that
You do not-- that's why the |
This is what I don't recommend because you have an option to use the calculated commentstring which I showed in the readme. I understand your point but it's the design choice i made with IMO the integration code b/w both the plugin is way too verbose. And I believe that can be improved (you can talk to it's author). I am also thinking of making a |
OK, thx for engaging. |
From the README:
README then goes on to provide
pre_hook
code for integrating withJoosephAlviste/nvim-ts-context-commentstring
.Why not let the user decide whether
ft_table
orcommentstring
gets priority (ideally configurable per-filetype?). Lettingcommentstring
have priority would eliminate the need for any integration code at all fornvim-ts-context-commentstring
.The text was updated successfully, but these errors were encountered: