Skip to content
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

breaking changes & new features: #3

Open
LucasTavaresA opened this issue Mar 15, 2023 · 5 comments
Open

breaking changes & new features: #3

LucasTavaresA opened this issue Mar 15, 2023 · 5 comments

Comments

@LucasTavaresA
Copy link
Owner

Removed vim.g.SC_ts_context variable, ts_context_commentstring is used automatically

@LucasTavaresA
Copy link
Owner Author

6a00aba - Added block comments, and removing outermost comment on cursor

this is based on current line instead of cursor position and its really buggy on nested comments so it needs to be improved, it will work just fine in humane files tho

@LucasTavaresA
Copy link
Owner Author

35b7a0a - Externalized function GetComment to use in my config

all you need to know:

Utilities

Get a table with comment beginning and end

Using this plugin custom tables and ts-context-commentstring it also updates the commentstring

Useful for custom utility functions that need accurate comment detection

-- you can pass "block", and it will *try* to get block comments
local comment = require("SingleComment").GetComment()

@LucasTavaresA LucasTavaresA pinned this issue May 29, 2023
@LucasTavaresA
Copy link
Owner Author

20a3458 - Using treesitter to get the commenstring

TS => tree-sitter
TSCC => ts-context-commenstring

i think TSCC may not be necessary anymore but all that stuff is way more complicated than it should be so i "pasted" part of echasnovski mini.comment function before the current comment detection

since this plugin heuristics expects bad commentstrings after the detection it should not break, if TS fails context-commentstring is still used in nil/empty results so essentially nothing changed

i will dogfood this without using TSCC but its use is very specific so i will probably not notice it

@LucasTavaresA
Copy link
Owner Author

7372a50 - Remove TS stuff

breaks more than it helps, failed to comment a html script tag and there is no reliable way to replace non nil/empty ts garbage commenstrings

@LucasTavaresA
Copy link
Owner Author

922c5e5 to efbe102 - Use ctrl-v or visual block mode to comment specific column or block

all you need to know:

visual block mode now comments from the starting column to the end of the line on line commenting and the specified block on block commenting

this allows for more manual control when multi line commenting a specific section of code

but it is not intelligent and does not toggle or uncomment at all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant