write own lightweight tabufline | remove bufferline
This commit is contained in:
parent
5e4b2e6a11
commit
845d5b4866
11 changed files with 269 additions and 123 deletions
|
@ -1,53 +0,0 @@
|
|||
local present, bufferline = pcall(require, "bufferline")
|
||||
|
||||
if not present then
|
||||
return
|
||||
end
|
||||
|
||||
require("base46").load_highlight "bufferline"
|
||||
|
||||
vim.cmd [[
|
||||
|
||||
function! Toggle_theme(a,b,c,d)
|
||||
lua require('base46').toggle_theme()
|
||||
endfunction
|
||||
|
||||
function! Quit_vim(a,b,c,d)
|
||||
qa
|
||||
endfunction
|
||||
]]
|
||||
|
||||
local options = {
|
||||
options = {
|
||||
offsets = { { filetype = "NvimTree", text = "", padding = 1 } },
|
||||
buffer_close_icon = "",
|
||||
modified_icon = "",
|
||||
close_icon = "",
|
||||
show_close_icon = false,
|
||||
left_trunc_marker = " ",
|
||||
right_trunc_marker = " ",
|
||||
max_name_length = 20,
|
||||
max_prefix_length = 13,
|
||||
tab_size = 20,
|
||||
show_tab_indicators = true,
|
||||
enforce_regular_tabs = false,
|
||||
show_buffer_close_icons = true,
|
||||
separator_style = "thin",
|
||||
themable = true,
|
||||
|
||||
-- top right buttons in bufferline
|
||||
custom_areas = {
|
||||
right = function()
|
||||
return {
|
||||
{ text = "%@Toggle_theme@" .. vim.g.toggle_theme_icon .. "%X" },
|
||||
{ text = "%@Quit_vim@ %X" },
|
||||
}
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- check for any override
|
||||
options = require("core.utils").load_override(options, "akinsho/bufferline.nvim")
|
||||
|
||||
bufferline.setup(options)
|
|
@ -113,6 +113,17 @@ M.luasnip = function()
|
|||
options = load_override(options, "L3MON4D3/LuaSnip")
|
||||
luasnip.config.set_config(options)
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
|
||||
vim.api.nvim_create_autocmd("InsertLeave", {
|
||||
callback = function()
|
||||
if
|
||||
require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()]
|
||||
and not require("luasnip").session.jump_active
|
||||
then
|
||||
require("luasnip").unlink_current()
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
M.gitsigns = function()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue