Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nvimdev/coman.nvim
neovim plugin for comment and annotation
https://github.com/nvimdev/coman.nvim
Last synced: 3 days ago
JSON representation
neovim plugin for comment and annotation
- Host: GitHub
- URL: https://github.com/nvimdev/coman.nvim
- Owner: nvimdev
- License: mit
- Archived: true
- Created: 2022-07-29T09:58:04.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-02T11:29:03.000Z (about 2 years ago)
- Last Synced: 2024-08-02T13:32:59.267Z (3 months ago)
- Language: Lua
- Homepage:
- Size: 22.5 KB
- Stars: 58
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Comment and Annotation
**Notice current only work with backend language**
## Install
```lua
-- if you like to use annotation you need install treesitter
packer.use('nvim-treesitter/nvim-treesitter')
packer.use('glepnir/coman.nvim')
```## Option
```lua
custom_template -- table custom the Annotation tempaltes.
```## Comment
comment use `commentstring`, so you can check the `commentstring` of your file.
```lua
vim.keymap.set('n','gcc','ComComment',{noremap = true,silent = true})
vim.keymap.set('x','gcc',':ComComment',{noremap = true,silent = true})
```## Annotation
Annotation need `nvim-treesitter`
```lua
vim.keymap.set('n','gcj','ComAnnotation',{noremap = true,silent = true})
```- custom annotation tempaltes
you can overwrite or custom the annotation tempaltes for your language.
```lua
local custom_template = require('coman').custom_template
-- tbl is the function relate table. index 1 is function name
-- others are params name with type (if have)
custom_template['c'] = function(tbl, cms)
return {}
end
```## Show
![image](https://user-images.githubusercontent.com/41671631/181735098-7e81fc60-3e14-4bfb-9322-a9bcab2edc80.gif)
## Liencese MIT