A colour column setter for nvim.
Using lazy.nvim
{
"MaggieLostKeys/nvim-ccutil",
event = {"BufEnter", "BufAdd"},
},
To change the default column width all languages that do not have an override will use, add a default_width
property to your opts
. Keep in mind that the value needs to be a string:
{
"MaggieLostKeys/nvim-ccutil",
event = {"BufEnter", "BufAdd"},
opts = {
default_width = "100", -- default: 80
}
},
If you want to default to no colour column, set default_width
to ""
.
By default, the colour column marks the last allowed column. You can offset the column by one by simply setting the column_marks_limit
property to true
. The column now marks the first past-the-end column.
{
"MaggieLostKeys/nvim-ccutil",
event = {"BufEnter", "BufAdd"},
opts = {
column_marks_limit = true, -- default: false
}
},
If you want to set a custom column width for a specific language or buffer type, add a type_override
table containing type-width-key pairs. To remove the colour column for a specific buffer type, set its width to ""
:
{
"MaggieLostKeys/nvim-ccutil",
event = {"BufEnter", "BufAdd"},
opts = {
type_overrides = {
swift = "120",
markdown = "200",
text = "", -- no column in text files
},
}
},
This plugin provides the CCUtilGetCurrentBufferType
command to print the current buffer type.