A Neovim plugin hiding your colorcolumn when unneeded.
The colorcolumn is hidden as default, but it appears after one of lines in the scope exceeds the colorcolumn
value you set.
You can:
{
"m4xshen/smartcolumn.nvim",
opts = {}
},
use "m4xshen/smartcolumn.nvim"
Plug "m4xshen/smartcolumn.nvim"
init.lua
. This step is not needed with lazy.nvim if opts
is set as above.require("smartcolumn").setup()
You can pass your config table into the setup()
function or opts
if you use lazy.nvim.
The available options:
colorcolumn
(strings or table) : screen columns that are highlighted"80"
(default){ "80", "100" }
disabled_filetypes
(table of strings) : the colorcolumn
will be disabled under the filetypes in this table{ "help", "text", "markdown" }
(default){ "NvimTree", "lazy", "mason", "help" }
scope
(strings): the plugin only checks whether the lines within scope exceed colorcolumn"file"
(default): current file"window"
: visible part of current window"line"
: current linecustom_colorcolumn
(table): custom colorcolumn
values for different filetype{}
(default){ ruby = "120", java = { "180", "200"} }
local config = {
colorcolumn = "80",
disabled_filetypes = { "help", "text", "markdown" },
custom_colorcolumn = {},
scope = "file",
}