summaryrefslogtreecommitdiff
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/custom-neovim/config/lua/options.lua3
-rw-r--r--pkgs/custom-neovim/config/lua/statusline.lua16
-rw-r--r--pkgs/custom-neovim/todo.md2
3 files changed, 18 insertions, 3 deletions
diff --git a/pkgs/custom-neovim/config/lua/options.lua b/pkgs/custom-neovim/config/lua/options.lua
index 2fdb796..7b6bbe0 100644
--- a/pkgs/custom-neovim/config/lua/options.lua
+++ b/pkgs/custom-neovim/config/lua/options.lua
@@ -4,13 +4,14 @@ vim.o.mouse = "" -- Don't use mouse
-- UI
vim.o.winborder = 'rounded' -- rounded window borders where possible.
-vim.o.showtabline = 1 -- whether to only show tabline if there is more than one tab.
+vim.o.showtabline = 0 -- whether to only show tabline if there is more than one tab.
vim.o.laststatus = 3 -- only have one statusline at the bottom of the window.
vim.o.showmode = false -- don't show the mode in the commandline.
vim.o.ruler = false -- don't show #,# in the commandline.
vim.o.number = true -- set absolute numbered lines
vim.o.scrolloff = 4 -- minimal number of screen lines to keep above and below the cursor
vim.o.signcolumn = "yes" -- always show the sign column, otherwise it would shift the text each time
+vim.o.winbar = " %f %m"
-- Finding
vim.o.gdefault = true -- Replace globally by default
diff --git a/pkgs/custom-neovim/config/lua/statusline.lua b/pkgs/custom-neovim/config/lua/statusline.lua
index fa16cd8..fd246ba 100644
--- a/pkgs/custom-neovim/config/lua/statusline.lua
+++ b/pkgs/custom-neovim/config/lua/statusline.lua
@@ -229,6 +229,21 @@ components.git_status = function (args)
return before..table.concat(status, " ")..after
end
+components.tab_counter = function (args)
+ args = args or {}
+ local before = args.before or ""
+ local after = args.after or ""
+
+ local num_tabs = #vim.api.nvim_list_tabpages()
+ local current_tab = vim.api.nvim_get_current_tabpage()
+
+ if num_tabs == 1 then return "" end
+
+ local icon = use_icons and "󰓩 " or "tab: "
+
+ return before..icon..current_tab.."/"..num_tabs..after
+end
+
-- Define Statusline
local statusline = function ()
return {
@@ -240,6 +255,7 @@ local statusline = function ()
"%=",
components.diagnostics(),
+ components.tab_counter(),
components.location({after = vim.g.neovide and " " or ""}),
components.progress({after = ""}),
}
diff --git a/pkgs/custom-neovim/todo.md b/pkgs/custom-neovim/todo.md
index fc84b99..dd8dbe5 100644
--- a/pkgs/custom-neovim/todo.md
+++ b/pkgs/custom-neovim/todo.md
@@ -3,8 +3,6 @@
- make comments not continue onto new line
- make blink not complete in comments
- add git commands (add all and status)
-- add winbar
-- add tab bar
- add zoxide plugin
- add markdown renderer
- add markdown lsp