Skip to content
This repository was archived by the owner on Jun 17, 2023. It is now read-only.

nvimdev/coman.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Comment and Annotation

Notice current only work with backend language

Install

-- if you like to use annotation you need install treesitter
packer.use('nvim-treesitter/nvim-treesitter')
packer.use('glepnir/coman.nvim')

Option

custom_template -- table custom the Annotation tempaltes.

Comment

comment use commentstring, so you can check the commentstring of your file.

vim.keymap.set('n','gcc','<cmd>ComComment<cr>',{noremap = true,silent = true})
vim.keymap.set('x','gcc',':ComComment<cr>',{noremap = true,silent = true})

Annotation

Annotation need nvim-treesitter

vim.keymap.set('n','gcj','<cmd>ComAnnotation<Cr>',{noremap = true,silent = true})
  • custom annotation tempaltes

you can overwrite or custom the annotation tempaltes for your language.

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

Liencese MIT

About

neovim plugin for comment and annotation

Resources

License

Stars

56 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages