A Neovim plugin hiding your colorcolumn when unneeded.
- The colorcolumn is hidden as default, but it appears after one of lines in the file exceeds the
colorcolumn
value you set. - The colorcolumn is hidden in the filetypes in
disabled_filetypes
.
- Install via your favorite package manager.
"m4xshen/smartcolumn.nvim"
use "m4xshen/smartcolumn.nvim"
Plug "m4xshen/smartcolumn.nvim"
- Setup the plugin in your
init.lua
.
require("smartcolumn").setup()
You can pass your config table into the setup()
function.
colorcolumn
: screen columns that are highlighted- type of the value: integer
- default value:
80
disabled_filetypes
: thecolorcolumn
will be disabled under the filetypes in this table- type of the value: table of strings
- default value:
{ "help", "text", "markdown" }
limit_to_window
: thecolorcolumn
will be displayed based on the visible lines in the window instead of all lines in the current buffer- type of the value: boolean
- default value:
false
local config = {
colorcolumn = 80,
disabled_filetypes = { "help", "text", "markdown" },
limit_to_window = false,
}