feat(coding): Use Neovim's built in commenting#16
Merged
Conversation
`Comment.nvim` stopped active development about 2 years ago. The implementation for commenting relied on an old API that hasn't yet been patched. Almost two months ago, this was opened to handle it but there hasn't been any progress: numToStr/Comment.nvim#518 Since then, Neovim has supported commenting using identical keymaps powered by Treesitter and commentstring (`:h commenting` and `:h commentstring`). Let's just use native Neovim functionality!
| map("n", "<leader>l", "<cmd>Lazy<cr>", { desc = "Lazy" }) | ||
|
|
||
| -- Normal and visual mode mapping for commenting lines | ||
| map({ "n", "v" }, "<Leader>cc", "<cmd>normal gcc<cr>", { desc = "Comments the current or highlighted lines" }) |
Collaborator
There was a problem hiding this comment.
isn't this just removing the remap? if we want \cc to still comment things I think we can leave this in, getting rid of comment.nvim should be enough
Collaborator
Author
There was a problem hiding this comment.
\cc comments out code without this remap!
cosmicbuffalo
approved these changes
May 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Comment.nvimstopped active development about 2 years ago. Theimplementation for commenting relied on an old API that hasn't yet been
patched.
Almost two months ago, this was opened to handle it but there hasn't
been any progress: numToStr/Comment.nvim#518
Since then, Neovim has supported commenting using identical keymaps
powered by Treesitter and commentstring (
:h commentingand:h commentstring).Let's just use native Neovim functionality!