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

https://github.com/markosnarinian/ln.nvim

Smart line numbers for Neovim
https://github.com/markosnarinian/ln.nvim

autocmd line-numbers lua neovim neovim-plugin nvim nvim-plugin relative-line-numbers window-focus

Last synced: 18 days ago
JSON representation

Smart line numbers for Neovim

Awesome Lists containing this project

README

          

# ln.nvim

Automatically switches between relative and absolute line numbers based on context. The active window shows relative line numbers for easy motion; inactive windows show absolute line numbers for reference.

## Installation

### With lazy.nvim

```lua
-- default configuration
{
"markosnarinian/ln.nvim",
opts = {
absolute_events = { "WinLeave", "InsertEnter", "TermEnter", "CmdlineEnter" },
relative_events = { "WinEnter", "InsertLeave", "TermLeave", "CmdlineLeave" },
exclude = {
"TelescopePrompt",
"lazy",
"mason",
"checkhealth",
"help",
"Trouble",
"fzf",
"toggleterm",
"startify",
"undotree",
"dashboard",
"snacks_dashboard",
"aerial",
},
},
}
```

You can add or remove any standard Neovim autocmd events from either list to customise when each mode activates.
You can also add or remove buffer types and file types from the exclude list as you like.

# Contributing

All contributions are welcome! I promise that I will take the time to review your PR.