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
- Display focused ColorColumn/s at the desired position
- Set custom ColorColumn value/s for certain filetypes
- Exclude specific filetypes from the ColorColumn
- Toggle NeoColumn on and off
- Customizable colors
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
- Install via your favorite package manager.
{
"ecthelionvi/NeoColumn.nvim",
opts = {}
},
use "ecthelionvi/NeoColumn.nvim"
- Setup the plugin in your
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 theIncSearch
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 theIncSearch
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 defaultfalse
(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" },
}