Make it possible to configure where the commentstring detection logic starts in the treesitter AST. The default is to start at the start of the cursor's line (first non-blank character). However, this is not 100% correct when commenting with motions.
update_commentstring now accepts a location where to start the analysis so that when integrating with a commenting plugin, more granular control is possible.
Additionally, a few useful helper functions are exported from ts_context_commentstring.utils which make it simpler to pass in a location.
Make it possible to configure where the
commentstring
detection logic starts in the treesitter AST. The default is to start at the start of the cursor's line (first non-blank character). However, this is not 100% correct when commenting with motions.update_commentstring
now accepts a location where to start the analysis so that when integrating with a commenting plugin, more granular control is possible.Additionally, a few useful helper functions are exported from
ts_context_commentstring.utils
which make it simpler to pass in a location.Resolves #27