diff options
Diffstat (limited to 'pkgs')
| -rw-r--r-- | pkgs/custom-neovim/config/init.lua | 2 | ||||
| -rw-r--r-- | pkgs/custom-neovim/config/lua/mappings.lua | 5 | ||||
| -rw-r--r-- | pkgs/custom-neovim/config/lua/options.lua | 2 | ||||
| -rw-r--r-- | pkgs/custom-neovim/config/lua/plugins/comment.lua | 1 | ||||
| -rw-r--r-- | pkgs/custom-neovim/config/lua/plugins/mini/tabline.lua | 1 | ||||
| -rw-r--r-- | pkgs/custom-neovim/config/lua/statusline.lua | 18 | ||||
| -rw-r--r-- | pkgs/custom-neovim/default.nix | 2 | ||||
| -rw-r--r-- | pkgs/custom-neovim/design.md | 2 |
8 files changed, 23 insertions, 10 deletions
diff --git a/pkgs/custom-neovim/config/init.lua b/pkgs/custom-neovim/config/init.lua index 9ae14b8..a350729 100644 --- a/pkgs/custom-neovim/config/init.lua +++ b/pkgs/custom-neovim/config/init.lua @@ -13,7 +13,7 @@ require("lsp") require("completion") -- UI Plugins: -require("plugins.tabby") +require("plugins.mini.tabline") require("plugins.mini.clue") require("plugins.mini.indentscope") require("plugins.mini.notify") diff --git a/pkgs/custom-neovim/config/lua/mappings.lua b/pkgs/custom-neovim/config/lua/mappings.lua index 0bcff87..1379973 100644 --- a/pkgs/custom-neovim/config/lua/mappings.lua +++ b/pkgs/custom-neovim/config/lua/mappings.lua @@ -24,8 +24,7 @@ mapkey("n", "<leader>t", "Manage tabs", "") mapkey("n", "<leader>to", "Open new tab", ":tabnew<cr>") mapkey("n", "<leader>tc", "Close tab", ":tabclose<cr>") mapkey("n", "<leader>tt", "Go to next tab", ":tabnext<cr>") -mapkey("n", "<leader>tn", "Go to next tab", ":tabnext<cr>") -mapkey("n", "<leader>tp", "Go to previous tab", ":tabprev<cr>") +mapkey("n", "<leader>tT", "Go to previous tab", ":tabprev<cr>") mapkey("n", "<leader>tr", "Rename current tab", function() vim.ui.input({ prompt = "Rename tab: "}, function(input) if input then @@ -56,7 +55,7 @@ mapkey("n", "<leader>co", "Open new terminal", ":lua Snacks.terminal.open()<cr>" -- Git mapkey("n", "<leader>g", "Manage git", "") mapkey("n", "<leader>gg", "Open lazygit", ":lua Snacks.lazygit()<cr>") -mapkey("n", "<leader>ga", "Add the current file", ":Git add<cr>") +mapkey("n", "<leader>ga", "Add the current file", ":Git add %<cr>") mapkey("n", "<leader>gs", "Open git status picker", ":lua Snacks.picker.git_status()<cr>") -- Other leader keys diff --git a/pkgs/custom-neovim/config/lua/options.lua b/pkgs/custom-neovim/config/lua/options.lua index 5698594..296aea3 100644 --- a/pkgs/custom-neovim/config/lua/options.lua +++ b/pkgs/custom-neovim/config/lua/options.lua @@ -13,7 +13,7 @@ vim.o.scrolloff = 4 -- minimal number of screen lines to keep above and below th vim.o.signcolumn = "yes" -- always show the sign column, otherwise it would shift the text each time vim.o.clipboard = "unnamedplus" -- use system clipboard vim.o.equalalways = true -- equalize splits -vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions,globals" +vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal" -- Split Behavior vim.o.splitright = true diff --git a/pkgs/custom-neovim/config/lua/plugins/comment.lua b/pkgs/custom-neovim/config/lua/plugins/comment.lua new file mode 100644 index 0000000..4ff0380 --- /dev/null +++ b/pkgs/custom-neovim/config/lua/plugins/comment.lua @@ -0,0 +1 @@ +require("comment").setup() diff --git a/pkgs/custom-neovim/config/lua/plugins/mini/tabline.lua b/pkgs/custom-neovim/config/lua/plugins/mini/tabline.lua new file mode 100644 index 0000000..9045285 --- /dev/null +++ b/pkgs/custom-neovim/config/lua/plugins/mini/tabline.lua @@ -0,0 +1 @@ +require("mini.tabline").setup() diff --git a/pkgs/custom-neovim/config/lua/statusline.lua b/pkgs/custom-neovim/config/lua/statusline.lua index 5476841..d83231a 100644 --- a/pkgs/custom-neovim/config/lua/statusline.lua +++ b/pkgs/custom-neovim/config/lua/statusline.lua @@ -59,6 +59,10 @@ statusline_components.micro_spacer = function() return " " end +statusline_components.small_spacer = function() + return " " +end + statusline_components.spacer = function() return '%=' end @@ -152,7 +156,7 @@ end statusline_components.git_branch = function() if vim.g.gitsigns_head then - return string.format(' %s ', vim.g.gitsigns_head) + return string.format(' %s', vim.g.gitsigns_head) else return '' -- Return an empty string or some default value if the branch name is not available end @@ -217,7 +221,7 @@ statusline_components.working_directory = function() text = ".../" .. parts[#parts] end end - return string.format(' %s ', text) + return string.format('%s', text) end Statusline_component = function(name) @@ -232,15 +236,21 @@ local statusline = { get_component("micro_spacer"), get_component("mode"), + get_component("micro_spacer"), get_component("working_directory"), + get_component("micro_spacer"), get_component("git_branch"), + get_component("micro_spacer"), get_component("git_status"), + get_component("micro_spacer"), get_component("diagnostic_status"), get_component("spacer"), - ' %{&filetype} ', -- filetype - '%2p%% ', -- progress % + '%{&filetype}', -- filetype + get_component("micro_spacer"), + '%2p%%', -- progress % + get_component("micro_spacer"), get_component("position"), } diff --git a/pkgs/custom-neovim/default.nix b/pkgs/custom-neovim/default.nix index 67a5e46..bd9dd29 100644 --- a/pkgs/custom-neovim/default.nix +++ b/pkgs/custom-neovim/default.nix @@ -23,6 +23,8 @@ in nvim-ts-autotag gitsigns-nvim git-plugins.namu-nvim-git + vim-nix + comment-nvim # Completion nvim-cmp diff --git a/pkgs/custom-neovim/design.md b/pkgs/custom-neovim/design.md index 0bc2dcd..fcaa453 100644 --- a/pkgs/custom-neovim/design.md +++ b/pkgs/custom-neovim/design.md @@ -20,5 +20,5 @@ - add arrows to <C-w> binds - make lazyvim launch with default shell bash - make mini.git run commands from cwd instead of git root -- make all gaps in statusbar from a component - make nix file autoindent work properly (maybe remove smartindent?) +- add more binds to mini.files |
