Add barbar and barbecue packages, remove loc from feline, remove fugitive, make as many plugins as possible lazy loaded
This commit is contained in:
parent
d58d42ee50
commit
bbd1535851
69
config/nvim/lua/config/barbar.lua
Normal file
69
config/nvim/lua/config/barbar.lua
Normal file
|
@ -0,0 +1,69 @@
|
|||
return {
|
||||
-- Enable/disable animations
|
||||
animation = true,
|
||||
-- Enable/disable auto-hiding the tab bar when there is a single buffer
|
||||
auto_hide = false,
|
||||
-- Enable/disable current/total tabpages indicator (top right corner)
|
||||
tabpages = true,
|
||||
-- Enable/disable close button
|
||||
closable = true,
|
||||
-- Enables/disable clickable tabs
|
||||
-- - left-click: go to buffer
|
||||
-- - middle-click: delete buffer
|
||||
clickable = true,
|
||||
-- Enables / disables diagnostic symbols
|
||||
diagnostics = {
|
||||
[vim.diagnostic.severity.ERROR] = { enabled = true, icon = " " },
|
||||
[vim.diagnostic.severity.WARN] = { enabled = true, icon = " " },
|
||||
[vim.diagnostic.severity.INFO] = { enabled = true, icon = " " },
|
||||
[vim.diagnostic.severity.HINT] = { enabled = true, icon = " " },
|
||||
},
|
||||
-- Excludes buffers from the tabline
|
||||
exclude_ft = {},
|
||||
exclude_name = {},
|
||||
-- Hide inactive buffers and file extensions. Other options are `alternate`, `current`, and `visible`.
|
||||
hide = { extensions = true, inactive = true },
|
||||
-- Disable highlighting alternate buffers
|
||||
highlight_alternate = false,
|
||||
-- Disable highlighting file icons in inactive buffers
|
||||
highlight_inactive_file_icons = false,
|
||||
-- Enable highlighting visible buffers
|
||||
highlight_visible = true,
|
||||
-- Enable/disable icons
|
||||
-- if set to 'numbers', will show buffer index in the tabline
|
||||
-- if set to 'both', will show buffer index and icons in the tabline
|
||||
icons = true,
|
||||
-- If set, the icon color will follow its corresponding buffer
|
||||
-- highlight group. By default, the Buffer*Icon group is linked to the
|
||||
-- Buffer* group (see Highlighting below). Otherwise, it will take its
|
||||
-- default value as defined by devicons.
|
||||
icon_custom_colors = false,
|
||||
-- Configure icons on the bufferline.
|
||||
icon_separator_active = "▎",
|
||||
icon_separator_inactive = "▎",
|
||||
icon_close_tab = "",
|
||||
icon_close_tab_modified = "●",
|
||||
icon_pinned = "車",
|
||||
-- If true, new buffers will be inserted at the start/end of the list.
|
||||
-- Default is to insert after current buffer.
|
||||
insert_at_end = false,
|
||||
insert_at_start = false,
|
||||
-- Sets the maximum padding width with which to surround each tab
|
||||
maximum_padding = 1,
|
||||
-- Sets the minimum padding width with which to surround each tab
|
||||
minimum_padding = 1,
|
||||
-- Sets the maximum buffer name length.
|
||||
maximum_length = 30,
|
||||
-- If set, the letters for each buffer in buffer-pick mode will be
|
||||
-- assigned based on their name. Otherwise or in case all letters are
|
||||
-- already assigned, the behavior is to assign letters in order of
|
||||
-- usability (see order below)
|
||||
semantic_letters = true,
|
||||
-- New buffer letters are assigned in this order. This order is
|
||||
-- optimal for the qwerty keyboard layout but might need adjustement
|
||||
-- for other layouts.
|
||||
letters = "asdfjkl;ghnmxcvbziowerutyqpASDFJKLGHNMXCVBZIOWERUTYQP",
|
||||
-- Sets the name of unnamed buffers. By default format is "[Buffer X]"
|
||||
-- where X is the buffer number. But only a static string is accepted here.
|
||||
no_name_title = nil,
|
||||
}
|
1
config/nvim/lua/config/barbecue.lua
Normal file
1
config/nvim/lua/config/barbecue.lua
Normal file
|
@ -0,0 +1 @@
|
|||
return { theme = "catppuccin" }
|
|
@ -3,6 +3,10 @@ return {
|
|||
term_colors = true,
|
||||
-- transparent_background = true,
|
||||
integrations = {
|
||||
barbar = true,
|
||||
barbecue = {
|
||||
dim_dirname = true,
|
||||
},
|
||||
dashboard = true,
|
||||
gitsigns = true,
|
||||
indent_blankline = {
|
||||
|
@ -10,11 +14,16 @@ return {
|
|||
colored_indent_levels = true,
|
||||
},
|
||||
cmp = true,
|
||||
mason = true,
|
||||
native_lsp = {
|
||||
enabled = true,
|
||||
},
|
||||
notify = true,
|
||||
nvimtree = true,
|
||||
navic = {
|
||||
enabled = false,
|
||||
custom_bg = "NONE",
|
||||
},
|
||||
treesitter = true,
|
||||
treesitter_context = true,
|
||||
telescope = true,
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
vim.keymap.set("i", "jk", "<esc>")
|
||||
vim.keymap.set("n", "<leader>l", "<cmd>Lazy<CR>")
|
||||
vim.keymap.set("n", "<leader>m", "<cmd>Mason<CR>")
|
||||
vim.keymap.set("n", "<leader>s", "<cmd>Dashboard<CR>")
|
||||
vim.keymap.set({ "n", "t" }, "<A-h>", "<CMD>NavigatorLeft<CR>")
|
||||
vim.keymap.set({ "n", "t" }, "<A-l>", "<CMD>NavigatorRight<CR>")
|
||||
vim.keymap.set({ "n", "t" }, "<A-k>", "<CMD>NavigatorUp<CR>")
|
||||
|
|
1
config/nvim/lua/config/nvim-navic.lua
Normal file
1
config/nvim/lua/config/nvim-navic.lua
Normal file
|
@ -0,0 +1 @@
|
|||
return {highlight = true}
|
19
config/nvim/lua/plugins/barbar.lua
Normal file
19
config/nvim/lua/plugins/barbar.lua
Normal file
|
@ -0,0 +1,19 @@
|
|||
return {
|
||||
"romgrk/barbar.nvim",
|
||||
dependencies = "nvim-tree/nvim-web-devicons",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = function()
|
||||
require("bufferline").setup(require "config.barbar")
|
||||
vim.api.nvim_create_autocmd("BufWinEnter", {
|
||||
callback = function(tbl)
|
||||
if vim.bo[tbl.buf].filetype == "neo-tree" then require("bufferline.api").set_offset(41, "FileTree") end
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufWinLeave", "BufWipeout" }, {
|
||||
callback = function(tbl)
|
||||
if vim.bo[tbl.buf].filetype == "neo-tree" then require("bufferline.api").set_offset(0) end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
11
config/nvim/lua/plugins/barbecue.lua
Normal file
11
config/nvim/lua/plugins/barbecue.lua
Normal file
|
@ -0,0 +1,11 @@
|
|||
return {
|
||||
"utilyre/barbecue.nvim",
|
||||
name = "barbecue",
|
||||
version = "*",
|
||||
dependencies = {
|
||||
"SmiteshP/nvim-navic",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
opts = require "config.barbecue",
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
return {
|
||||
"glepnir/dashboard-nvim",
|
||||
event = "VimEnter",
|
||||
-- event = "VimEnter",
|
||||
cmd = "Dashboard",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
config = function() require("dashboard").setup(require "config.dashboard") end,
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
return {
|
||||
"feline-nvim/feline.nvim",
|
||||
dependencies = { require "plugins.catppuccin" },
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = function() require("feline").setup(require "config.feline") end,
|
||||
}
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"tpope/vim-fugitive",
|
||||
},
|
||||
{
|
||||
"tpope/vim-rhubarb",
|
||||
dependencies = "tpope/vim-fugitive",
|
||||
},
|
||||
{
|
||||
"shumphrey/fugitive-gitlab.vim",
|
||||
dependencies = "tpope/vim-fugitive",
|
||||
},
|
||||
}
|
|
@ -1,7 +1,9 @@
|
|||
return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
lazy = false,
|
||||
cmd = {
|
||||
"Mason",
|
||||
},
|
||||
config = function() require("mason").setup(require "config.mason") end,
|
||||
},
|
||||
{
|
||||
|
|
6
config/nvim/lua/plugins/nvim-navic.lua
Normal file
6
config/nvim/lua/plugins/nvim-navic.lua
Normal file
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
"SmiteshP/nvim-navic",
|
||||
dependencies = "neovim/nvim-lspconfig",
|
||||
lazy = true,
|
||||
opts = require "config.nvim-navic",
|
||||
}
|
|
@ -286,24 +286,24 @@ function M.get()
|
|||
|
||||
-- ######## Left
|
||||
-- treesitter position
|
||||
components.active[1][14] = {
|
||||
provider = function()
|
||||
-- if not require("vim.treesitter.language").require_language("lua") then
|
||||
-- components.active[1][14] = {
|
||||
-- provider = function()
|
||||
-- -- if not require("vim.treesitter.language").require_language("lua") then
|
||||
-- -- return ""
|
||||
-- -- end
|
||||
-- local pos = require("nvim-treesitter").statusline {
|
||||
-- indicator_size = 50,
|
||||
-- transform_fn = function(line) return line:gsub("%s*[%[%(%{]+.*$", "") end,
|
||||
-- }
|
||||
-- if pos and pos ~= "" then return pos end
|
||||
-- return ""
|
||||
-- end
|
||||
local pos = require("nvim-treesitter").statusline {
|
||||
indicator_size = 50,
|
||||
transform_fn = function(line) return line:gsub("%s*[%[%(%{]+.*$", "") end,
|
||||
}
|
||||
if pos and pos ~= "" then return pos end
|
||||
return ""
|
||||
end,
|
||||
hl = {
|
||||
fg = sett.extras,
|
||||
bg = sett.bkg,
|
||||
},
|
||||
left_sep = invi_sep,
|
||||
}
|
||||
-- end,
|
||||
-- hl = {
|
||||
-- fg = sett.extras,
|
||||
-- bg = sett.bkg,
|
||||
-- },
|
||||
-- left_sep = invi_sep,
|
||||
-- }
|
||||
|
||||
-- ######## Right
|
||||
|
||||
|
|
Loading…
Reference in a new issue