From ce4d61699a8866b24c6bd7f4f8a5c294563ff41b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 3 Jun 2025 22:57:40 +0200 Subject: [PATCH] theme fixes --- lua/plugins/incline.lua | 30 +++++++++++++++++++++++ lua/plugins/lualine.lua | 54 +++-------------------------------------- lua/themes/kanagawa.lua | 5 ++-- 3 files changed, 37 insertions(+), 52 deletions(-) create mode 100644 lua/plugins/incline.lua diff --git a/lua/plugins/incline.lua b/lua/plugins/incline.lua new file mode 100644 index 0000000..bb51c56 --- /dev/null +++ b/lua/plugins/incline.lua @@ -0,0 +1,30 @@ +return { + 'b0o/incline.nvim', + config = function() + local helpers = require('incline.helpers') + local devicons = require('nvim-web-devicons') + require('incline').setup({ + window = { + padding = 0, + margin = { horizontal = 0 }, + }, + render = function(props) + local filename = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(props.buf), ':t') + if filename == '' then + filename = '[No Name]' + end + local ft_icon, ft_color = devicons.get_icon_color(filename) + local modified = vim.bo[props.buf].modified + return { + ft_icon and { ' ', ft_icon, ' ', guibg = ft_color, guifg = helpers.contrast_color(ft_color) } or '', + ' ', + { filename, gui = modified and 'bold,italic' or 'bold' }, + ' ', + guibg = '#44406e', + } + end, + }) + end, + -- Optional: Lazy load Incline + event = 'VeryLazy', +} diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 5bb3171..0ff9aeb 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -5,7 +5,6 @@ return { 'Isrothy/lualine-diagnostic-message', }, config = function() - vim.opt.laststatus = 3 require('lualine').setup({ options = { theme = 'auto', @@ -14,6 +13,7 @@ return { winbar = { 'dap-repl', 'dapui_console' }, }, section_separators = { left = '', right = '' }, + component_separators = { left = '', right = '' }, }, globalstatus = true, extensions = { 'oil', 'toggleterm' }, @@ -55,53 +55,6 @@ return { }, }, }, - winbar = { - lualine_a = { - { - 'filename', - path = 0, - file_status = true, - separator = { left = '', right = '' }, - }, - }, - lualine_b = { - { - 'filesize', - }, - { - 'diagnostic-message', - icons = { - error = ' ', - warn = ' ', - info = ' ', - hint = ' ', - }, - }, - }, - lualine_c = {}, - lualine_x = {}, - lualine_y = {}, - lualine_z = {}, - }, - inactive_winbar = { - lualine_a = { - { - 'filename', - path = 0, - file_status = true, - separator = { left = '', right = '' }, - }, - }, - lualine_b = { - { - 'filesize', - }, - }, - lualine_c = {}, - lualine_x = {}, - lualine_y = {}, - lualine_z = {}, - }, tabline = { lualine_a = {}, lualine_b = {}, @@ -111,8 +64,8 @@ return { mode = 2, tabs_color = { -- Same values as the general color option can be used here. - active = { bg = 'yellow', fg = 'black' }, - inactive = { bg = 'grey' }, + active = { bg = 'orange', fg = 'black' }, + inactive = { bg = 'grey', fg = 'black' }, }, }, }, @@ -122,4 +75,5 @@ return { }, }) end, + enabled = true, } diff --git a/lua/themes/kanagawa.lua b/lua/themes/kanagawa.lua index 10ba21b..ff6715a 100644 --- a/lua/themes/kanagawa.lua +++ b/lua/themes/kanagawa.lua @@ -1,6 +1,7 @@ return { 'rebelot/kanagawa.nvim', lazy = false, + priority = 1000, config = function() require('kanagawa').setup({ compile = false, -- enable compiling the colorscheme @@ -11,7 +12,7 @@ return { statementStyle = { bold = true }, typeStyle = {}, transparent = false, -- do not set background color - dimInactive = true, -- dim inactive window `:h hl-NormalNC` + dimInactive = false, -- dim inactive window `:h hl-NormalNC` terminalColors = true, -- define vim.g.terminal_color_{0,17} colors = { -- add/modify theme and palette colors @@ -33,7 +34,7 @@ return { light = 'lotus', }, }) - vim.cmd('colorscheme kanagawa') + require('kanagawa').load('wave') end, enabled = true, }