Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/ecthelionvi/NeoColumn.nvim

Neovim plugin that highlights individual characters with a toggleable ColorColumn.
https://github.com/ecthelionvi/NeoColumn.nvim

colorcolumn lua neovim neovim-plugin nvim nvim-plugin

Last synced: about 1 month ago
JSON representation

Neovim plugin that highlights individual characters with a toggleable ColorColumn.

Lists

README

        


🌈 NeoColumn.nvim



Lua


Neovim

![demo](https://raw.githubusercontent.com/ecthelionvi/Images/main/NeoColumn.gif)

## 📢 Introduction

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

## ✨ Features

- 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

## 💾 Persistence

NeoColumn maintains the ColorColumn settings for each file, including visibility and position, across sessions.

## 🛠️ Usage

To toggle NeoColumn on/off, you can use the `ToggleNeoColumn` command:

```vim
:ToggleNeoColumn
```
You can also create a keybinding to toggle NeoColumn more conveniently:

```lua
vim.keymap.set("n", "h", "ToggleNeoColumn", { noremap = true, silent = true })
```

To clear the list of enabled/disabled files in NeoColumn, you can use the `ClearNeoColumn` command:

```vim
:ClearNeoColumn
```

## 📦 Installation

1. Install via your favorite package manager.

- [lazy.nvim](https://github.com/folke/lazy.nvim)
```Lua
{
"ecthelionvi/NeoColumn.nvim",
opts = {}
},
```

- [packer.nvim](https://github.com/wbthomason/packer.nvim)
```Lua
use "ecthelionvi/NeoColumn.nvim"
```

2. 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.
```Lua
require("NeoColumn").setup()
```

## 🔧 Configuration

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)

### Default Config

```Lua
local config = {
fg_color = "",
bg_color = "",
NeoColumn = "80",
always_on = false,
custom_NeoColumn = {},
excluded_ft = { "text", "markdown" },
}
```