All Projects → gennaro-tedesco → nvim-commaround

gennaro-tedesco / nvim-commaround

Licence: MIT License
nvim plugin to toggle comments on and off

Programming Languages

lua
6591 projects
Vim Script
2826 projects

Labels

Projects that are alternatives of or similar to nvim-commaround

lesvim
Nvim config focus on Javascript, Typescript, Rust and Lua - 🚀 💪 ( Fast and Powerfull ) - Deno and other typescript LSP working well together
Stars: ✭ 69 (+97.14%)
Mutual labels:  neovim
agitator.nvim
No description or website provided.
Stars: ✭ 16 (-54.29%)
Mutual labels:  neovim
dotfiles
My dotfiles for Arch Linux and macOS: Polybar, Neovim, ZSH, Alacritty, Git, and more 👨🏿‍💻
Stars: ✭ 13 (-62.86%)
Mutual labels:  neovim
gitlinker.nvim
A lua neovim plugin to generate shareable file permalinks (with line ranges) for several git web frontend hosts. Inspired by tpope/vim-fugitive's :GBrowse
Stars: ✭ 181 (+417.14%)
Mutual labels:  neovim
cmp-under-comparator
nvim-cmp comparator function for completion items that start with one or more underlines
Stars: ✭ 77 (+120%)
Mutual labels:  neovim
nixpkgs
My Nix system configs!
Stars: ✭ 143 (+308.57%)
Mutual labels:  neovim
nvim-projectconfig
neovim projectconfig
Stars: ✭ 48 (+37.14%)
Mutual labels:  neovim
dotfiles
🏠 dotfiles for my macOS environment
Stars: ✭ 17 (-51.43%)
Mutual labels:  neovim
nvim-lsp-smag
Seamless integration of language server locations into NeoVim
Stars: ✭ 60 (+71.43%)
Mutual labels:  neovim
neogen
A better annotation generator. Supports multiple languages and annotation conventions.
Stars: ✭ 339 (+868.57%)
Mutual labels:  neovim
vim-colors-plain
Minimal colorscheme for vim
Stars: ✭ 182 (+420%)
Mutual labels:  neovim
denite-gtags
Denite source for GNU Global
Stars: ✭ 27 (-22.86%)
Mutual labels:  neovim
black-nvim
A Neovim plugin to format your code using Black
Stars: ✭ 23 (-34.29%)
Mutual labels:  neovim
coc-nginx
nginx-language-server extension for coc.nvim
Stars: ✭ 16 (-54.29%)
Mutual labels:  neovim
vim
涛叔的 vim 配置
Stars: ✭ 41 (+17.14%)
Mutual labels:  neovim
luv-vimdocs
No description or website provided.
Stars: ✭ 51 (+45.71%)
Mutual labels:  neovim
dotfiles
Dotfiles for my awesomewm/i3 Arch setup & neovim
Stars: ✭ 19 (-45.71%)
Mutual labels:  neovim
Snowflake
NixOS Flake Configuration.
Stars: ✭ 22 (-37.14%)
Mutual labels:  neovim
null-ls.nvim
Use Neovim as a language server to inject LSP diagnostics, code actions, and more via Lua.
Stars: ✭ 965 (+2657.14%)
Mutual labels:  neovim
nvimrc
vimrc for neovim written in lua
Stars: ✭ 99 (+182.86%)
Mutual labels:  neovim

nvim-commaround

PR Lua

toggle comments on and off

InstallationUsageCustomisationFeedback

nvim-commaround comes and goes around, comments up and down! It toggles comments for visual blocks or inline code according to the buffer filetype: it works out of the box, it is awesome!

Installation

Install it using your favourite plugin manager; for instance if you are using vim-plug

Plug 'gennaro-tedesco/nvim-commaround'

Usage

Visually select the lines you want to act on and toggle commaround: the default mapping is

vmap <leader>c <Plug>ToggleCommaround

The plugin detects the buffer filetype and inserts block or line comments according to the selection.

demo

Customisation

The list of filetypes configuration characters can be found here. To add comment characters for a new filetype (or to modify the existing ones) specify the below in your nvim configurations (init.vim or any other option file being sourced at start-up), say

lua require('nvim-commaround.config').config["todo"] = {single = "--!", block = {left = "/*!", right = "!*/"}}

replacing "todo" with any specific filetype; leave {single = "--!", block = nil} in case no block comments are available.

To change the default mapping to toggle comments define any right hand side of the option below, for example

let g:toggle_commaround = 'gcc'

Unit tests

We make use of the busted framework for unit tests; run them with

busted -C lua

Feedback

If you find this plugin useful consider awarding it a , it is a great way to give feedback! Otherwise, any additional suggestions or merge request is warmly welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].