nvim/lua/plugs/theme.lua

114 lines
3.3 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

return {
{
-- git 修改标记sign column 增删改色块)
'lewis6991/gitsigns.nvim',
event = "BufReadPre",
config = function()
require('gitsigns').setup({
signs = {
add = { text = '' },
change = { text = '' },
delete = { text = '' },
topdelete = { text = '' },
changedelete = { text = '' },
untracked = { text = '' },
},
signcolumn = true,
numhl = true,
linehl = false,
word_diff = false,
watch_gitdir = {
interval = 1000,
follow_files = true,
},
current_line_blame = false,
-- on_attach = function(bufnr)
-- local gs = package.loaded.gitsigns
-- G.map({
-- { 'n', ']c', gs.next_hunk, { buffer = bufnr } },
-- { 'n', '[c', gs.prev_hunk, { buffer = bufnr } },
-- { 'n', '<leader>hs', gs.stage_hunk, { buffer = bufnr } },
-- { 'n', '<leader>hr', gs.reset_hunk, { buffer = bufnr } },
-- { 'n', '<leader>hp', gs.preview_hunk, { buffer = bufnr } },
-- { 'n', '<leader>hb', gs.blame_line, { buffer = bufnr } },
-- })
-- end,
})
end,
},
{
'folke/tokyonight.nvim',
config = function()
G.cmd("colorscheme tokyonight") -- 主题
G.opt.background = 'dark' -- 背景
end
},
{
-- 状态栏
'nvim-lualine/lualine.nvim',
config = function()
require('lualine').setup {
options = {
icons_enabled = true,
theme = 'auto',
component_separators = { left = '', right = '' },
section_separators = { left = '', right = '' },
ignore_focus = {},
always_divide_middle = true,
globalstatus = false,
refresh = {
statusline = 2000,
tabline = 2000,
winbar = 2000,
}
},
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 = {}
},
}
end,
},
{
-- 标签栏
'kdheepak/tabline.nvim',
config = function()
require('tabline').setup {
enable = true,
options = {
section_separators = { ' ', ' ' },
component_separators = { '', '' },
max_bufferline_percent = 66,
show_tabs_always = false,
show_devicons = true,
show_bufnr = false,
show_filename_only = true,
modified_icon = "+ ",
modified_italic = false,
show_tabs_only = false,
},
}
G.cmd [[
set guioptions-=e " Use showtabline in gui vim
set sessionoptions+=tabpages,globals " store tabpages and globals in session
]]
end,
},
}