Skip to content

Commit

Permalink
style(nvim): set feline colors to match tokyonight
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarter committed Apr 28, 2022
1 parent 9a3139f commit 9f18241
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 3 deletions.
60 changes: 60 additions & 0 deletions config/nvim/lua/plugins/feline.lua
Original file line number Diff line number Diff line change
@@ -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
10 changes: 7 additions & 3 deletions config/nvim/lua/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand Down

0 comments on commit 9f18241

Please sign in to comment.