84 lines
2.8 KiB
Lua
84 lines
2.8 KiB
Lua
return {
|
|
{
|
|
'folke/tokyonight.nvim',
|
|
config = function ()
|
|
G.cmd("colorscheme tokyonight") -- 主题
|
|
G.opt.background = 'dark' -- 背景
|
|
end
|
|
},
|
|
{
|
|
-- line插件
|
|
'kdheepak/tabline.nvim',
|
|
'nvim-lualine/lualine.nvim',
|
|
config = function()
|
|
require('lualine').setup {
|
|
options = {
|
|
icons_enabled = true,
|
|
theme = 'auto',
|
|
component_separators = { left = '', right = ''},
|
|
section_separators = { left = '', right = ''},
|
|
disabled_filetypes = {
|
|
statusline = {},
|
|
winbar = {},
|
|
},
|
|
ignore_focus = {},
|
|
always_divide_middle = true,
|
|
globalstatus = false,
|
|
refresh = {
|
|
statusline = 1000,
|
|
tabline = 1000,
|
|
winbar = 1000,
|
|
}
|
|
},
|
|
sections = {
|
|
lualine_a = {'mode'},
|
|
lualine_b = {'branch', 'diff', 'diagnostics'},
|
|
lualine_c = {{
|
|
'filename',
|
|
file_status = false,
|
|
path = 1
|
|
}},
|
|
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
|
lualine_y = {'progress'},
|
|
lualine_z = {}
|
|
},
|
|
inactive_sections = {
|
|
lualine_a = {},
|
|
lualine_b = {},
|
|
lualine_c = {'filename'},
|
|
lualine_x = {'location'},
|
|
lualine_y = {},
|
|
lualine_z = {}
|
|
},
|
|
tabline = {},
|
|
winbar = {},
|
|
inactive_winbar = {},
|
|
extensions = {}
|
|
}
|
|
require('tabline').setup {
|
|
-- Defaults configuration options
|
|
enable = true,
|
|
options = {
|
|
-- If lualine is installed tabline will use separators configured in lualine by default.
|
|
-- These options can be used to override those settings.
|
|
section_separators = {' ', ' '},
|
|
component_separators = {'', ''},
|
|
max_bufferline_percent = 66, -- set to nil by default, and it uses vim.o.columns * 2/3
|
|
show_tabs_always = false, -- this shows tabs only when there are more than one tab or if the first tab is named
|
|
show_devicons = true, -- this shows devicons in buffer section
|
|
show_bufnr = false, -- this appends [bufnr] to buffer section,
|
|
show_filename_only = true, -- shows base filename only instead of relative path in filename
|
|
modified_icon = "+ ", -- change the default modified icon
|
|
modified_italic = false, -- set to true by default; this determines whether the filename turns italic if modified
|
|
show_tabs_only = false, -- this shows only tabs instead of tabs + buffers
|
|
},
|
|
G.cmd[[
|
|
set guioptions-=e " Use showtabline in gui vim
|
|
set sessionoptions+=tabpages,globals " store tabpages and globals in session
|
|
]]
|
|
}
|
|
end,
|
|
},
|
|
}
|
|
|