replace bufferline with lualine
This commit is contained in:
parent
5f24a28eb9
commit
bda58fea24
1 changed files with 184 additions and 183 deletions
53
init.lua
53
init.lua
|
|
@ -28,7 +28,6 @@ vim.pack.add({
|
||||||
"https://github.com/folke/snacks.nvim",
|
"https://github.com/folke/snacks.nvim",
|
||||||
"https://github.com/nvim-lualine/lualine.nvim",
|
"https://github.com/nvim-lualine/lualine.nvim",
|
||||||
"https://github.com/tinted-theming/tinted-vim",
|
"https://github.com/tinted-theming/tinted-vim",
|
||||||
"https://github.com/akinsho/bufferline.nvim",
|
|
||||||
"https://github.com/nvimdev/lspsaga.nvim",
|
"https://github.com/nvimdev/lspsaga.nvim",
|
||||||
"https://github.com/neovim/nvim-lspconfig",
|
"https://github.com/neovim/nvim-lspconfig",
|
||||||
"https://github.com/nvim-treesitter/nvim-treesitter",
|
"https://github.com/nvim-treesitter/nvim-treesitter",
|
||||||
|
|
@ -66,16 +65,6 @@ require("blink.cmp").setup({
|
||||||
})
|
})
|
||||||
require("mason").setup()
|
require("mason").setup()
|
||||||
require("mason-lspconfig").setup()
|
require("mason-lspconfig").setup()
|
||||||
require("bufferline").setup({
|
|
||||||
options = {
|
|
||||||
themable = true,
|
|
||||||
numbers = "ordinal",
|
|
||||||
indicator = {
|
|
||||||
icon = "",
|
|
||||||
style = "underline",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
require("snacks").setup({
|
require("snacks").setup({
|
||||||
notifier = { enabled = true },
|
notifier = { enabled = true },
|
||||||
statuscolumn = { enabled = true },
|
statuscolumn = { enabled = true },
|
||||||
|
|
@ -168,7 +157,8 @@ require("snacks").setup({
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local dir, file = fname:match("^(.*)/(.+)$")
|
local dir, file = fname:match("^(.*)/(.+)$")
|
||||||
return dir and { { dir .. "/", hl = "dir" }, { file, hl = "file" } } or { { fname, hl = "file" } }
|
return dir and { { dir .. "/", hl = "dir" }, { file, hl = "file" } } or
|
||||||
|
{ { fname, hl = "file" } }
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
|
|
@ -197,19 +187,30 @@ require("cord").setup({
|
||||||
})
|
})
|
||||||
require("lualine").setup({
|
require("lualine").setup({
|
||||||
options = {
|
options = {
|
||||||
section_separators = { left = "", right = "" },
|
section_separators = { left = "", right = "" },
|
||||||
component_separators = { left = "|", right = "|" },
|
component_separators = { left = "|", right = "|" },
|
||||||
|
globalstatus = true,
|
||||||
|
always_divide_middle = true,
|
||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = { "mode" },
|
lualine_a = { "mode" },
|
||||||
lualine_b = { "diagnostics" },
|
lualine_b = { "diagnostics" },
|
||||||
lualine_c = { "filename", "branch", "navic" },
|
lualine_c = { "filename", "filesize", },
|
||||||
lualine_x = { "lsp_status", "filetype", "filesize" },
|
lualine_x = { "lsp_status", "filetype" },
|
||||||
lualine_y = { "" },
|
lualine_y = { "" },
|
||||||
lualine_z = { "location" },
|
lualine_z = { "location" },
|
||||||
},
|
},
|
||||||
|
tabline = {
|
||||||
|
lualine_a = { { 'buffers', mode = 2, show_modified_status = true, } },
|
||||||
|
lualine_b = { 'branch' },
|
||||||
|
lualine_c = {},
|
||||||
|
lualine_x = {},
|
||||||
|
lualine_y = {},
|
||||||
|
lualine_z = { 'tabs' }
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
-- keymaps
|
-- keymaps
|
||||||
local map = vim.keymap.set
|
local map = vim.keymap.set
|
||||||
|
|
||||||
|
|
@ -236,17 +237,17 @@ map("n", "<leader>qf", "<cmd> Lspsaga code_action<cr>")
|
||||||
map("n", "<C-f>", function()
|
map("n", "<C-f>", function()
|
||||||
vim.lsp.buf.format()
|
vim.lsp.buf.format()
|
||||||
end)
|
end)
|
||||||
-- bufferline keybinds
|
-- buffer keybinds
|
||||||
map("n", "<A-1>", "<cmd> BufferLineGoToBuffer 1 <cr>")
|
map("n", "<A-1>", "<cmd> LualineBuffersJump! 1 <cr>")
|
||||||
map("n", "<A-2>", "<cmd> BufferLineGoToBuffer 2 <cr>")
|
map("n", "<A-2>", "<cmd> LualineBuffersJump! 2 <cr>")
|
||||||
map("n", "<A-3>", "<cmd> BufferLineGoToBuffer 3 <cr>")
|
map("n", "<A-3>", "<cmd> LualineBuffersJump! 3 <cr>")
|
||||||
map("n", "<A-4>", "<cmd> BufferLineGoToBuffer 4 <cr>")
|
map("n", "<A-4>", "<cmd> LualineBuffersJump! 4 <cr>")
|
||||||
map("n", "<A-5>", "<cmd> BufferLineGoToBuffer 5 <cr>")
|
map("n", "<A-5>", "<cmd> LualineBuffersJump! 5 <cr>")
|
||||||
map("n", "<A-6>", "<cmd> BufferLineGoToBuffer 6 <cr>")
|
map("n", "<A-6>", "<cmd> LualineBuffersJump! 6 <cr>")
|
||||||
map("n", "<A-7>", "<cmd> BufferLineGoToBuffer 7 <cr>")
|
map("n", "<A-7>", "<cmd> LualineBuffersJump! 7 <cr>")
|
||||||
map("n", "<A-8>", "<cmd> BufferLineGoToBuffer 8 <cr>")
|
map("n", "<A-8>", "<cmd> LualineBuffersJump! 8 <cr>")
|
||||||
map("n", "<A-9>", "<cmd> BufferLineGoToBuffer 9 <cr>")
|
map("n", "<A-9>", "<cmd> LualineBuffersJump! 9 <cr>")
|
||||||
map("n", "<A-0>", "<cmd> BufferLineGoToBuffer last <cr>")
|
map("n", "<A-0>", "<cmd> LualineBuffersJump! last <cr>")
|
||||||
map("n", "<leader>w", "<cmd> bdelete! <cr>")
|
map("n", "<leader>w", "<cmd> bdelete! <cr>")
|
||||||
|
|
||||||
-- util keybinds
|
-- util keybinds
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue