NeoColumn is a Neovim plugin that shows a focused ColorColumn at a specific position to manage line length. It highlights individual characters, minimizing clutter and enhancing readability
NeoColumn maintains the ColorColumn settings for each file, including visibility and position, across sessions.
To toggle NeoColumn on/off, you can use the ToggleNeoColumn
command:
:ToggleNeoColumn
You can also create a keybinding to toggle NeoColumn more conveniently:
vim.keymap.set("n", "<leader>h", "<cmd>ToggleNeoColumn<cr>", { noremap = true, silent = true })
To clear the list of enabled/disabled files in NeoColumn, you can use the ClearNeoColumn
command:
:ClearNeoColumn
{
"ecthelionvi/NeoColumn.nvim",
opts = {}
},
use "ecthelionvi/NeoColumn.nvim"
init.lua
. Skip this step if you're fine with the default settings or using lazy.nvim with opts set as above.require("NeoColumn").setup()
You can pass your config table into the setup()
function or opts
if you use lazy.nvim.
The available options:
fg_color
(string) : foreground color of the ColorColumn as a hex code (e.g., "#FF0000"
) ""
(default, falls back to the foreground color of the IncSearch
highlight group)bg_color
(string) : background color of the ColorColumn as a hex code (e.g., "#00FF00"
)""
(default, falls back to the background color of the IncSearch
highlight group)NeoColumn
(string / table) : character position at which the ColorColumn/s appears"80"
(default){ "80", "100" }
always_on
(boolean) : switch on/off the ColorColumn by default false
(default)custom_NeoColumn
(table) : custom ColorColumn values for specific filetypes {}
(default){ ruby = "120", java = { "180", "200"} }
excluded_ft
(table) : filetypes to exclude from the ColorColumn { "text", "markdown" }
(default)local config = {
fg_color = "",
bg_color = "",
NeoColumn = "80",
always_on = false,
custom_NeoColumn = {},
excluded_ft = { "text", "markdown" },
}