Skip to content

markosnarinian/ln.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

-- 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.

About

Smart line number toggling with sane defaults. Switches based on window focus, mode, and filetype with configurable events and excluded filetypes out of the box.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages