Skip to content

nvim-zh/colorful-winsep.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

colorful-winsep.nvim

2024-02-22_12-43-34.mp4

configurable window separtor

Motivation

Currently in Neovim, we can not make the active window distinguishable via the window separator. This plugin will color the border of active window, like what tmux does for its different panes.

Requirements

Install

Using a plugin manager

Using vim-plug:

Plug 'nvim-zh/colorful-winsep.nvim'

Using Packer.nvim:

use {
    "nvim-zh/colorful-winsep.nvim",
    config = function ()
        require('colorful-winsep').setup()
    end
}

Using lazy.nvim

{
  "nvim-zh/colorful-winsep.nvim",
  config = true,
  event = { "WinLeave" },
}

Default configuration

require("colorful-winsep").setup({
  -- highlight for Window separator
  hi = {
    bg = "#16161E",
    fg = "#1F3442",
  },
  -- This plugin will not be activated for filetype in the following table.
  no_exec_files = { "packer", "TelescopePrompt", "mason", "CompetiTest", "NvimTree" },
  -- Symbols for separator lines, the order: horizontal, vertical, top left, top right, bottom left, bottom right.
  symbols = { "", "", "", "", "", "" },
  -- #70: https://github.com/nvim-zh/colorful-winsep.nvim/discussions/70
  only_line_seq = true,
  -- Smooth moving switch
  smooth = true,
  exponential_smoothing = true,
  anchor = {
    left = { height = 1, x = -1, y = -1 },
    right = { height = 1, x = -1, y = 0 },
    up = { width = 0, x = -1, y = 0 },
    bottom = { width = 0, x = 1, y = 0 },
 },
 light_pollution = function(lines) end,
})

TODO

  • add marquee(nvim_buf_add_highlight())

License

This plugin is released under the MIT License.

colorful-winsep.nvim