nvim: replace statusline within incline

This commit is contained in:
Daniel Lundin 2024-03-27 23:19:10 +01:00
parent 7c10a8bbb0
commit 8b1ee883d8
6 changed files with 124 additions and 85 deletions

View file

@ -1,26 +1,27 @@
{
"LazyVim": { "branch": "main", "commit": "c91982a8bca120857f24f0eb0dd9bdcc7d574f50" },
"LazyVim": { "branch": "main", "commit": "c901640167ec5b123ff8524b01518c9a370a0d31" },
"LuaSnip": { "branch": "master", "commit": "a7a4b4682c4b3e2ba82b82a4e6e5f5a0e79dec32" },
"SchemaStore.nvim": { "branch": "main", "commit": "f87d415b51e67703cd3600d4bcde59a7a75171f4" },
"SchemaStore.nvim": { "branch": "main", "commit": "4ce271f0db8b5224b4d69a43a75c13f5b4dcba43" },
"alabaster.nvim": { "branch": "main", "commit": "ab61b9d3b7398e6c8ebd5207f609c24ebb37ebeb" },
"catppuccin": { "branch": "main", "commit": "9be7fcdff77b9a175ea7def77f6df0260971a15f" },
"catppuccin": { "branch": "main", "commit": "f66654d5d5190865333e8e46474c1593302c558e" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-emoji": { "branch": "main", "commit": "e8398e2adf512a03bb4e1728ca017ffeac670a9f" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"colorbuddy.nvim": { "branch": "master", "commit": "9e96ccd88f4510d0a54ce1d5c11119eac9fb217e" },
"conform.nvim": { "branch": "master", "commit": "bf109f061fc3cd75394b7823923187ae045cbf22" },
"conform.nvim": { "branch": "master", "commit": "f9523f75134614fc0eff29c2377ed36603a1b0aa" },
"copilot-cmp": { "branch": "master", "commit": "72fbaa03695779f8349be3ac54fa8bd77eed3ee3" },
"copilot.lua": { "branch": "master", "commit": "f7612f5af4a7d7615babf43ab1e67a2d790c13a6" },
"crates.nvim": { "branch": "main", "commit": "b4f4987ccdb1cc3899ee541ef4375c73c48c4570" },
"dashboard-nvim": { "branch": "master", "commit": "354e7bd0ad62f6e8b5ab9394b1ec7dbcaaa1470c" },
"dashboard-nvim": { "branch": "master", "commit": "39f308a0b845b8da46f83c8a2d69f0191d4b7a8f" },
"dressing.nvim": { "branch": "master", "commit": "18e5beb3845f085b6a33c24112b37988f3f93c06" },
"friendly-snippets": { "branch": "main", "commit": "dcd4a586439a1c81357d5b9d26319ae218cc9479" },
"gitsigns.nvim": { "branch": "main", "commit": "078041e9d060a386b0c9d3a8c7a7b019a35d3fb0" },
"headlines.nvim": { "branch": "master", "commit": "618ef1b2502c565c82254ef7d5b04402194d9ce3" },
"incline.nvim": { "branch": "main", "commit": "a03020c920a55b75d82ac54c9da18cbf52e8c4d8" },
"indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" },
"lazy.nvim": { "branch": "main", "commit": "af6afefbb46ab29a8a1db69536b04290a9403876" },
"lazy.nvim": { "branch": "main", "commit": "65887ea871d44822bff47504202b3643f29d614e" },
"lualine.nvim": { "branch": "master", "commit": "b5e8bb642138f787a2c1c5aedc2a78cb2cebbd67" },
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "9dfcf2036c223920826140f0151d929a43f9eceb" },
@ -31,10 +32,10 @@
"mini.comment": { "branch": "main", "commit": "a4b7e46deb9ad2feb8902cc5dbf087eced112ee5" },
"mini.indentscope": { "branch": "main", "commit": "cf07f19e718ebb0bcc5b00999083ce11c37b8d40" },
"mini.surround": { "branch": "main", "commit": "a1b590cc3b676512de507328d6bbab5e43794720" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "8afbb06081ce1e4beb5b18945d14a608b10babeb" },
"neoconf.nvim": { "branch": "main", "commit": "9a419c4fa772c4c61839a8f7fdd8e863679a8c94" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "16d1b194376bf1fc2acd89ccb3c29ba8315bfcea" },
"neoconf.nvim": { "branch": "main", "commit": "ef304c29977b85c99382fcba821b3f710e144a74" },
"neodev.nvim": { "branch": "main", "commit": "6a533ed9d3435dcaa456380d833ea04da37ea2ed" },
"noice.nvim": { "branch": "main", "commit": "d29b26c329558ee4bb2e7f3cc25078929ef89b2f" },
"noice.nvim": { "branch": "main", "commit": "0cbe3f88d038320bdbda3c4c5c95f43a13c3aa12" },
"none-ls.nvim": { "branch": "main", "commit": "18910d09d21d7df339805343bfe4a2b2e41c057b" },
"nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" },
"nvim-cmp": { "branch": "main", "commit": "97dc716fc914c46577a4f254035ebef1aa72558a" },
@ -48,21 +49,21 @@
"nvim-nio": { "branch": "master", "commit": "33c62b3eadd8154169e42144de16ba4db6784bec" },
"nvim-noirbuddy": { "branch": "master", "commit": "9cb20d2a649153d07649c9c85c092c0533d4883d" },
"nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" },
"nvim-spectre": { "branch": "master", "commit": "31f62d7fc30257b2a5c5327ff7b47719da37a1b4" },
"nvim-treesitter": { "branch": "master", "commit": "aa31b8d4ccaa05e1ab30120e103f72adbd2837bc" },
"nvim-spectre": { "branch": "master", "commit": "2b012554a2536465243c0dff3605b5927c49ed23" },
"nvim-treesitter": { "branch": "master", "commit": "07a404570f3d912afdfe92bbf74ff55886293369" },
"nvim-treesitter-context": { "branch": "master", "commit": "f19766163c18515fb4d3c12d572bf9cba6cdb990" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "d2a4ffc22d9d38d44edb73da007b3cf43451e9b4" },
"nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "7ab799a9792f7cf3883cf28c6a00ad431f3d382a" },
"nvim-web-devicons": { "branch": "master", "commit": "6662f059bf78e6092ba90cd1929599625f448f55" },
"nvim-web-devicons": { "branch": "master", "commit": "3ee60deaa539360518eaab93a6c701fe9f4d82ef" },
"persistence.nvim": { "branch": "main", "commit": "4982499c1636eac254b72923ab826ee7827b3084" },
"plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" },
"rustaceanvim": { "branch": "master", "commit": "ff658ba1da85498135e02300797466a447754ff0" },
"rustaceanvim": { "branch": "master", "commit": "c2cdbeca8674e1b1b66ba870ff502bdad55a6d8a" },
"sqlite.lua": { "branch": "master", "commit": "40701b6151f8883980c1548647116de39b763540" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
"telescope.nvim": { "branch": "master", "commit": "c2b8311dfacd08b3056b8f0249025d633a4e71a8" },
"todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" },
"tokyonight.nvim": { "branch": "main", "commit": "623c3cd60a8081b68edcaf544856c053249a659e" },
"todo-comments.nvim": { "branch": "main", "commit": "a7e39ae9e74f2c8c6dc4eea6d40c3971ae84752d" },
"tokyonight.nvim": { "branch": "main", "commit": "f4b415bfbce390866a83277db42cf6aa94230728" },
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
"vim-illuminate": { "branch": "master", "commit": "305bf07b919ac526deb5193280379e2f8b599926" },
"vim-startuptime": { "branch": "master", "commit": "ac2cccb5be617672add1f4f3c0a55ce99ba34e01" },

View file

@ -4,6 +4,7 @@
local opt = vim.opt
opt.number = true
opt.relativenumber = false
opt.clipboard = "unnamedplus"
@ -28,3 +29,11 @@ vim.api.nvim_create_autocmd("dirchanged", {
pattern = "*",
command = 'call chansend(v:stderr, printf("\\033]7;%s\\033", v:event.cwd))',
})
-- (No) Statusline
vim.opt.laststatus = 0
vim.api.nvim_set_hl(0, "Statusline", { link = "Normal" })
vim.api.nvim_set_hl(0, "StatuslineNC", { link = "Normal" })
local line = string.rep("", vim.api.nvim_win_get_width(0))
vim.opt.statusline = "%#WinSeparator#" .. line .. "%*"

View file

@ -1,29 +1,4 @@
return {
-- {
-- "kvrohit/rasmus.nvim",
-- dependencies = {
-- { "tjdevries/colorbuddy.nvim" },
-- },
-- lazy = false,
-- priority = 1000,
-- config = function()
-- vim.g.rasmus_variant = "monochrome"
-- vim.g.rasmus_bold_functions = true
-- vim.g.rasmus_bold_comments = false
-- vim.g.rasmus_italic_comments = true
-- vim.g.rasmus_transparent = true
--
-- -- vim.cmd("colorscheme rasmus")
-- end,
-- },
-- {
-- "LazyVim/LazyVim",
-- opts = {
-- colorscheme = "default",
-- },
-- },
{
"p00f/alabaster.nvim",
lazy = false,
@ -73,24 +48,24 @@ return {
Color.new("normal", "#e3e0cd")
Group.new("Normal", colors.normal, nil)
Color.new("WinSeparator", "#446688")
Group.new("WinSeparator", colors.WinSeparator, nil)
Color.new("string", "#D7CCC8")
Color.new("symbol", "#ECEFF1")
--
Color.new("comment", "#E57373", nil, styles.italic)
Color.new("hlargs", "#FFF8E1")
--
Color.new("illuminate_bg", "#112210")
Color.new("illuminate_fg", "#00d992")
--
-- Color.new("search_bg", "#554411")
-- Color.new("search_fg", "#FFF0C0")
--
Color.new("search_bg", "#223311")
Color.new("search_fg", "#CCFF33")
--
Color.new("MiniIndentscopeSymbol", "#00d992")
Group.new("MiniIndentscopeSymbol", colors.MiniIndentscopeSymbol)
--
Color.new("CursorFg", "#000000", styles.nocombine)
Color.new("CursorBg", "#23fdb6", styles.nocombine)
Group.new("Cursor", colors.CursorFg, colors.CursorBg)
@ -141,7 +116,7 @@ return {
Color.new("PmenuSelBg", "#335a88", styles.nocombine)
Group.new("PmenuSel", colors.PmenuSelFg, colors.PmenuSelBg)
Color.new("TreesitterContext", "#233344", styles.nocombine)
Color.new("TreesitterContext", "#242e38", styles.nocombine)
Group.new("TreesitterContext", nil, colors.TreesitterContext)
-- Color.new("NonText", "#955252", styles.nocombine)
@ -157,6 +132,12 @@ return {
Color.new("spelling", "#ffce60")
Group.new("SpellBad", colors.spelling, nil, styles.undercurl)
-- Color.new("LuaLineFg", "#aebed0")
Color.new("InclineFg", "#aebed0")
Color.new("InclineBg", "#242e38")
Group.new("InclineNormal", colors.InclineFg, colors.InclineBg)
Group.new("InclineNormalNC", colors.InclineFg, colors.InclineBg)
Color.new("LspInfoTitle", "#955252")
Group.new("LspInfoTitle", colors.LspInfoTitle, nil, styles.italic)
-- Group.new("DiagnosticHint", colors.LspInfoTitle, nil, styles.italic)
@ -170,38 +151,37 @@ return {
--
Color.new("Error", "#ffce60", styles.nocombine)
Group.new("ErrorMsg", colors.Error)
--
Color.new("FlashLabelFg", "#220011")
Color.new("FlashLabelBg", "#EA1199")
Group.new("FlashLabel", colors.FlashLabelFg, colors.FlashLabelBg)
--
Group.new("TelescopeTitle", colors.primary)
Group.new("TelescopeBorder", colors.secondary)
Group.new("@comment", colors.comment, nil, styles.italic + styles.bold)
Group.new("@string", colors.string, nil, styles.italic)
--
Group.new("@keyword", colors.noir_2)
Group.new("@keyword.function", colors.noir_2)
Group.new("@keyword.return", colors.noir_1)
--
Group.new("@operator", colors.noir_1)
Group.new("@keyword.operator", colors.noir_1)
-- Group.new("Hlargs", colors.noir_3, nil, styles.italic)
Group.new("@type.builtin", colors.noir_2)
--
Group.new("@variable", colors.symbol, nil)
Group.new("Hlargs", colors.hlargs, nil)
--
Group.new("@function", colors.noir_1, nil, styles.bold)
Group.new("@method", colors.noir_1, nil, styles.bold)
--
Group.new("@punctuation", colors.noir_4)
Group.new("@punctuation.bracket", colors.noir_4)
Group.new("@punctuation.delimiter", colors.noir_4)
--
Group.new("IlluminatedWordText", colors.illuminate_fg, colors.illuminate_bg)
--
Group.new("Search", colors.search_fg, colors.search_bg, styles.italic + styles.undercurl)
Group.new("IncSearch", colors.search_fg, colors.search_bg)
end,

View file

@ -24,6 +24,16 @@ return {
end,
},
{
"nvim-neo-tree/neo-tree.nvim",
opts = {
window = {
width = 30,
position = "right",
},
},
},
{
"simrat39/rust-tools.nvim",
enabled = false,

View file

@ -0,0 +1,65 @@
return {
"b0o/incline.nvim",
config = function()
local devicons = require("nvim-web-devicons")
require("incline").setup({
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 function get_git_diff()
local icons = { removed = "", changed = "", added = "" }
local signs = vim.b[props.buf].gitsigns_status_dict
local labels = {}
if signs == nil then
return labels
end
for name, icon in pairs(icons) do
if tonumber(signs[name]) and signs[name] > 0 then
table.insert(labels, { icon .. signs[name] .. " ", group = "Diff" .. name })
end
end
if #labels > 0 then
table.insert(labels, { "" })
end
return labels
end
local function get_diagnostic_label()
local icons = { error = "", warn = "󰀪 ", info = "", hint = "󰌶 " }
local label = {}
for severity, icon in pairs(icons) do
local n = #vim.diagnostic.get(
props.buf,
{ severity = vim.diagnostic.severity[string.upper(severity)] }
)
if n > 0 then
table.insert(label, { icon .. n .. " ", group = "DiagnosticSign" .. severity })
end
end
if #label > 0 then
table.insert(label, { "", guifg = "#0d1117" })
end
return label
end
local bg_color = "#242e38"
return {
{ "", guibg = bg_color, guifg = "#0d1117" },
{ get_diagnostic_label(), guibg = bg_color },
{ " ", guibg = bg_color },
{ get_git_diff() },
-- { (ft_icon or "") .. " ", guifg = ft_color, guibg = "none" },
{ filename .. " ", gui = "italic" },
}
end,
})
end,
-- Optional: Lazy load Incline
event = "VeryLazy",
}

View file

@ -79,32 +79,6 @@ return {
{
"nvim-lualine/lualine.nvim",
dependencies = {
"jesseleite/nvim-noirbuddy",
"nvim-tree/nvim-web-devicons",
},
config = function()
-- Option 1:
local noirbuddy_lualine = require("noirbuddy.plugins.lualine")
local theme = noirbuddy_lualine.theme
-- optional, you can define those yourself if you need
local sections = noirbuddy_lualine.sections
local inactive_sections = noirbuddy_lualine.inactive_sections
require("lualine").setup({
options = {
icons_enabled = true,
theme = theme,
filetype = { colored = false },
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
disabled_filetypes = {},
always_divide_middle = true,
},
sections = sections,
inactive_sections = inactive_sections,
})
end,
enabled = false,
},
}