From a77c1908ddd025bf9a4690a7713af37dbb4681f1 Mon Sep 17 00:00:00 2001 From: newbieQQ Date: Thu, 16 Nov 2023 23:29:04 +0800 Subject: [PATCH] add two plugs --- lua/plugs.lua | 1 + lua/plugs/lualine.lua | 31 ++++++++++++++++++++++++++++--- lua/plugs/toggleterm.lua | 5 +++++ 3 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 lua/plugs/toggleterm.lua diff --git a/lua/plugs.lua b/lua/plugs.lua index 7d36e6c..186f880 100644 --- a/lua/plugs.lua +++ b/lua/plugs.lua @@ -14,6 +14,7 @@ return { require("plugs.edit-plugs"), require("plugs.hop"), + require("plugs.toggleterm") -- nerdtree -- { diff --git a/lua/plugs/lualine.lua b/lua/plugs/lualine.lua index 01ad920..c53a9f1 100644 --- a/lua/plugs/lualine.lua +++ b/lua/plugs/lualine.lua @@ -1,6 +1,9 @@ return { - 'nvim-lualine/lualine.nvim', - config = function() + 'nvim-lualine/lualine.nvim', + dependencies = { + 'kdheepak/tabline.nvim', + }, + config = function() require('lualine').setup { options = { icons_enabled = true, @@ -41,5 +44,27 @@ return { inactive_winbar = {}, extensions = {} } - end, + 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 = false, -- 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, } diff --git a/lua/plugs/toggleterm.lua b/lua/plugs/toggleterm.lua new file mode 100644 index 0000000..31c81a9 --- /dev/null +++ b/lua/plugs/toggleterm.lua @@ -0,0 +1,5 @@ +return { + -- amongst your other plugins + {'akinsho/toggleterm.nvim', version = "*", config = true}, + +}