diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 94da620b..63d3861c 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -79,7 +79,7 @@ "nvim-jdtls": { "branch": "master", "commit": "a09f8cdd75c546eb024d0f0b5b3ad185f05b738f" }, "nvim-jqx": { "branch": "master", "commit": "11b1d0368e5b23b9c356da8e5f70bb5827f27f62" }, "nvim-lightbulb": { "branch": "master", "commit": "8f00b89dd1b1dbde16872bee5fbcee2e58c9b8e9" }, - "nvim-lint": { "branch": "master", "commit": "e366dc5ed4002d3489d03200c0b132ce2b1ba532" }, + "nvim-lint": { "branch": "master", "commit": "09aa3289a7b288f3077be682b2d910060014504f" }, "nvim-lspconfig": { "branch": "master", "commit": "38da5bbe1eaab2394056109e48c7e195bdb8fdfe" }, "nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" }, "nvim-numbertoggle": { "branch": "main", "commit": "9ab95e60ea5ec138e1b2332e0fc18b8e5de464c6" }, @@ -87,8 +87,8 @@ "nvim-regexplainer": { "branch": "main", "commit": "187f8666c2ba0fcba4ddb991e48d7229b0a58d96" }, "nvim-spectre": { "branch": "master", "commit": "696cff781a4a7ecc91549736835e2acbd00fe859" }, "nvim-toggleterm.lua": { "branch": "main", "commit": "c80844fd52ba76f48fabf83e2b9f9b93273f418d" }, - "nvim-treesitter": { "branch": "master", "commit": "eb3faef3a44641e5875581e901b0a8df8da2bde4" }, - "nvim-treesitter-context": { "branch": "master", "commit": "7227dca17316384e9b62bd6fc6b4d892572d6d4e" }, + "nvim-treesitter": { "branch": "master", "commit": "1bfefd1f98dae54576a54b59b42379b275a00414" }, + "nvim-treesitter-context": { "branch": "master", "commit": "8aa32aa6b84dda357849dbc0f775e69f2e04c041" }, "nvim-treesitter-endwise": { "branch": "master", "commit": "4c344ffc8d54d7e1ba2cefaaa2c10ea93aa1cc2d" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "23f3840b7520e009121b3175f528178136dd9834" }, "nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" }, @@ -142,8 +142,8 @@ "vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" }, "vim-uppercase-sql": { "branch": "master", "commit": "58bfde1d679a1387dabfe292b38d51d84819b267" }, "vim-wakatime": { "branch": "master", "commit": "945a441b83e48c7bafdd227ef8e2eb826f72ab90" }, - "which-key.nvim": { "branch": "main", "commit": "ce741eb559c924d72e3a67d2189ad3771a231414" }, + "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }, "windows.nvim": { "branch": "main", "commit": "c7492552b23d0ab30325e90b56066ec51242adc8" }, "yanky.nvim": { "branch": "main", "commit": "c1211c6c6d983a72c74dde44df8575a64d50562f" }, - "zen-mode.nvim": { "branch": "main", "commit": "cb73b8bd0ef9d765b942db09dc762c603a89ae44" } + "zen-mode.nvim": { "branch": "main", "commit": "50e2e2a36cc97847d9ab3b1a3555ba2ef6839b50" } } \ No newline at end of file diff --git a/.config/nvim/lazyvim.json b/.config/nvim/lazyvim.json index 0ba9a9cc..4794ad68 100644 --- a/.config/nvim/lazyvim.json +++ b/.config/nvim/lazyvim.json @@ -24,15 +24,25 @@ "lazyvim.plugins.extras.util.project", "lazyvim.plugins.extras.vscode", "plugins.extras.alpha", + "plugins.extras.annotation", + "plugins.extras.breadcrumbs", "plugins.extras.codeium", + "plugins.extras.compiler", + "plugins.extras.db", + "plugins.extras.discordrcp", + "plugins.extras.documentation", "plugins.extras.git", "plugins.extras.github", + "plugins.extras.harpoon", + "plugins.extras.rainbow-delimeters", "plugins.extras.rest-client", "plugins.extras.scrollbar", - "plugins.extras.test-extended" + "plugins.extras.smooth-scrolling", + "plugins.extras.test-extended", + "plugins.extras.zen-mode" ], "news": { "NEWS.md": "2123" }, "version": 2 -} +} \ No newline at end of file diff --git a/.config/nvim/lua/config/keymaps.lua b/.config/nvim/lua/config/keymaps.lua index 5f9a9276..25fa34cb 100644 --- a/.config/nvim/lua/config/keymaps.lua +++ b/.config/nvim/lua/config/keymaps.lua @@ -1,22 +1,6 @@ -- Keymaps are automatically loaded on the VeryLazy event -- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua -- Add any additional keymaps here -local Util = require("lazyvim.util") - -local function map(mode, lhs, rhs, opts) - local keys = require("lazy.core.handler").handlers.keys - ---@cast keys LazyKeysHandler - -- do not create the keymap if a lazy keys handler exists - if not keys.active[keys.parse({ lhs, mode = mode }).id] then - opts = opts or {} - opts.silent = opts.silent ~= false - if opts.remap and not vim.g.vscode then - opts.remap = nil - end - vim.keymap.set(mode, lhs, rhs, opts) - end -end - -- ╭───────────────────────────────────────────────────────────╮ -- │ Credit: June Gunn ?/! | Google it / Feeling lucky │ -- ╰───────────────────────────────────────────────────────────╯ @@ -43,145 +27,9 @@ end, { desc = "Google" }) if vim.lsp.inlay_hint then vim.keymap.set("n", "uh", function() vim.lsp.inlay_hint(0, nil) - Util.notify("Toggle Inlay Hints", { title = "Inlay Hints" }) end, { desc = "Toggle Inlay Hints" }) end ----@param path string -local function open(path) - vim.fn.jobstart({ vim.g.open_command, path }, { detach = true }) - vim.notify(string.format("Opening %s", path)) -end --- map( --- "n", --- "xs", --- ":FloatermNew --disposable --name=duaroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd= dua i", --- { desc = "Workspace Size (root dir)" } --- ) --- --- map( --- "n", --- "xS", --- ":FloatermNew --disposable --name=duabuffer --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd= dua i", --- { desc = "Workspace Size (cwd)" } --- ) --- --- map( --- "n", --- "fx", --- ":FloatermNew --disposable --name=xplrroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd= xplr", --- { desc = "Xplr (root dir)" } --- ) --- --- map( --- "n", --- "fX", --- ":FloatermNew --disposable --name=xplrbuffer --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd= xplr", --- { desc = "Xplr (cwd)" } --- ) --- --- map( --- "n", --- "gg", --- ":FloatermNew --disposable --name=lazygitroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd= lazygit", --- { desc = "Lazygit (root dir)" } --- ) --- --- map( --- "n", --- "gG", --- ":FloatermNew --disposable --name=lazygitbuffer --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd= lazygit", --- { desc = "Lazygit (cwd)" } --- ) --- --- map( --- "n", --- "fd", --- ":FloatermNew --disposable --name=lazydocker --opener=edit --titleposition=center --height=0.85 --width=0.85 lazydocker", --- { desc = "Lazydocker" } --- ) - --- map("n", "T", ":Telescope floaterm", { desc = "Terminals" }) - -map("n", "sz", ":Telescope zoxide list", { desc = "Zoxide" }) - -map("n", "sL", ":Telescope luasnip", { desc = "Snippets (Luasnip)" }) - -map("n", "sp", ":Telescope lazy", { desc = "Plugins (Lazy)" }) - -map("n", "si", ":Telescope import", { desc = "Imports" }) - -map("n", "cC", ":ConformInfo", { desc = "Conform Info" }) - -map("n", "cM", ":CmpStatus", { desc = "Cmp Status" }) - --- map( --- "n", --- "ft", --- ":FloatermNew --name=termroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=", --- { desc = "New Terminal (root dir)" } --- ) --- map( --- "n", --- "fT", --- ":FloatermNew --name=termcwd --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=", --- { desc = "New Terminal (cwd)" } --- ) - -vim.keymap.set("n", "", "PickColor", { noremap = true, silent = true, desc = "Pick Color" }) -vim.keymap.set("i", "", "PickColorInsert", { noremap = true, silent = true, desc = "Pick Color" }) - --- Open compiler -vim.keymap.set("n", "ccc", "CompilerOpen", { noremap = true, silent = true, desc = "Open Compiler" }) - -vim.keymap.set("n", "ccR", function() - vim.cmd("CompilerStop") - vim.cmd("CompilerRedo") -end, { noremap = true, silent = true, desc = "Redo Compiler" }) - --- Toggle compiler results -vim.keymap.set( - "n", - "ccr", - "CompilerToggleResults", - { noremap = true, silent = true, desc = "Toggle Compiler Results" } -) - -vim.api.nvim_set_keymap( - "n", - "cPs", - "lua require('package-info').show({ force = true })", - { silent = true, noremap = true, desc = "Show Package Versions" } -) - -vim.api.nvim_set_keymap( - "n", - "cPu", - "lua require('package-info').update()", - { silent = true, noremap = true, desc = "Update Package" } -) - -vim.api.nvim_set_keymap( - "n", - "cPr", - "lua require('package-info').delete()", - { silent = true, noremap = true, desc = "Remove Package" } -) - -vim.api.nvim_set_keymap( - "n", - "cPv", - "lua require('package-info').change_version()", - { silent = true, noremap = true, desc = "Change Package Version" } -) - -vim.api.nvim_set_keymap( - "n", - "cPn", - "lua require('package-info').install()", - { silent = true, noremap = true, desc = "Install New Dependency" } -) - vim.keymap.set("n", "", "zz") vim.keymap.set("n", "", "zz") @@ -190,90 +38,6 @@ vim.keymap.set("n", "n", "nzzzv") vim.keymap.set("n", "N", "Nzzzv") -local function goto_prev_node() - local ts_utils = require("nvim-treesitter.ts_utils") - local node = ts_utils.get_node_at_cursor() - if not node then - return - end - local dest_node = ts_utils.get_previous_node(node, true, true) - if not dest_node then - local cur_node = node:parent() - while cur_node do - dest_node = ts_utils.get_previous_node(cur_node, false, false) - if dest_node then - break - end - cur_node = cur_node:parent() - end - end - if not dest_node then - return - end - ts_utils.goto_node(dest_node) -end - -local function goto_next_node() - local ts_utils = require("nvim-treesitter.ts_utils") - local node = ts_utils.get_node_at_cursor() - if not node then - return - end - local dest_node = ts_utils.get_next_node(node, true, true) - if not dest_node then - local cur_node = node:parent() - while cur_node do - dest_node = ts_utils.get_next_node(cur_node, false, false) - if dest_node then - break - end - cur_node = cur_node:parent() - end - end - if not dest_node then - return - end - ts_utils.goto_node(dest_node) -end - -local function goto_parent_node() - local ts_utils = require("nvim-treesitter.ts_utils") - local node = ts_utils.get_node_at_cursor() - if not node then - return - end - local dest_node = node:parent() - if not dest_node then - return - end - ts_utils.goto_node(dest_node) -end - -local function goto_child_node() - local ts_utils = require("nvim-treesitter.ts_utils") - local node = ts_utils.get_node_at_cursor() - if not node then - return - end - local dest_node = ts_utils.get_named_children(node)[1] - if not dest_node then - return - end - ts_utils.goto_node(dest_node) -end - -local keyopts = { noremap = true, silent = true } - -vim.keymap.set({ "n", "v", "o", "i" }, "", goto_parent_node, keyopts) -vim.keymap.set({ "n", "v", "o", "i" }, "", goto_child_node, keyopts) -vim.keymap.set({ "n", "v", "o", "i" }, "", goto_next_node, keyopts) -vim.keymap.set({ "n", "v", "o", "i" }, "", goto_prev_node, keyopts) - --- vim.keymap.set({ "n", "v", "o", "i" }, "", goto_parent_node, keyopts) --- vim.keymap.set({ "n", "v", "o", "i" }, "", goto_child_node, keyopts) --- vim.keymap.set({ "n", "v", "o", "i" }, "", goto_next_node, keyopts) --- vim.keymap.set({ "n", "v", "o", "i" }, "", goto_prev_node, keyopts) - -- DEFAULT_KEYMAPS: -- Half-window movements: @@ -347,9 +111,12 @@ vim.keymap.set({ "n", "x" }, "l", "lua Scroll('l', 0, 1)") vim.keymap.set({ "n", "x" }, "", "lua Scroll('h', 0, 1)") vim.keymap.set({ "n", "x" }, "", "lua Scroll('l', 0, 1)") -vim.keymap.set("n", "", "noh", { noremap = true, silent = true, desc = "Clear Search" }) +-- LSP_KEYMAPS: --- vim.keymap.set({ "n", "o", "x" }, "w", "lua require('spider').motion('w')", { desc = "Spider-w" }) --- vim.keymap.set({ "n", "o", "x" }, "e", "lua require('spider').motion('e')", { desc = "Spider-e" }) --- vim.keymap.set({ "n", "o", "x" }, "b", "lua require('spider').motion('b')", { desc = "Spider-b" }) --- vim.keymap.set({ "n", "o", "x" }, "ge", "lua require('spider').motion('ge')", { desc = "Spider-ge" }) +-- LSP go-to-definition: +vim.keymap.set("n", "gd", "lua Scroll('definition')") + +-- LSP go-to-declaration: +vim.keymap.set("n", "gD", "lua Scroll('declaration')") + +vim.keymap.set("n", "", "noh", { noremap = true, silent = true, desc = "Clear Search" }) diff --git a/.config/nvim/lua/config/options.lua b/.config/nvim/lua/config/options.lua index 6a549730..e443bd42 100644 --- a/.config/nvim/lua/config/options.lua +++ b/.config/nvim/lua/config/options.lua @@ -80,25 +80,6 @@ if vim.g.neovide then vim.g.neovide_theme = "catppuccin-macchiato" end -vim.api.nvim_set_var("terminal_color_0", "#494D64") -vim.api.nvim_set_var("terminal_color_1", "#ED8796") -vim.api.nvim_set_var("terminal_color_2", "#A6DA95") -vim.api.nvim_set_var("terminal_color_3", "#EED49F") -vim.api.nvim_set_var("terminal_color_4", "#8AADF4") -vim.api.nvim_set_var("terminal_color_5", "#F5BDE6") -vim.api.nvim_set_var("terminal_color_6", "#8BD5CA") -vim.api.nvim_set_var("terminal_color_7", "#B8C0E0") -vim.api.nvim_set_var("terminal_color_8", "#5B6078") -vim.api.nvim_set_var("terminal_color_9", "#ED8796") -vim.api.nvim_set_var("terminal_color_10", "#A6DA95") -vim.api.nvim_set_var("terminal_color_11", "#EED49F") -vim.api.nvim_set_var("terminal_color_12", "#8AADF4") -vim.api.nvim_set_var("terminal_color_13", "#F5BDE6") -vim.api.nvim_set_var("terminal_color_14", "#8BD5CA") -vim.api.nvim_set_var("terminal_color_15", "#B8C0E0") - -vim.opt.shell = "fish" - vim.o.winwidth = 10 vim.o.winminwidth = 10 vim.o.equalalways = false diff --git a/.config/nvim/lua/plugins/actions-preview.lua b/.config/nvim/lua/plugins/actions-preview.lua deleted file mode 100644 index cb6742dc..00000000 --- a/.config/nvim/lua/plugins/actions-preview.lua +++ /dev/null @@ -1,21 +0,0 @@ -return { - { - "aznhe21/actions-preview.nvim", - event = "BufRead", - opts = { - telescope = { - sorting_strategy = "ascending", - layout_strategy = "vertical", - layout_config = { - width = 0.8, - height = 0.9, - prompt_position = "top", - preview_cutoff = 20, - preview_height = function(_, _, max_lines) - return max_lines - 15 - end, - }, - }, - }, - }, -} diff --git a/.config/nvim/lua/plugins/autotag.lua b/.config/nvim/lua/plugins/autotag.lua deleted file mode 100644 index 135a7f54..00000000 --- a/.config/nvim/lua/plugins/autotag.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - { - "windwp/nvim-ts-autotag", - event = "InsertEnter", - opts = {}, - }, -} diff --git a/.config/nvim/lua/plugins/cmp.lua b/.config/nvim/lua/plugins/cmp.lua index 649ce93c..c2d112c5 100644 --- a/.config/nvim/lua/plugins/cmp.lua +++ b/.config/nvim/lua/plugins/cmp.lua @@ -8,6 +8,33 @@ return { "vuki656/package-info.nvim", event = { "BufRead package.json" }, opts = {}, + keys = { + { + "cPs", + "lua require('package-info').show({ force = true })", + desc = "Show Package Versions", + }, + { + "cPu", + "lua require('package-info').update()", + desc = "Update Package", + }, + { + "cPr", + "lua require('package-info').delete()", + desc = "Remove Package", + }, + { + "cPv", + "lua require('package-info').change_version()", + desc = "Change Package Version", + }, + { + "cPn", + "lua require('package-info').install()", + desc = "Install New Dependency", + }, + }, }, { "petertriho/cmp-git", @@ -16,16 +43,19 @@ return { "amarakon/nvim-cmp-fonts", }, }, + keys = { + { "cM", ":CmpStatus", { desc = "Cmp Status" } }, + }, opts = function(_, opts) cmp.setup.filetype("gitcommit", { sources = cmp.config.sources({ - { name = "git" }, -- You can specify the `git` source if [you were installed it](https://github.com/petertriho/cmp-git). + { name = "git" }, }), }) cmp.setup.filetype("css", { sources = cmp.config.sources({ - { name = "fonts", option = { space_filter = "-" } }, -- You can specify the `git` source if [you were installed it](https://github.com/petertriho/cmp-git). + { name = "fonts", option = { space_filter = "-" } }, }), }) opts.mapping = cmp.mapping.preset.insert({ @@ -51,4 +81,12 @@ return { } end, }, + { + "folke/which-key.nvim", + opts = { + defaults = { + ["cP"] = { name = "+packages" }, + }, + }, + }, } diff --git a/.config/nvim/lua/plugins/colorizer.lua b/.config/nvim/lua/plugins/colorizer.lua deleted file mode 100644 index 68fdedee..00000000 --- a/.config/nvim/lua/plugins/colorizer.lua +++ /dev/null @@ -1,34 +0,0 @@ -return { - { - "NvChad/nvim-colorizer.lua", - event = { "BufReadPre", "BufNewFile" }, - enabled = false, - opts = { - filetypes = { "*", "!help" }, - user_default_options = { - RGB = true, -- #RGB hex codes - RRGGBB = true, -- #RRGGBB hex codes - names = false, -- "Name" codes like Blue or blue - RRGGBBAA = true, -- #RRGGBBAA hex codes - AARRGGBB = true, -- 0xAARRGGBB hex codes - rgb_fn = true, -- CSS rgb() and rgba() functions - hsl_fn = true, -- CSS hsl() and hsla() functions - css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB - css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn - -- Available modes for `mode`: foreground, background, virtualtext - mode = "background", -- Set the display mode. - -- Available methods are false / true / "normal" / "lsp" / "both" - -- True is same as normal - tailwind = true, -- Enable tailwind colors - -- parsers can contain values used in |user_default_options| - sass = { enable = false, parsers = { "css" } }, -- Enable sass colors - virtualtext = "■", - -- update color values even if buffer is not focused - -- example use: cmp_menu, cmp_docs - always_update = false, - }, - -- all the sub-options of filetypes apply to buftypes - buftypes = {}, - }, - }, -} diff --git a/.config/nvim/lua/plugins/compiler.lua b/.config/nvim/lua/plugins/compiler.lua deleted file mode 100644 index aaf8a887..00000000 --- a/.config/nvim/lua/plugins/compiler.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - { - "Zeioth/compiler.nvim", - cmd = { "CompilerOpen", "CompilerToggleResults", "CompilerRedo" }, - dependencies = { "stevearc/overseer.nvim" }, - opts = {}, - }, -} diff --git a/.config/nvim/lua/plugins/neogen.lua b/.config/nvim/lua/plugins/extras/annotation.lua similarity index 87% rename from .config/nvim/lua/plugins/neogen.lua rename to .config/nvim/lua/plugins/extras/annotation.lua index 64a6f265..1cd967c2 100644 --- a/.config/nvim/lua/plugins/neogen.lua +++ b/.config/nvim/lua/plugins/extras/annotation.lua @@ -44,4 +44,12 @@ return { }, }, }, + { + "folke/which-key.nvim", + opts = { + defaults = { + ["a"] = { name = "+annotation" }, + }, + }, + }, } diff --git a/.config/nvim/lua/plugins/dropbar.lua b/.config/nvim/lua/plugins/extras/breadcrumbs.lua similarity index 100% rename from .config/nvim/lua/plugins/dropbar.lua rename to .config/nvim/lua/plugins/extras/breadcrumbs.lua diff --git a/.config/nvim/lua/plugins/extras/compiler.lua b/.config/nvim/lua/plugins/extras/compiler.lua new file mode 100644 index 00000000..39ddf9ec --- /dev/null +++ b/.config/nvim/lua/plugins/extras/compiler.lua @@ -0,0 +1,36 @@ +return { + { + "Zeioth/compiler.nvim", + cmd = { "CompilerOpen", "CompilerToggleResults", "CompilerRedo" }, + dependencies = { "stevearc/overseer.nvim" }, + opts = {}, + keys = { + { + "ccc", + "CompilerOpen", + { noremap = true, silent = true, desc = "Open Compiler", mode = { "n" } }, + }, + { + "ccR", + function() + vim.cmd("CompilerStop") + vim.cmd("CompilerRedo") + end, + { noremap = true, silent = true, desc = "Redo Compiler", mode = { "n" } }, + }, + { + "ccr", + "CompilerToggleResults", + { noremap = true, silent = true, desc = "Toggle Compiler Results", mode = { "n" } }, + }, + }, + }, + { + "folke/which-key.nvim", + opts = { + defaults = { + ["cc"] = { name = "+compile" }, + }, + }, + }, +} diff --git a/.config/nvim/lua/plugins/dadbod.lua b/.config/nvim/lua/plugins/extras/db.lua similarity index 90% rename from .config/nvim/lua/plugins/dadbod.lua rename to .config/nvim/lua/plugins/extras/db.lua index d40316ae..8a332283 100644 --- a/.config/nvim/lua/plugins/dadbod.lua +++ b/.config/nvim/lua/plugins/extras/db.lua @@ -41,4 +41,12 @@ return { { "Dq", "DBUILastQueryInfo", desc = "Last Query Info" }, }, }, + { + "folke/which-key.nvim", + opts = { + defaults = { + ["D"] = { name = "+database" }, + }, + }, + }, } diff --git a/.config/nvim/lua/plugins/discordrcp.lua b/.config/nvim/lua/plugins/extras/discordrcp.lua similarity index 100% rename from .config/nvim/lua/plugins/discordrcp.lua rename to .config/nvim/lua/plugins/extras/discordrcp.lua diff --git a/.config/nvim/lua/plugins/devdocs.lua b/.config/nvim/lua/plugins/extras/documentation.lua similarity index 100% rename from .config/nvim/lua/plugins/devdocs.lua rename to .config/nvim/lua/plugins/extras/documentation.lua diff --git a/.config/nvim/lua/plugins/extras/git.lua b/.config/nvim/lua/plugins/extras/git.lua index 87cc79d7..082bdb94 100644 --- a/.config/nvim/lua/plugins/extras/git.lua +++ b/.config/nvim/lua/plugins/extras/git.lua @@ -20,4 +20,12 @@ return { { "]g", "GitConflictPrevConflict", desc = "Next Git Conflict" }, }, }, + { + "folke/which-key.nvim", + opts = { + defaults = { + ["gc"] = { name = "+conflicts" }, + }, + }, + }, } diff --git a/.config/nvim/lua/plugins/extras/github.lua b/.config/nvim/lua/plugins/extras/github.lua index 34c01459..3db7e2b0 100644 --- a/.config/nvim/lua/plugins/extras/github.lua +++ b/.config/nvim/lua/plugins/extras/github.lua @@ -14,6 +14,7 @@ return { "folke/which-key.nvim", opts = { defaults = { + ["G"] = { name = "+github" }, ["Gc"] = { name = "+comments" }, ["Gt"] = { name = "+threads" }, ["Gi"] = { name = "+issues" }, diff --git a/.config/nvim/lua/plugins/harpoon.lua b/.config/nvim/lua/plugins/extras/harpoon.lua similarity index 100% rename from .config/nvim/lua/plugins/harpoon.lua rename to .config/nvim/lua/plugins/extras/harpoon.lua diff --git a/.config/nvim/lua/plugins/multicursor.lua b/.config/nvim/lua/plugins/extras/multicursor.lua similarity index 100% rename from .config/nvim/lua/plugins/multicursor.lua rename to .config/nvim/lua/plugins/extras/multicursor.lua diff --git a/.config/nvim/lua/plugins/rainbow-delimeters.lua b/.config/nvim/lua/plugins/extras/rainbow-delimeters.lua similarity index 100% rename from .config/nvim/lua/plugins/rainbow-delimeters.lua rename to .config/nvim/lua/plugins/extras/rainbow-delimeters.lua diff --git a/.config/nvim/lua/plugins/cinnamon.lua b/.config/nvim/lua/plugins/extras/smooth-scrolling.lua similarity index 100% rename from .config/nvim/lua/plugins/cinnamon.lua rename to .config/nvim/lua/plugins/extras/smooth-scrolling.lua diff --git a/.config/nvim/lua/plugins/extras/zen-mode.lua b/.config/nvim/lua/plugins/extras/zen-mode.lua new file mode 100644 index 00000000..0215376b --- /dev/null +++ b/.config/nvim/lua/plugins/extras/zen-mode.lua @@ -0,0 +1,20 @@ +return { + { + "folke/zen-mode.nvim", + cmd = "ZenMode", + keys = { { "uz", "ZenMode", desc = "Toggle Zen Mode" } }, + opts = { + plugins = { + scrollview = { enabled = false }, + satellite = { enabled = false }, + gitsigns = { enabled = false }, + }, + }, + }, + { + "folke/twilight.nvim", + cmd = "Twilight", + keys = { { "uZ", "Twilight", desc = "Toggle Twilight" } }, + opts = {}, + }, +} diff --git a/.config/nvim/lua/plugins/lspconfig.lua b/.config/nvim/lua/plugins/lsp.lua similarity index 90% rename from .config/nvim/lua/plugins/lspconfig.lua rename to .config/nvim/lua/plugins/lsp.lua index ba21f174..2efbcbe2 100644 --- a/.config/nvim/lua/plugins/lspconfig.lua +++ b/.config/nvim/lua/plugins/lsp.lua @@ -146,4 +146,32 @@ return { } end, }, + { + "aznhe21/actions-preview.nvim", + event = "BufRead", + opts = { + telescope = { + sorting_strategy = "ascending", + layout_strategy = "vertical", + layout_config = { + width = 0.8, + height = 0.9, + prompt_position = "top", + preview_cutoff = 20, + preview_height = function(_, _, max_lines) + return max_lines - 15 + end, + }, + }, + }, + }, + { + "dnlhc/glance.nvim", + cmd = { "Glance" }, + opts = { + border = { + enable = true, + }, + }, + }, } diff --git a/.config/nvim/lua/plugins/refactor.lua b/.config/nvim/lua/plugins/refactor.lua index 2cdf1bc9..7636e99d 100644 --- a/.config/nvim/lua/plugins/refactor.lua +++ b/.config/nvim/lua/plugins/refactor.lua @@ -21,4 +21,12 @@ return { { "cRp", function() require('refactoring').debug.print_var({}) end, mode = {"v"}, desc = "Debug Print Variable" }, }, }, + { + "folke/which-key.nvim", + opts = { + defaults = { + ["cR"] = { name = "+refactor" }, + }, + }, + }, } diff --git a/.config/nvim/lua/plugins/spectre.lua b/.config/nvim/lua/plugins/spectre.lua index 78d226ac..08440307 100644 --- a/.config/nvim/lua/plugins/spectre.lua +++ b/.config/nvim/lua/plugins/spectre.lua @@ -1,8 +1,8 @@ return { - { - "nvim-pack/nvim-spectre", - cmd = "Spectre", - opts = { open_cmd = "noswapfile vnew" }, + { + "nvim-pack/nvim-spectre", + cmd = "Spectre", + opts = { open_cmd = "noswapfile vnew" }, -- stylua: ignore keys = { { "srf", function() require("spectre").toggle() end, desc = "Replace globally" }, @@ -10,5 +10,13 @@ return { { "srw", mode = {"v"},function() require("spectre").open_visual() end, desc = "Current Word" }, { "src", mode = {"n"},function() require("spectre").open_file_search({select_word=true}) end, desc = "Word on Current File" }, }, + }, + { + "folke/which-key.nvim", + opts = { + defaults = { + ["sr"] = { name = "+replace" }, + }, }, + }, } diff --git a/.config/nvim/lua/plugins/spider.lua b/.config/nvim/lua/plugins/spider.lua index 63c7f128..a0331475 100644 --- a/.config/nvim/lua/plugins/spider.lua +++ b/.config/nvim/lua/plugins/spider.lua @@ -3,8 +3,12 @@ return { "chrisgrieser/nvim-spider", lazy = true, enabled = false, - config = function() - require("spider").setup({}) - end, + opts = {}, + keys = { + { "w", "lua require('spider').motion('w')", mode = { "n", "o", "x" }, desc = "Spider-w" }, + { "e", "lua require('spider').motion('e')", mode = { "n", "o", "x" }, desc = "Spider-e" }, + { "b", "lua require('spider').motion('b')", mode = { "n", "o", "x" }, desc = "Spider-b" }, + { "ge", "lua require('spider').motion('ge')", mode = { "n", "o", "x" }, desc = "Spider-ge" }, + }, }, } diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua index 71f30e48..1c44f27f 100644 --- a/.config/nvim/lua/plugins/telescope.lua +++ b/.config/nvim/lua/plugins/telescope.lua @@ -109,6 +109,9 @@ return { require("telescope").load_extension("import") end) end, + keys = { + { "si", ":Telescope import", { desc = "Imports" } }, + }, }, { "jvgrootveld/telescope-zoxide", @@ -117,6 +120,9 @@ return { require("telescope").load_extension("zoxide") end) end, + keys = { + { "sz", ":Telescope zoxide list", { desc = "Zoxide" } }, + }, }, { "tsakirist/telescope-lazy.nvim", @@ -125,6 +131,9 @@ return { require("telescope").load_extension("lazy") end) end, + keys = { + { "sp", ":Telescope lazy", { desc = "Plugins (Lazy)" } }, + }, }, }, keys = { @@ -444,4 +453,14 @@ return { require("telescope").load_extension("refactoring"), }, }, + { + "folke/which-key.nvim", + opts = { + defaults = { + ["sS"] = { name = "+Goto Symbols (Workspace)" }, + ["ss"] = { name = "+Goto Symbols" }, + ["gw"] = { name = "+worktrees" }, + }, + }, + }, } diff --git a/.config/nvim/lua/plugins/twilight.lua b/.config/nvim/lua/plugins/twilight.lua deleted file mode 100644 index 6b0d3dba..00000000 --- a/.config/nvim/lua/plugins/twilight.lua +++ /dev/null @@ -1,29 +0,0 @@ -return { - { - "folke/twilight.nvim", - cmd = "Twilight", - keys = { { "uZ", "Twilight", desc = "Toggle Twilight" } }, - opts = { - { - dimming = { - alpha = 0.25, -- amount of dimming - -- we try to get the foreground from the highlight groups or fallback color - color = { "Normal", "#ffffff" }, - term_bg = "#000000", -- if guibg=NONE, this will be used to calculate text color - inactive = false, -- when true, other windows will be fully dimmed (unless they contain the same buffer) - }, - context = 20, -- amount of lines we will try to show around the current line - treesitter = true, -- use treesitter when available for the filetype - -- treesitter is used to automatically expand the visible text, - -- but you can further control the types of nodes that should always be fully expanded - expand = { -- for treesitter, we always try to expand to the top-most ancestor with these types - "function", - "method", - "table", - "if_statement", - }, - exclude = {}, -- exclude these filetypes - }, - }, - }, -} diff --git a/.config/nvim/lua/plugins/which-key.lua b/.config/nvim/lua/plugins/which-key.lua index 3120fb6f..2b195f1b 100644 --- a/.config/nvim/lua/plugins/which-key.lua +++ b/.config/nvim/lua/plugins/which-key.lua @@ -3,36 +3,8 @@ return { "folke/which-key.nvim", event = "VeryLazy", opts = { - plugins = { spelling = true }, defaults = { - mode = { "n", "v" }, - ["g"] = { name = "+goto" }, - ["gs"] = { name = "+surround" }, - ["]"] = { name = "+next" }, - ["["] = { name = "+prev" }, - [""] = { name = "+tabs" }, - ["a"] = { name = "+annotation" }, - ["b"] = { name = "+buffer" }, - ["c"] = { name = "+code" }, - ["f"] = { name = "+file/find" }, - ["g"] = { name = "+git" }, - ["gh"] = { name = "+hunks" }, - ["q"] = { name = "+quit/session" }, - ["s"] = { name = "+search" }, - ["u"] = { name = "+ui" }, - ["w"] = { name = "+windows" }, - ["x"] = { name = "+diagnostics/quickfix" }, - ["cc"] = { name = "+compile" }, - ["cP"] = { name = "+packages" }, - ["gw"] = { name = "+worktrees" }, - ["cR"] = { name = "+refactor" }, - ["D"] = { name = "+database" }, - ["sS"] = { name = "+Goto Symbols (Workspace)" }, - ["ss"] = { name = "+Goto Symbols" }, - ["sr"] = { name = "+replace" }, ["dP"] = { name = "+python" }, - ["gc"] = { name = "+conflicts" }, - ["G"] = { name = "+github" }, }, }, }, diff --git a/.config/nvim/lua/plugins/zen-mode.lua b/.config/nvim/lua/plugins/zen-mode.lua deleted file mode 100644 index 26c4dcc6..00000000 --- a/.config/nvim/lua/plugins/zen-mode.lua +++ /dev/null @@ -1,14 +0,0 @@ -return { - { - "folke/zen-mode.nvim", - cmd = "ZenMode", - keys = { { "uz", "ZenMode", desc = "Toggle Zen Mode" } }, - opts = { - plugins = { - scrollview = { enabled = false }, - satellite = { enabled = false }, - gitsigns = { enabled = false }, - }, - }, - }, -}