an opinionated comment plugin for neovim
comet-2023-06-14_21.42.52.mp4
- honor 'commentstring' and 'expandtab'
- but has no effects on
--xx
,---xx
and--[[
when &cms='-- %s'
- but has no effects on
- no relying on lsp nor treesitter
- no toggle api
- no multi-line comments:
/* .. */
- when commenting multiple lines, take the minimal indent within the line range
- this is mainly for python
- it just works (tm)
- it is feature-freezed
- neovim 0.9.*
- haolian9/infra.nvim
my personal keymaps
m.n("gc", function() require("comet").comment_curline() end)
m.n("gC", function() require("comet").uncomment_curline() end)
m.v("gc", [[:lua require("comet").comment_vselines()<cr>]])
m.v("gC", [[:lua require("comet").uncomment_vselines()<cr>]])
commentary was always the friend of mine to comment/uncomment. i also drew the most ideasfrom it to form this plugin.