{"id":13412950,"url":"https://github.com/gennaro-tedesco/nvim-commaround","last_synced_at":"2025-04-22T20:14:30.446Z","repository":{"id":45005481,"uuid":"334883017","full_name":"gennaro-tedesco/nvim-commaround","owner":"gennaro-tedesco","description":"nvim plugin to toggle comments on and off","archived":false,"fork":false,"pushed_at":"2023-01-06T23:16:04.000Z","size":31,"stargazers_count":40,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-22T20:14:23.993Z","etag":null,"topics":["lua","neovim"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gennaro-tedesco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-01T08:38:20.000Z","updated_at":"2025-01-08T07:26:58.000Z","dependencies_parsed_at":"2023-02-06T10:01:53.852Z","dependency_job_id":null,"html_url":"https://github.com/gennaro-tedesco/nvim-commaround","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gennaro-tedesco%2Fnvim-commaround","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gennaro-tedesco%2Fnvim-commaround/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gennaro-tedesco%2Fnvim-commaround/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gennaro-tedesco%2Fnvim-commaround/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gennaro-tedesco","download_url":"https://codeload.github.com/gennaro-tedesco/nvim-commaround/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250316063,"owners_count":21410476,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lua","neovim"],"created_at":"2024-07-30T20:01:31.503Z","updated_at":"2025-04-22T20:14:30.417Z","avatar_url":"https://github.com/gennaro-tedesco.png","language":"Lua","funding_links":[],"categories":["Editing Support","Lua"],"sub_categories":["Comment"],"readme":"\u003ch1 align=\"center\"\u003e\n  nvim-commaround\n\u003c/h1\u003e\n\n\u003ch2 align=\"center\"\u003e\n  \u003cimg alt=\"PR\" src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat\"/\u003e\n  \u003cimg alt=\"Lua\" src=\"https://img.shields.io/badge/lua-%232C2D72.svg?\u0026style=flat\u0026logo=lua\u0026logoColor=white\"/\u003e\n\u003c/h2\u003e\n\n\u003ch4 align=\"center\"\u003etoggle comments on and off\u003c/h4\u003e\n\n\u003ch3 align=\"center\"\u003e\n  \u003ca href=\"#Installation\"\u003eInstallation\u003c/a\u003e •\n  \u003ca href=\"#Usage\"\u003eUsage\u003c/a\u003e •\n  \u003ca href=\"#Customisation\"\u003eCustomisation\u003c/a\u003e •\n  \u003ca href=\"#Feedback\"\u003eFeedback\u003c/a\u003e\n\u003c/h3\u003e\n\n`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!\n\n## Installation\nInstall it using your favourite plugin manager; for instance if you are using vim-plug\n```\nPlug 'gennaro-tedesco/nvim-commaround'\n```\n\n## Usage\nVisually select the lines you want to act on and toggle commaround: the default mapping is\n```\nvmap \u003cleader\u003ec \u003cPlug\u003eToggleCommaround\n```\nThe plugin detects the buffer filetype and inserts block or line comments according to the selection.\n\n![demo](https://user-images.githubusercontent.com/15387611/116161815-c73fa480-a6f4-11eb-940f-a9a012cd8676.gif)\n\n## Customisation\nThe list of filetypes configuration characters can be found [here](https://github.com/gennaro-tedesco/nvim-commaround/blob/master/lua/nvim-commaround/config.lua). 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\n```\nlua require('nvim-commaround.config').config[\"todo\"] = {single = \"--!\", block = {left = \"/*!\", right = \"!*/\"}}\n```\nreplacing \"todo\" with any specific filetype; leave `{single = \"--!\", block = nil}` in case no block comments are available.\n\nTo change the default mapping to toggle comments define any right hand side of the option below, for example\n```\nlet g:toggle_commaround = 'gcc'\n```\n\n## Unit tests\nWe make use of the [busted framework](https://olivinelabs.com/busted/) for unit tests; run them with\n```\nbusted -C lua\n```\n\n## Feedback\nIf 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!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgennaro-tedesco%2Fnvim-commaround","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgennaro-tedesco%2Fnvim-commaround","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgennaro-tedesco%2Fnvim-commaround/lists"}