Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 843 Bytes

README.md

File metadata and controls

28 lines (21 loc) · 843 Bytes

NoTrailing.nvim

A simple Neovim plugin to highlight and remove trailing whitespace.

NOTE: This is just a PoC on creating a Lua Neovim plugin. You may consider to use autocmd BufWritePre * :%s/\s\+$//e instead.

Installation

-- using Lazy

{
    'aryklein/NoTrailing.nvim'
    cmd = {"TrailingTrim", "TrailingHighlightToggle"},
    config = function ()
        require('NoTrailing').setup({
            -- configuration options and defaults

            -- `highlight` configures which highlight is used to display the trailing whitespaces
            highlight = "Search",

            -- `exclude_filetypes` configures which filetypes to exclude when displaying trailing whitespaces
            exclude_filetypes = {"Telescope", "help", "lazy", "packer", "dashboard", "NvimTree", "Trouble"},
        })
    end
}