Comment Highlighter is a Neovim plugin that enhances your coding experience by highlighting TODO, FIXME, and NOTE comments in your code. It supports multiple programming languages and allows for easy color customization.
- Highlights TODO, FIXME, and NOTE comments
- Supports multiple programming languages
- Easy color customization
- Efficient highlighting on buffer events
Using packer.nvim
Add the following line to your Neovim configuration:
use {
'nautilor/better-comments',
config = function()
require('better-comments').setup()
end
}
Using lazy.nvim
Add the following to your Neovim configuration:
{
'nautilor/better-comments',
config = function()
require('better-comments').setup()
end
}
Using vim-plug
Add the following line to your Neovim configuration:
Plug 'nautilor/better-comments'
Then, add this to your configuration:
lua require('better-comments').setup()
You can customize the colors of the highlighted comments by passing a table to the setup
function:
require('better-comments').setup({
colors = {
todo = '#FFA500', -- Orange
fixme = '#FF69B4', -- Hot Pink
note = '#00CED1', -- Dark Turquoise
}
})
If you don't specify custom colors, the plugin will use these default colors:
- TODO: Dark Orange (
#FF8C00
) - FIXME: Red (
#FF0000
) - NOTE: Dodger Blue (
#1E90FF
)
- TODO comment
- FIXME comment
- NOTE Comment
The plugin supports comment highlighting for the following languages:
- Lua
- Python
- Shell scripts
- Ruby
- Perl
- Vim script
- YAML
- TOML
- INI
- SQL
- C
- C++
- Java
- JavaScript
- TypeScript
- PHP
- CSS
- HTML
- XML
For unsupported file types, the plugin defaults to C-style comments.
- Not file type dependant
I.E. the match for a python comment works on a typescript file too
- Not matching from the beginning
I.E.
// TODO: fix stuff
does the same as// fix stuff TODO
or as// this is TODO list is amazing
- More i haven't found
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.