From ed3969bd55524c11e5f48fb7147e46310117ef02 Mon Sep 17 00:00:00 2001 From: triethyl Date: Sat, 30 Aug 2025 18:57:20 -0400 Subject: neovim: bunch of stuff --- pkgs/custom-neovim/config/lua/keymaps.lua | 13 +++++++++-- pkgs/custom-neovim/config/lua/lsp.lua | 2 +- .../config/lua/plugins/actions-preview.lua | 12 ++++++++++ .../config/lua/plugins/completion.lua | 26 +++++++++++++++------- pkgs/custom-neovim/config/lua/plugins/markview.lua | 5 +++++ pkgs/custom-neovim/config/lua/plugins/nix.lua | 4 ++++ pkgs/custom-neovim/config/lua/plugins/presence.lua | 9 ++++++++ .../config/lua/plugins/treesitter.lua | 4 ++++ 8 files changed, 64 insertions(+), 11 deletions(-) create mode 100644 pkgs/custom-neovim/config/lua/plugins/actions-preview.lua create mode 100644 pkgs/custom-neovim/config/lua/plugins/markview.lua create mode 100644 pkgs/custom-neovim/config/lua/plugins/nix.lua create mode 100644 pkgs/custom-neovim/config/lua/plugins/presence.lua create mode 100644 pkgs/custom-neovim/config/lua/plugins/treesitter.lua (limited to 'pkgs/custom-neovim/config') 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", "tc", "Close current tab", ":tabclose") -- Session mapkey("n", "w", "Manage sessions", "") -mapkey("n", "ww", "Open a session", ":Autosession search", {"mini.pick"}) -mapkey("n", "wd", "Delete a session", ":Autosession delete", {"mini.pick"}) +mapkey("n", "ww", "Open a session", ":Autosession search", "mini.pick") +mapkey("n", "wd", "Delete a session", ":Autosession delete", "mini.pick") -- Terminal mapkey("n", "c", "Open terminal", ":botright terminal") +-- Markview +mapkey("n", "v", "Toggle markview", ":Markview", "markview.nvim") + +-- Toggle spellcheck +mapkey("n", "zq", "Toggle spellcheck", ":set spell!") + -- Really delete mapkey({"n", "v"}, "d", "Really delete", [["_d]]) mapkey({"n", "v"}, "x", "Really delete character", [["_x]]) @@ -56,6 +62,9 @@ mapkey({"n", "v"}, "k", "Go up visually", "gk") mapkey({"n", "v"}, "", "Go down visually", "gj") mapkey({"n", "v"}, "", "Go up visually", "gk") +-- Falling key +mapkey("n", "u", "Make it rain", ":CellularAutomaton make_it_rain", "cellular-automaton.nvim") + -- QOL Keys mapkey("t", "", "Exit terminal insert mode", "") vim.keymap.set("c", "", 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', "a", "Perform code action", ":lua require('actions-preview').code_actions()") + mapkey('n', "a", "Perform code action", ":lua require('actions-preview').code_actions()", "actions-preview.nvim") mapkey("n", "S", "Open workspace symbol picker", [[:Pick lsp scope="workspace_symbol"]], "mini.pick") mapkey("n", "s", "Open symbol picker", [[:Pick lsp scope="document_symbol"]], "mini.pick") mapkey("n", "I", "Open workspace diagnostic picker", [[:Pick diagnostic scope="all"]], "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, +} -- cgit v1.2.3