Skip to content

Latest commit

 

History

History
79 lines (66 loc) · 1.41 KB

README.md

File metadata and controls

79 lines (66 loc) · 1.41 KB

How it works

See the demo video.

Install/setup

Example with packer.nvim

use { 'clarkwang/nvim-comment-toggler',
    config = function()
        require'comment-toggler'.setup{
            default_key = '#',
            filetypes = {
                c = {
                    marker = '//',
                },
                lua = {},
                python = {},
                sh = {},
                tmux = {},
                yaml = {},
            },
        }
    end,
}

Example with lazy.nvim

plugins = {
    ...

    { 'clarkwang/nvim-comment-toggler',
        opts = {
            default_key = '#',
            filetypes = {
                c = {
                    marker = '//',
                },
                lua = {},
                python = {},
                sh = {},
                tmux = {},
                yaml = {},
            },
        },
    }
    
    ...
}

require'lazy'.setup(plugins, { lazy.nvim opts here })

Manual

require'comment-toggler'.setup{
    default_key = '#',
    filetypes = {
        c = {
            marker = '//',
        },
        lua = {},
        python = {},
        sh = {},
        tmux = {},
        vim = { key = '"' }
        yaml = {},
    },
}