Skip to content

Djancyp/better-comments.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 

Repository files navigation

Better Comments - NVIM

Better comments helps you to organize your comments with highlights and virtual text.

DEMO

Demo

Installation

Requirement

in order to use this plugin you need to set up treesiter

nvim-treesitter/nvim-treesitter

Recommended Packer:

use "Djancyp/better-comments.nvim"

Setup

require('better-comment').Setup()

Configs

Default Config

tags = {
        {
            name = "TODO",
            fg = "white",
            bg = "#0a7aca",
            bold = true,
            virtual_text = "",
        },
        {
            name = "FIX",
            fg = "white",
            bg = "#f44747",
            bold = true,
            virtual_text = "This is virtual Text from FIX",
        },
        {
            name = "WARNING",
            fg = "#FFA500",
            bg = "",
            bold = false,
            virtual_text = "This is virtual Text from WARNING",
        },
        {
            name = "!",
            fg = "#f44747",
            bg = "",
            bold = true,
            virtual_text = "",
        }

    }

Overwrite defaults or add new Config

require('better-comment').Setup({
tags = {
       // TODO will overwrite
        {
            name = "TODO",
            fg = "white",
            bg = "#0a7aca",
            bold = true,
            virtual_text = "",
        },
       {
            name = "NEW",
            fg = "white",
            bg = "red",
            bold = false,
            virtual_text = "",
        },

    }
})

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Releases

No releases published

Packages

No packages published

Languages