• Stars
    star
    116
  • Rank 302,369 (Top 6 %)
  • Language
    Lua
  • Created about 2 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Nvim Plugin

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