diff options
Diffstat (limited to 'pkgs/custom-neovim')
| -rw-r--r-- | pkgs/custom-neovim/config/lua/keymaps.lua | 13 | ||||
| -rw-r--r-- | pkgs/custom-neovim/config/lua/lsp.lua | 2 | ||||
| -rw-r--r-- | pkgs/custom-neovim/config/lua/plugins/actions-preview.lua | 12 | ||||
| -rw-r--r-- | pkgs/custom-neovim/config/lua/plugins/completion.lua | 26 | ||||
| -rw-r--r-- | pkgs/custom-neovim/config/lua/plugins/markview.lua | 5 | ||||
| -rw-r--r-- | pkgs/custom-neovim/config/lua/plugins/nix.lua | 4 | ||||
| -rw-r--r-- | pkgs/custom-neovim/config/lua/plugins/presence.lua | 9 | ||||
| -rw-r--r-- | pkgs/custom-neovim/config/lua/plugins/treesitter.lua | 4 | ||||
| -rw-r--r-- | pkgs/custom-neovim/default.nix | 15 | ||||
| -rw-r--r-- | pkgs/custom-neovim/todo.md | 6 |
10 files changed, 77 insertions, 19 deletions
diff --git a/pkgs/custom-neovim/config/lua/keymaps.lua b/pkgs/custom-neovim/config/lua/keymaps.lua index a6c74be..fd3bb15 100644 --- a/pkgs/custom-neovim/config/lua/keymaps.lua +++ b/pkgs/custom-neovim/config/lua/keymaps.lua @@ -37,12 +37,18 @@ mapkey("n", "<leader>tc", "Close current tab", ":tabclose<cr>") -- Session mapkey("n", "<leader>w", "Manage sessions", "") -mapkey("n", "<leader>ww", "Open a session", ":Autosession search<cr>", {"mini.pick"}) -mapkey("n", "<leader>wd", "Delete a session", ":Autosession delete<cr>", {"mini.pick"}) +mapkey("n", "<leader>ww", "Open a session", ":Autosession search<cr>", "mini.pick") +mapkey("n", "<leader>wd", "Delete a session", ":Autosession delete<cr>", "mini.pick") -- Terminal mapkey("n", "<leader>c", "Open terminal", ":botright terminal<cr>") +-- Markview +mapkey("n", "<leader>v", "Toggle markview", ":Markview<cr>", "markview.nvim") + +-- Toggle spellcheck +mapkey("n", "zq", "Toggle spellcheck", ":set spell!<cr>") + -- Really delete mapkey({"n", "v"}, "<leader>d", "Really delete", [["_d]]) mapkey({"n", "v"}, "<leader>x", "Really delete character", [["_x]]) @@ -56,6 +62,9 @@ mapkey({"n", "v"}, "k", "Go up visually", "gk") mapkey({"n", "v"}, "<down>", "Go down visually", "gj") mapkey({"n", "v"}, "<up>", "Go up visually", "gk") +-- Falling key +mapkey("n", "<leader>u", "Make it rain", ":CellularAutomaton make_it_rain<cr>", "cellular-automaton.nvim") + -- QOL Keys mapkey("t", "<Esc><Esc>", "Exit terminal insert mode", "<C-\\><C-n>") vim.keymap.set("c", "<cr>", function() diff --git a/pkgs/custom-neovim/config/lua/lsp.lua b/pkgs/custom-neovim/config/lua/lsp.lua index 627b115..3260bbe 100644 --- a/pkgs/custom-neovim/config/lua/lsp.lua +++ b/pkgs/custom-neovim/config/lua/lsp.lua @@ -60,7 +60,7 @@ vim.api.nvim_create_autocmd('LspAttach', { end -- LSP Pickers - mapkey('n', "<leader>a", "Perform code action", ":lua require('actions-preview').code_actions()<cr>") + mapkey('n', "<leader>a", "Perform code action", ":lua require('actions-preview').code_actions()<cr>", "actions-preview.nvim") mapkey("n", "<leader>S", "Open workspace symbol picker", [[:Pick lsp scope="workspace_symbol"<cr>]], "mini.pick") mapkey("n", "<leader>s", "Open symbol picker", [[:Pick lsp scope="document_symbol"<cr>]], "mini.pick") mapkey("n", "<leader>I", "Open workspace diagnostic picker", [[:Pick diagnostic scope="all"<cr>]], "mini.pick") diff --git a/pkgs/custom-neovim/config/lua/plugins/actions-preview.lua b/pkgs/custom-neovim/config/lua/plugins/actions-preview.lua new file mode 100644 index 0000000..c236074 --- /dev/null +++ b/pkgs/custom-neovim/config/lua/plugins/actions-preview.lua @@ -0,0 +1,12 @@ +return { + "actions-preview.nvim", + lazy = true, + before = function () + require("lz.n").trigger_load("mini.pick") + end, + after = function () + require("actions-preview").setup { + backend = { "minipick" }, + } + end +} diff --git a/pkgs/custom-neovim/config/lua/plugins/completion.lua b/pkgs/custom-neovim/config/lua/plugins/completion.lua index 0c6d285..3228662 100644 --- a/pkgs/custom-neovim/config/lua/plugins/completion.lua +++ b/pkgs/custom-neovim/config/lua/plugins/completion.lua @@ -1,25 +1,35 @@ return { { - -- when in doubt, this plugin is the cause of cpu issues. "blink.cmp", - -- enabled = false, lazy = true, event = { "InsertEnter", "CmdlineEnter", }, + before = function() + require("lz.n").trigger_load("luasnip") + end, after = function() - -- require("luasnip.loaders.from_vscode").lazy_load() - -- vim.cmd.packadd("luasnip") - -- vim.cmd.packadd("friendly-snippets") - require("blink.cmp").setup { - -- snippets = { preset = 'luasnip' }, + snippets = { preset = 'luasnip' }, sources = { default = { 'lsp', 'path', 'snippets', 'buffer' }, }, + cmdline = { + keymap = { preset = 'inherit' }, + completion = { menu = { auto_show = true } }, + }, } - end, }, + { + "luasnip", + lazy = true, + before = function () + vim.cmd.packadd("friendly-snippets") + end, + after = function () + require("luasnip.loaders.from_vscode").lazy_load() + end, + } } diff --git a/pkgs/custom-neovim/config/lua/plugins/markview.lua b/pkgs/custom-neovim/config/lua/plugins/markview.lua new file mode 100644 index 0000000..b2f3775 --- /dev/null +++ b/pkgs/custom-neovim/config/lua/plugins/markview.lua @@ -0,0 +1,5 @@ +return { + "markview.nvim", + lazy = false, + priority = 45, -- Load before treesitter. +} diff --git a/pkgs/custom-neovim/config/lua/plugins/nix.lua b/pkgs/custom-neovim/config/lua/plugins/nix.lua new file mode 100644 index 0000000..812f7da --- /dev/null +++ b/pkgs/custom-neovim/config/lua/plugins/nix.lua @@ -0,0 +1,4 @@ +return { + "vim-nix", + lazy = false, +} diff --git a/pkgs/custom-neovim/config/lua/plugins/presence.lua b/pkgs/custom-neovim/config/lua/plugins/presence.lua new file mode 100644 index 0000000..2ffb9b4 --- /dev/null +++ b/pkgs/custom-neovim/config/lua/plugins/presence.lua @@ -0,0 +1,9 @@ +return { + "presence.nvim", + lazy = false, + after = function () + require('presence').setup({ + neovim_image_text = "Neovim Text Editor", + }) + end +} diff --git a/pkgs/custom-neovim/config/lua/plugins/treesitter.lua b/pkgs/custom-neovim/config/lua/plugins/treesitter.lua new file mode 100644 index 0000000..000363a --- /dev/null +++ b/pkgs/custom-neovim/config/lua/plugins/treesitter.lua @@ -0,0 +1,4 @@ +return { + "nvim-treesitter", + lazy = false, +} diff --git a/pkgs/custom-neovim/default.nix b/pkgs/custom-neovim/default.nix index 6501f77..1ee1b91 100644 --- a/pkgs/custom-neovim/default.nix +++ b/pkgs/custom-neovim/default.nix @@ -11,19 +11,21 @@ inputs.mnw.lib.wrap pkgs { }; start = [ # Not lazy loaded. + lz-n # Lazy loader - nvim-treesitter.withAllGrammars # All treesitter grammars - vim-nix # Indentation for nix files ]; opt = [ - # Lazy loaded. + # Can be lazy loaded. # UI Plugins + nvim-treesitter.withAllGrammars # All treesitter grammars mini-clue mini-pick mini-files mini-extra - plenary-nvim + plenary-nvim # UI library + markview-nvim # Previews for markdown and more + actions-preview-nvim # Preview lsp actions # Completion Plugins blink-cmp @@ -35,12 +37,17 @@ inputs.mnw.lib.wrap pkgs { comment-nvim auto-session zoxide-vim + vim-nix # Indentation for nix files # Git Plugins mini-git mini-diff neogit + # Misc Plugins + presence-nvim # Discord RPC for nvim. + cellular-automaton-nvim # Fun useless plugin. + # Colorschemes mini-base16 nightfox-nvim diff --git a/pkgs/custom-neovim/todo.md b/pkgs/custom-neovim/todo.md index f750d97..57aa21b 100644 --- a/pkgs/custom-neovim/todo.md +++ b/pkgs/custom-neovim/todo.md @@ -1,6 +1,4 @@ # Todo -- make blink not complete in comments -- add markdown renderer -- add spellcheck to markdown -- setup actions preview keybind +- add more info to winbar (git status, etc) + |
