diff --git a/config/nvim/lua/aleidk/constants.lua b/config/nvim/lua/aleidk/constants.lua new file mode 100644 index 0000000..2575ba6 --- /dev/null +++ b/config/nvim/lua/aleidk/constants.lua @@ -0,0 +1,62 @@ +return { + icons = { + misc = { + pint = " ", + }, + dap = { + Stopped = { "󰁕 ", "DiagnosticWarn", "DapStoppedLine" }, + Breakpoint = " ", + BreakpointCondition = " ", + BreakpointRejected = { " ", "DiagnosticError" }, + LogPoint = ".>", + }, + diagnostics = { + Error = " ", + Warn = " ", + Hint = " ", + Info = " ", + }, + git = { + added = " ", + modified = " ", + removed = " ", + }, + kinds = { + Array = " ", + Boolean = " ", + Class = " ", + Color = " ", + Constant = " ", + Constructor = " ", + Copilot = " ", + Enum = " ", + EnumMember = " ", + Event = " ", + Field = " ", + File = " ", + Folder = " ", + Function = " ", + Interface = " ", + Key = " ", + Keyword = " ", + Method = " ", + Module = " ", + Namespace = " ", + Null = " ", + Number = " ", + Object = " ", + Operator = " ", + Package = " ", + Property = " ", + Reference = " ", + Snippet = " ", + String = " ", + Struct = " ", + Text = " ", + TypeParameter = " ", + Unit = " ", + Value = " ", + Variable = " ", + }, + }, +} diff --git a/config/nvim/lua/aleidk/plugins/bufferline.lua b/config/nvim/lua/aleidk/plugins/bufferline.lua new file mode 100644 index 0000000..bc3afde --- /dev/null +++ b/config/nvim/lua/aleidk/plugins/bufferline.lua @@ -0,0 +1,57 @@ +return { + "akinsho/bufferline.nvim", + event = "VeryLazy", + after = "onedark", + keys = { + { "bp", "BufferLineTogglePin", desc = "Toggle pin" }, + { "bP", "BufferLineGroupClose ungrouped", desc = "Delete non-pinned buffers" }, + { "", "BufferLineCyclePrev", desc = "Prev buffer" }, + { "", "BufferLineCycleNext", desc = "Next buffer" }, + }, + dependencies = { + { + "echasnovski/mini.bufremove", + -- stylua: ignore + keys = { + { "bd", function() require("mini.bufremove").delete(0, false) end, desc = "Delete Buffer" }, + { "bD", function() require("mini.bufremove").delete(0, true) end, desc = "Delete Buffer (Force)" }, + }, + }, + }, + config = function() + opts = { + highlights = { separator = { bg = "NONE" } }, + options = { + -- FIXME: Doesn't work with onedark pro colorscheme + -- separator_style = "padded_slant", + -- themable = true, + close_command = function(n) + require("mini.bufremove").delete(n, false) + end, + -- stylua: ignore + right_mouse_command = function(n) require("mini.bufremove").delete(n, false) end, + diagnostics = "nvim_lsp", + diagnostics_indicator = function(_, _, diag) + local icons = require("aleidk.constants").icons.diagnostics + local ret = (diag.error and icons.Error .. diag.error .. " " or "") + .. (diag.warning and icons.Warn .. diag.warning or "") + return vim.trim(ret) + end, + offsets = { + { + filetype = "NvimTree", + -- text = "nvim-tree", + highlight = "Directory", + text_align = "left", + }, + }, + groups = { + items = { + require("bufferline.groups").builtin.pinned:with({ icon = "" }), + }, + }, + }, + } + require("bufferline").setup(opts) + end, +} diff --git a/config/nvim/lua/aleidk/plugins/heirline.lua b/config/nvim/lua/aleidk/plugins/heirline.lua deleted file mode 100644 index e315e95..0000000 --- a/config/nvim/lua/aleidk/plugins/heirline.lua +++ /dev/null @@ -1,15 +0,0 @@ -return { - "rebelot/heirline.nvim", - -- You can optionally lazy-load heirline on UiEnter - -- to make sure all required plugins and colorschemes are loaded before setup - event = "UiEnter", - config = function() - require("heirline").setup({ - statusline = {}, - winbar = {}, - tabline = {}, - statuscolumn = {}, - opts = {}, - }) - end, -} diff --git a/config/nvim/lua/aleidk/plugins/nvim-tree.lua b/config/nvim/lua/aleidk/plugins/nvim-tree.lua index 91b003c..ecbd607 100644 --- a/config/nvim/lua/aleidk/plugins/nvim-tree.lua +++ b/config/nvim/lua/aleidk/plugins/nvim-tree.lua @@ -8,7 +8,6 @@ return { lazy = false, config = function() local tree = require("nvim-tree") - local tree_cb = require("nvim-tree.config").nvim_tree_callback local api = require("nvim-tree.api") tree.setup({ @@ -32,7 +31,7 @@ return { }, view = { centralize_selection = true, -- center current file on enter - width = 30, -- N° of columns or % + width = 30, -- N° of columns or % }, on_attach = function(bufnr) local function opts(desc)