diff --git a/config/nvim/lua/plugins/feline.lua b/config/nvim/lua/plugins/feline.lua new file mode 100644 index 00000000..2655b3b3 --- /dev/null +++ b/config/nvim/lua/plugins/feline.lua @@ -0,0 +1,60 @@ +local present, feline = pcall(require, 'feline') + +if not present then + return +end + +local M = {} + +M.setup = function() + local tokyonight_colors = require('tokyonight.colors').setup { style = 'storm' } + + local colors = { + bg = tokyonight_colors.bg_statusline, + fg = tokyonight_colors.fg, + yellow = tokyonight_colors.yellow, + cyan = tokyonight_colors.cyan, + darkblue = tokyonight_colors.blue0, + green = tokyonight_colors.green, + orange = tokyonight_colors.orange, + violet = tokyonight_colors.purple, + magenta = tokyonight_colors.magenta, + blue = tokyonight_colors.blue, + red = tokyonight_colors.red, + light_bg = tokyonight_colors.bg_highlight, + primary_blue = tokyonight_colors.blue5, + } + + local vi_mode_colors = { + NORMAL = colors.primary_blue, + OP = colors.primary_blue, + INSERT = colors.yellow, + VISUAL = colors.magenta, + LINES = colors.magenta, + BLOCK = colors.magenta, + REPLACE = colors.red, + ['V-REPLACE'] = colors.red, + ENTER = colors.cyan, + MORE = colors.cyan, + SELECT = colors.orange, + COMMAND = colors.blue, + SHELL = colors.green, + TERM = colors.green, + NONE = colors.green, + } + + feline.setup { + theme = colors, + vi_mode_colors = vi_mode_colors, + force_inactive = { + filetypes = { + 'NvimTree', + 'packer', + 'fugitive', + 'fugitiveblame', + }, + }, + } +end + +return M diff --git a/config/nvim/lua/plugins/init.lua b/config/nvim/lua/plugins/init.lua index f99ca908..c0151b82 100644 --- a/config/nvim/lua/plugins/init.lua +++ b/config/nvim/lua/plugins/init.lua @@ -89,10 +89,14 @@ return packer.startup(function(use) -- status line use { 'feline-nvim/feline.nvim', - requires = { 'lewis6991/gitsigns.nvim', 'kyazdani42/nvim-web-devicons' }, - after = 'nvim-web-devicons', + requires = { + 'lewis6991/gitsigns.nvim', + 'kyazdani42/nvim-web-devicons', + -- for creating a theme + 'folke/tokyonight.nvim', + }, config = function() - require('feline').setup() + require('plugins.feline').setup() end, }