summaryrefslogtreecommitdiff
path: root/pkgs/custom-neovim
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/custom-neovim')
-rw-r--r--pkgs/custom-neovim/config/init.lua1
-rw-r--r--pkgs/custom-neovim/config/lua/mappings.lua30
-rw-r--r--pkgs/custom-neovim/config/lua/plugins/comment.lua2
-rw-r--r--pkgs/custom-neovim/config/lua/plugins/mini/tabline.lua13
-rw-r--r--pkgs/custom-neovim/config/lua/statusline.lua10
-rw-r--r--pkgs/custom-neovim/design.md13
6 files changed, 40 insertions, 29 deletions
diff --git a/pkgs/custom-neovim/config/init.lua b/pkgs/custom-neovim/config/init.lua
index a350729..b7c82a2 100644
--- a/pkgs/custom-neovim/config/init.lua
+++ b/pkgs/custom-neovim/config/init.lua
@@ -31,6 +31,7 @@ require("plugins.actions-preview")
require("plugins.mini.git")
require("plugins.mini.pairs")
require("plugins.ts-autotag")
+require("plugins.comment")
-- Misc Plugins:
require("plugins.presence")
diff --git a/pkgs/custom-neovim/config/lua/mappings.lua b/pkgs/custom-neovim/config/lua/mappings.lua
index 1379973..da2cf17 100644
--- a/pkgs/custom-neovim/config/lua/mappings.lua
+++ b/pkgs/custom-neovim/config/lua/mappings.lua
@@ -7,8 +7,6 @@ vim.g.mapleader = ' '
-- Pickers
mapkey("n", "<leader>f", "Open file picker", ":lua Snacks.picker.files()<cr>")
mapkey("n", "<leader>l", "Open recent file picker", ":lua Snacks.picker.recent()<cr>")
-mapkey("n", "<leader>b", "Open buffer picker", ":lua Snacks.picker.buffers()<cr>")
-mapkey("n", "<leader>B", "Open buffer live grep picker", ":lua Snacks.picker.grep_buffers()<cr>")
mapkey("n", "<leader>y", "Open clipboard history picker", ":lua Snacks.picker.cliphist()<cr>")
mapkey("n", "<leader>/", "Open live grep picker", ":lua Snacks.picker.grep()<cr>")
mapkey("n", "<leader>\\", "Open command palette", ":lua Snacks.picker.commands()<cr>")
@@ -17,7 +15,11 @@ mapkey("n", "<leader>p", "Open picker picker", ":lua Snacks.picker.pickers()<cr>
mapkey("n", "<leader>'", "Open last picker", ":lua Snacks.picker.resume()<cr>")
mapkey("n", "<leader><leader>", "Open smart picker", ":lua Snacks.picker.smart()<cr>")
mapkey("n", "<leader>z", "Open zoxide picker", ":lua Snacks.picker.zoxide()<cr>")
-mapkey("n", "<leader>T", "Open treesitter picker", ":Namu treesitter<cr>")
+mapkey("n", "<leader>R", "Open treesitter picker", ":Namu treesitter<cr>")
+mapkey("n", "<leader>k", "Open colorscheme picker", ":Namu colorscheme<cr>")
+
+-- Dropbar
+mapkey("n", "<leader>j", "Open dropdown", ":lua require('dropbar.api').pick()<cr>")
-- Tabs
mapkey("n", "<leader>t", "Manage tabs", "")
@@ -25,13 +27,21 @@ 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>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
- vim.cmd.TabRename(input)
- end
- end)
-end)
+-- mapkey("n", "<leader>tr", "Rename current tab", function()
+-- vim.ui.input({ prompt = "Rename tab: "}, function(input)
+-- if input then
+-- vim.cmd.TabRename(input)
+-- end
+-- end)
+-- end)
+
+-- Buffers
+mapkey("n", "<leader>b", "Manage buffers", "")
+mapkey("n", "<leader>bb", "Go to next buffer", ":bn<cr>")
+mapkey("n", "<leader>bB", "Go to previous buffer", ":bp<cr>")
+mapkey("n", "<leader>bc", "Delete current buffer", ":bd<cr>")
+mapkey("n", "<leader>bp", "Open buffer picker", ":lua Snacks.picker.buffers()<cr>")
+mapkey("n", "<leader>bg", "Open buffer live grep picker", ":lua Snacks.picker.grep_buffers()<cr>")
-- Windows
mapkey("n", "<leader>w", "Manage windows", "<C-w>")
diff --git a/pkgs/custom-neovim/config/lua/plugins/comment.lua b/pkgs/custom-neovim/config/lua/plugins/comment.lua
index 4ff0380..bd47faf 100644
--- a/pkgs/custom-neovim/config/lua/plugins/comment.lua
+++ b/pkgs/custom-neovim/config/lua/plugins/comment.lua
@@ -1 +1 @@
-require("comment").setup()
+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
index 9045285..90ba53a 100644
--- a/pkgs/custom-neovim/config/lua/plugins/mini/tabline.lua
+++ b/pkgs/custom-neovim/config/lua/plugins/mini/tabline.lua
@@ -1 +1,12 @@
-require("mini.tabline").setup()
+require("mini.tabline").setup {
+ format = function(buf_id, label)
+ local suffix = vim.bo[buf_id].modified and '[+] ' or ''
+ return MiniTabline.default_format(buf_id, label) .. suffix
+ end
+}
+
+local link_hl = Utils.link_highlight
+
+link_hl("MiniTablineModifiedHidden", "MiniTablineHidden")
+link_hl("MiniTablineModifiedVisible", "MiniTablineVisible")
+link_hl("MiniTablineModifiedCurrent", "MiniTablineCurrent")
diff --git a/pkgs/custom-neovim/config/lua/statusline.lua b/pkgs/custom-neovim/config/lua/statusline.lua
index d83231a..b7f293d 100644
--- a/pkgs/custom-neovim/config/lua/statusline.lua
+++ b/pkgs/custom-neovim/config/lua/statusline.lua
@@ -1,15 +1,5 @@
-- Statusline
--- TODO: Components to add
---
--- mode
--- git branch
---
--- cwd
---
--- lsp diagnostics
--- lsp status
-
-- Highlight pattern
local hi_pattern = '%%#%s#%s%%*'
diff --git a/pkgs/custom-neovim/design.md b/pkgs/custom-neovim/design.md
index fcaa453..903efa5 100644
--- a/pkgs/custom-neovim/design.md
+++ b/pkgs/custom-neovim/design.md
@@ -10,15 +10,14 @@
## Todo
-- add quick window switcher plugin
-- make tabby run on highlight groups
-- add modified tags to tabby
-- prevent dropbar filename from truncating
- add keybind to activate dropbar drop down menu
- find dropbar load autocommand and modify to work on winenter to prevent no dropbar when splitting
-- make splits automatically equalize when window resized
-- 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 nix file autoindent work properly (maybe remove smartindent?)
- add more binds to mini.files
+- make autocomplete accept the current completion when I resume typing
+- Add LSP status to status bar
+
+## Todo if possible
+- make splits automatically equalize when window resized
+- prevent dropbar filename from truncating