diff options
| author | triethyl <triethylammonium@pm.me> | 2025-08-30 18:57:20 -0400 |
|---|---|---|
| committer | triethyl <triethylammonium@pm.me> | 2025-08-30 18:57:20 -0400 |
| commit | ed3969bd55524c11e5f48fb7147e46310117ef02 (patch) | |
| tree | 8769177253c33925138b2cb29d3dd9931c45420b /pkgs/custom-neovim/config/lua | |
| parent | a6e2d28ba490818357dc5d9063f2afc5c7cda997 (diff) | |
neovim: bunch of stuff
Diffstat (limited to 'pkgs/custom-neovim/config/lua')
| -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 |
8 files changed, 64 insertions, 11 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, +} |
