Skip to content

Show a custom splash screen in a floating window

License

Notifications You must be signed in to change notification settings

jovanlanik/fsplash.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

fsplash.nvim (floating splash screen)

Show a custom splash screen in a floating window.

screenshot

Install

First install using your favorite package manager:

  • packer.nvim: use 'jovanlanik/fsplash'
  • paq-nvim: 'jovanlanik/fsplash'
  • lazy.nvim: 'jovanlanik/fsplash'
  • vim-plug: Plug 'jovanlanik'

Then setup fsplash in your config:

require('fsplash').setup()

Configure

The setup function accepts the following options:

require('fsplash').setup({
    -- lines of text containing the splash
	lines = {
		' _  ___   _____ __  __ ';
		'| \\| \\ \\ / /_ _|  \\/  |';
		'| .` |\\ V / | || |\\/| |';
		'|_|\\_| \\_/ |___|_|  |_|';
	};
    -- autocmds that close the splash
	autocmds = {
		'ModeChanged';
		'CursorMoved';
		'TextChanged';
		'VimResized';
		'WinScrolled';
	};
    -- highlights in this table will be set using vim.api.nvim_set_hl()
	highlights = {
        -- this resets NormalFloat
		['NormalFloat'] = {};
        -- the following line would set it to gray
        -- ['NormalFloat'] = { ctermfg = 'darkgray' };
	};
    -- floting window border
	border = 'solid';
    -- winblend option
	winblend = 0;
})

Third-party Integrations

resession.nvim

fsplash has built-in support for playing nicely with resession.nvim session manager which simply makes sure the fsplash window is closed before saving/loading a session. You can enable the extension when you set up resession.nvim:

require('resession').setup({
    extensions = {
        fsplash = {}
    }
})