kommentary VS nvim-ts-context-commentstring

Compare kommentary vs nvim-ts-context-commentstring and see what are their differences.

nvim-ts-context-commentstring

Neovim treesitter plugin for setting the commentstring based on the cursor location in a file. (by JoosepAlviste)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
kommentary nvim-ts-context-commentstring
14 26
532 1,026
- -
2.9 6.7
5 months ago 20 days ago
Lua Lua
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

kommentary

Posts with mentions or reviews of kommentary. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-02-14.

nvim-ts-context-commentstring

Posts with mentions or reviews of nvim-ts-context-commentstring. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-05-18.
  • Trying to set up a dev environment for Vue.js in Astrovim
    2 projects | /r/neovim | 18 May 2023
    I work with Vue every day, but I don't use AstroNvim. The Volar language server with Take Over Mode works great for me. I don't know what exactly is broken for you when commenting, but my plugin nvim-ts-context-commentstring works for setting the correct commentstring in the Vue single file component sections with Treesitter.
  • Comment your code more efficiently in Neovim
    3 projects | /r/neovim | 17 Mar 2023
    Fair enough, although this helps a lot with this issue.
  • What is the best commenter for tsx, jsx and css files with lua config
    3 projects | /r/neovim | 4 Mar 2023
    I haven't tried mini, but judging by the README he would also have to use a plugin the likes of nvim-ts-commentstrung in a p re / post hook to get the adequate comment string in files with multiple languages.
  • How to surround a paragraph with multiple charaters/symbols?
    4 projects | /r/neovim | 26 Jan 2023
  • Commenting both erb and handlebars files
    3 projects | /r/neovim | 26 Dec 2022
    I use https://github.com/JoosepAlviste/nvim-ts-context-commentstring with vim-commentary
  • JavaScript and CSS in HTML files
    4 projects | /r/neovim | 18 Dec 2022
    I think you could use Comment.nvim combine with nvim-ts-context-commentstring like explained in this video
  • Is it possible to configure nvim_comment to change the way it comments if I am inside a jsx/tsx block or outside a jsx/tsx block?
    4 projects | /r/neovim | 25 Nov 2022
    you should be able to integrate it with nvim-ts-context-commentstring as specified in the nvim-comment README
  • Plugin suggestion
    13 projects | /r/neovim | 30 Aug 2022
    You can try using comment + context-comment, I've found it better for treesitter supported code commenting personally.
  • Context commenting not woking on ReactJs
    2 projects | /r/neovim | 9 Aug 2022
    I'm using Context Commentstring & Comment.nvim together.
  • Should I be worried or not worried about Tree-sitter now that the Atom editor has been killed?
    3 projects | /r/neovim | 13 Jun 2022
    I think you're asking why Neovim chose to use tree-sitter for syntax highlighting over LSP? In addition to its speed over LSP and no dependency on a separate running server, tree-sitter is described as an incremental parsing library. When editing source code, until the user stops writing the syntax is usually considered incorrect and the code is in a broken state. Tree-sitter was designed to handle these sorts of syntax errors and highlight the rest of the file correctly while the current section is being edited. Tree-sitter also boasts a few unique features over LSP. Language injection is a cool feature where tree-sitter can parse multiple languages in the same source file and provide the correct highlighting for both languages. Common examples include HTML inside JSX, vimscript inside Neovim's Lua API, C code in Lua, Bash code inside Dockerfiles, etc. Furthermore the language injection feature can be extended like in the very cool nvim-ts-context-commentstring plugin that detects the current language under the cursor and applies the corresponding commentstring. Additionally tree-sitter allows the user to extend the concept of textobjects using the tree-sitter query language. The plugin nvim-treesitter-textobjects provides a collection of queries for common languages that define text objects such as classes, functions, parameters, etc. In turn this allows you to perform operations such as delete the contents of a function (using the motion dif), delete an entire class and enter insert mode (using the motion cac), and navigate to the next function (using the motion ]m).

What are some alternatives?

When comparing kommentary and nvim-ts-context-commentstring you can also consider the following projects:

nvim-comment - A comment toggler for Neovim, written in Lua

nvim-treesitter - Nvim Treesitter configurations and abstraction layer

vim-commentary - commentary.vim: comment stuff out

Comment.nvim - :brain: :muscle: // Smart and powerful comment plugin for neovim. Supports treesitter, dot repeat, left-right/up-down motions, hooks, and more

tcomment_vim - An extensible & universal comment vim-plugin that also handles embedded filetypes

vim-context-commentstring - Vim plugin that sets the value of ‘commentstring’ to a different value depending on the region of the file you are in.

neovim - Vim-fork focused on extensibility and usability

neoformat - :sparkles: A (Neo)vim plugin for formatting code.

commented.nvim - Neovim commenting plugin in Lua. Support operator, motions and more than 60 languages! :fire:

neovim - Soho vibes for Neovim