JoosepAlviste / nvim-ts-context-commentstring

Neovim treesitter plugin for setting the commentstring based on the cursor location in a file.
MIT License
1.13k stars 34 forks source link

Configure without tree-sitter #66

Closed danielo515 closed 1 year ago

danielo515 commented 1 year ago

Thank you for creating this project! I am wondering if it is possible to configure it for languages that do not have Tree-sitter support. As someone who works with various programming languages, I have found that not all projects are compatible with Tree-sitter. Therefore, it would be incredibly helpful if this project could be configured to work with other languages as well.

If this is not currently possible, I completely understand. However, if it is feasible, I would greatly appreciate any guidance or resources you could provide to help me configure this.

Thank you again for your dedication to this project. I look forward to hearing back from you.

Best regards

JoosepAlviste commented 1 year ago

Hey! Would https://github.com/suy/vim-context-commentstring work for your use case? It uses the syntax stack and works in both Vim and Neovim. If not, could you give an example of two that wouldn't work for you?

danielo515 commented 1 year ago

Hey,that looks like a valid replacement. To be honest, currently I'm setting comment string with an autocommand. I totally missed there was a plural versión for block comments

JoosepAlviste commented 1 year ago

Looks like this is resolved, I don't know if there's anything else for us to do here 😄