oatish / smartcolumn.nvim

A Neovim plugin hiding your colorcolumn when unneeded.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

smartcolumn.nvim

Stargazers Issues Contributors

demo

๐Ÿ“ƒ Introduction

A Neovim plugin hiding your colorcolumn when unneeded.

โš™๏ธ Functions

  • The colorcolumn is hidden as default, but it appears after one of lines in the file exceeds the colorcolumn value you set.
  • The colorcolumn is hidden in the filetypes in disabled_filetypes.

๐Ÿ“ฆ Installation

  1. Install via your favorite package manager.
"m4xshen/smartcolumn.nvim"
use "m4xshen/smartcolumn.nvim"
Plug "m4xshen/smartcolumn.nvim"
  1. Setup the plugin in your init.lua.
require("smartcolumn").setup()

๐Ÿ”ง Configuration

You can pass your config table into the setup() function.

  • colorcolumn: screen columns that are highlighted
    • type of the value: integer
    • default value: 80
  • disabled_filetypes: the colorcolumn will be disabled under the filetypes in this table
    • type of the value: table of strings
    • default value: { "help", "text", "markdown" }
  • limit_to_window: the colorcolumn will be displayed based on the visible lines in the window instead of all lines in the current buffer
    • type of the value: boolean
    • default value: false

Default config

local config = {
   colorcolumn = 80,
   disabled_filetypes = { "help", "text", "markdown" },
   limit_to_window = false,
}

About

A Neovim plugin hiding your colorcolumn when unneeded.

License:MIT License


Languages

Language:Lua 100.0%