From 5c3b4118aa4488143521d249f1ec0ec726cd4dac Mon Sep 17 00:00:00 2001 From: Daniel Heras Quesada Date: Wed, 1 Apr 2026 11:12:48 +0200 Subject: [PATCH] refactor: plugin cleanup to define the basic nvim shell --- README.md | 14 +- init.lua | 10 +- lazy-lock.json | 41 +--- lsp/astro.lua | 8 - lsp/bashls.lua | 5 - lsp/clangd.lua | 5 - lsp/cssls.lua | 5 - lsp/denols.lua | 6 - lsp/emmet.lua | 5 - lsp/gopls.lua | 5 - lsp/html.lua | 5 - lsp/jdtls.lua | 5 - lsp/jsonls.lua | 4 - lsp/luals.lua | 5 - lsp/pyright.lua | 5 - lsp/rust_analyzer.lua | 5 - lsp/solargraph.lua | 5 - lua/config/autocmds.lua | 25 +- lua/config/lsp.lua | 15 +- lua/config/monkeylist.lua | 1 - lua/config/remap.lua | 272 ++++----------------- lua/plugins/blueprints.lua | 12 - lua/plugins/code-utils.lua | 101 -------- lua/plugins/context.lua | 97 -------- lua/plugins/formater.lua | 11 - lua/plugins/git.lua | 31 --- lua/plugins/help.lua | 95 +++----- lua/plugins/ia.lua | 19 -- lua/plugins/navigation.lua | 2 - lua/plugins/opts/aerialview.lua | 323 ------------------------- lua/plugins/opts/autoclose.lua | 24 -- lua/plugins/opts/bufferline.lua | 112 --------- lua/plugins/opts/cmp.lua | 83 ------- lua/plugins/opts/conformFormat.lua | 35 --- lua/plugins/opts/gitsigns.lua | 51 ---- lua/plugins/opts/lualine.lua | 43 ---- lua/plugins/opts/neotree.lua | 282 --------------------- lua/plugins/opts/noice.lua | 81 ------- lua/plugins/opts/scrollbar.lua | 153 ------------ lua/plugins/opts/todocomments.lua | 0 lua/plugins/opts/treesitter.lua | 35 --- lua/plugins/opts/treesitterContext.lua | 16 -- lua/plugins/preview.lua | 18 -- lua/plugins/qol.lua | 36 --- lua/plugins/search.lua | 21 -- lua/plugins/style.lua | 79 ------ 46 files changed, 120 insertions(+), 2091 deletions(-) delete mode 100644 lsp/astro.lua delete mode 100644 lsp/bashls.lua delete mode 100644 lsp/clangd.lua delete mode 100644 lsp/cssls.lua delete mode 100644 lsp/denols.lua delete mode 100644 lsp/emmet.lua delete mode 100644 lsp/gopls.lua delete mode 100644 lsp/html.lua delete mode 100644 lsp/jdtls.lua delete mode 100644 lsp/jsonls.lua delete mode 100644 lsp/luals.lua delete mode 100644 lsp/pyright.lua delete mode 100644 lsp/rust_analyzer.lua delete mode 100644 lsp/solargraph.lua delete mode 100644 lua/config/monkeylist.lua delete mode 100644 lua/plugins/blueprints.lua delete mode 100644 lua/plugins/code-utils.lua delete mode 100644 lua/plugins/context.lua delete mode 100644 lua/plugins/formater.lua delete mode 100644 lua/plugins/git.lua delete mode 100644 lua/plugins/ia.lua delete mode 100644 lua/plugins/navigation.lua delete mode 100644 lua/plugins/opts/aerialview.lua delete mode 100644 lua/plugins/opts/autoclose.lua delete mode 100644 lua/plugins/opts/bufferline.lua delete mode 100644 lua/plugins/opts/cmp.lua delete mode 100644 lua/plugins/opts/conformFormat.lua delete mode 100644 lua/plugins/opts/gitsigns.lua delete mode 100644 lua/plugins/opts/lualine.lua delete mode 100644 lua/plugins/opts/neotree.lua delete mode 100644 lua/plugins/opts/noice.lua delete mode 100644 lua/plugins/opts/scrollbar.lua delete mode 100644 lua/plugins/opts/todocomments.lua delete mode 100644 lua/plugins/opts/treesitter.lua delete mode 100644 lua/plugins/opts/treesitterContext.lua delete mode 100644 lua/plugins/preview.lua delete mode 100644 lua/plugins/qol.lua diff --git a/README.md b/README.md index 57fd9ab..70ffee3 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,18 @@ # README -## Deps +## Project structure -- [Emmet language server](https://github.com/olrtg/emmet-language-server) +- `init.lua`: root config file, commonly used to manage the vim global variables. +- `lua/`: main code directory + - `config/`: main config directory, it is required inside the `/init.lua`, therefore its name is arbitrary. + - `init.lua`: module definition file, simply exports the rest + - `lazy.lua`: initializes the `lazy.nvim` plugin manager + - `lsp.lua`: initializes every language server defined, this can be deleted if you decide to use a plugin such as `lsp-zero`, `lsp-config` or anything as such. Note: `lsp-config` is a plugin that is not a plugin, it simply provides a common `/lsp/` definitions, pretty handy. + - `autocmds.lua`: organization module to define `autocmds` (event handlers). + - `remap.lua`: another organization module, this one is used to define key mappings. The name is arbitrary. + - `plugins/`: main plugin directory, files inside will be automatically read and are only required to return (export) a table with the plugins list. + - `opts/`: arbitrary name, just some plugin configs organized to avoid bloating the `plugins` files +- `lsp/`: language server definitions ### Language servers diff --git a/init.lua b/init.lua index be19a7e..76463ef 100644 --- a/init.lua +++ b/init.lua @@ -25,8 +25,8 @@ vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos, -- ╭─────────────╮ -- │ Colorscheme │ -- ╰─────────────╯ -vim.cmd("colorscheme komau") -- rose-pine, gruvbox, koda-{dark/light/moss/glade}, komau -vim.o.background = "dark" -- "dark" or "light" +vim.cmd("colorscheme gruvbox") +vim.o.background = "dark" -- "dark" or "light" -- ╭───────────────────╮ -- │ Default clipboard │ @@ -51,9 +51,3 @@ vim.fn.sign_define("DiagnosticSignError", { text = " ", texthl = "DiagnosticS vim.fn.sign_define("DiagnosticSignWarn", { text = " ", texthl = "DiagnosticSignWarn" }) vim.fn.sign_define("DiagnosticSignInfo", { text = " ", texthl = "DiagnosticSignInfo" }) vim.fn.sign_define("DiagnosticSignHint", { text = "󰌵", texthl = "DiagnosticSignHint" }) - --- ╭─────────────────────╮ --- │ IA initial disables │ --- ╰─────────────────────╯ -vim.b.copilot_enabled = false -vim.g.copilot_enabled = false diff --git a/lazy-lock.json b/lazy-lock.json index 62032ab..95573f0 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,46 +1,11 @@ { - "aerial.nvim": { "branch": "master", "commit": "645d108a5242ec7b378cbe643eb6d04d4223f034" }, - "auto-session": { "branch": "main", "commit": "62437532b38495551410b3f377bcf4aaac574ebe" }, - "autoclose.nvim": { "branch": "main", "commit": "3f86702b54a861a17d7994b2e32a7c648cb12fb1" }, - "blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" }, - "blueprints": { "branch": "main", "commit": "e5825c30464f98e77e8b5ffb88d59fd98df6c802" }, - "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, - "codecompanion.nvim": { "branch": "main", "commit": "1913b5aa05745bca90d7912c76ed118f1744a620" }, - "conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" }, - "copilot.vim": { "branch": "release", "commit": "a12fd5672110c8aa7e3c8419e28c96943ca179be" }, - "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, - "flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" }, - "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, - "gitsigns.nvim": { "branch": "main", "commit": "7c4faa3540d0781a28588cafbd4dd187a28ac6e3" }, - "grug-far.nvim": { "branch": "main", "commit": "ac52ee2d87399dfd7b0d59d5b1d2bbaf2a4028f1" }, "gruvbox.nvim": { "branch": "main", "commit": "334d5fd49fc8033f26408425366c66c6390c57bb" }, - "indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" }, - "koda.nvim": { "branch": "main", "commit": "a560a332ccc1eb2caacb280a390213bb9f37b3cb" }, - "komau.vim": { "branch": "master", "commit": "4666b5b15f4ab3f6f59f6aae13a394f9e8652767" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, - "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" }, - "mini.clue": { "branch": "main", "commit": "8b748316c5a5ab24ab18ccd5db9d62fe86fdddee" }, - "mini.icons": { "branch": "main", "commit": "5b9076dae1bfbe47ba4a14bc8b967cde0ab5d77e" }, - "neo-tree.nvim": { "branch": "main", "commit": "9d6826582a3e8c84787bd7355df22a2812a1ad59" }, - "no-neck-pain.nvim": { "branch": "main", "commit": "434fed70b1ee553f8f27e6da7b3899f71b3c6f99" }, - "noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" }, - "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, - "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, - "nvim-scrollbar": { "branch": "main", "commit": "f8e87b96cd6362ef8579be456afee3b38fd7e2a8" }, - "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, - "nvim-treesitter-context": { "branch": "master", "commit": "529ee357b8c03d76ff71233afed68fd0f5fe10b1" }, - "nvim-ts-autotag": { "branch": "main", "commit": "8e1c0a389f20bf7f5b0dd0e00306c1247bda2595" }, - "nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" }, - "nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" }, - "overseer.nvim": { "branch": "master", "commit": "a2194447f4c5a1baf95139c5c7b539fa7b0d012f" }, + "mini.clue": { "branch": "main", "commit": "3012ba5349b2ef725c5e418a581174edc5c19dc3" }, + "nvim-treesitter": { "branch": "master", "commit": "cf12346a3414fa1b06af75c79faebe7f76df080a" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, - "smear-cursor.nvim": { "branch": "main", "commit": "c85bdbb25db096fbcf616bc4e1357bd61fe2c199" }, - "snacks.nvim": { "branch": "main", "commit": "9912042fc8bca2209105526ac7534e9a0c2071b2" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, "telescope-git-file-history.nvim": { "branch": "master", "commit": "4442114f9257e682e60a8cb6de14cf988e26055c" }, - "telescope.nvim": { "branch": "master", "commit": "5255aa27c422de944791318024167ad5d40aad20" }, - "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, - "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" }, - "undotree": { "branch": "master", "commit": "6fa6b57cda8459e1e4b2ca34df702f55242f4e4d" }, + "telescope.nvim": { "branch": "master", "commit": "cfb85dcf7f822b79224e9e6aef9e8c794211b20b" }, "vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" } } diff --git a/lsp/astro.lua b/lsp/astro.lua deleted file mode 100644 index c56be66..0000000 --- a/lsp/astro.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - cmd = { 'astro-ls', '--stdio' }, - filetypes = { 'astro' }, - root_markers = { 'astro.config.mjs', 'astro.config.js', 'astro.config.ts' }, - init_options = { - typescript = { tsdk = "./node_modules/typescript/lib" } - } -} diff --git a/lsp/bashls.lua b/lsp/bashls.lua deleted file mode 100644 index 59874ea..0000000 --- a/lsp/bashls.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - cmd = { 'bash-language-server', 'start' }, - filetypes = { 'sh', 'bash' }, - root_markers = { '.bashrc', '.bash_profile', '.profile' }, -} diff --git a/lsp/clangd.lua b/lsp/clangd.lua deleted file mode 100644 index e0b599f..0000000 --- a/lsp/clangd.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - cmd = { 'clangd' }, - filetypes = { 'c', 'cpp', 'objc', 'objcpp' }, - root_markers = { 'compile_commands.json', '.git', 'compile_flags.txt' }, -} diff --git a/lsp/cssls.lua b/lsp/cssls.lua deleted file mode 100644 index a493543..0000000 --- a/lsp/cssls.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - cmd = { 'vscode-css-language-server', '--stdio' }, - filetypes = { 'css', 'scss', 'sass' }, - root_markers = { '.git' }, -} diff --git a/lsp/denols.lua b/lsp/denols.lua deleted file mode 100644 index 751c0c2..0000000 --- a/lsp/denols.lua +++ /dev/null @@ -1,6 +0,0 @@ -return { - cmd = { 'deno', 'lsp' }, - filetypes = { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" }, - root_markers = { "deno.json", "deno.jsonc" }, - workspace_required = true, -} diff --git a/lsp/emmet.lua b/lsp/emmet.lua deleted file mode 100644 index 4143a09..0000000 --- a/lsp/emmet.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - cmd = { 'emmet-ls', '--stdio' }, - filetypes = { 'html', 'css', 'scss', 'less' }, - root_markers = { '.git' }, -} diff --git a/lsp/gopls.lua b/lsp/gopls.lua deleted file mode 100644 index ffc9bd6..0000000 --- a/lsp/gopls.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - cmd = { 'gopls' }, - filetypes = { 'go', 'gomod', 'gowork', 'gotmpl' }, - root_markers = { 'go.mod', '.git' }, -} diff --git a/lsp/html.lua b/lsp/html.lua deleted file mode 100644 index 0f49451..0000000 --- a/lsp/html.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - cmd = { 'vscode-html-language-server', '--stdio' }, - filetypes = { 'html', 'htm', 'xhtml' }, - root_markers = { '.git', 'index.html' }, -} diff --git a/lsp/jdtls.lua b/lsp/jdtls.lua deleted file mode 100644 index 02de944..0000000 --- a/lsp/jdtls.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - cmd = { 'jdtls' }, - filetypes = { 'java' }, - root_markers = { 'pom.xml', 'build.gradle', '.git', 'mvnw', 'gradlew' }, -} diff --git a/lsp/jsonls.lua b/lsp/jsonls.lua deleted file mode 100644 index 63d7df1..0000000 --- a/lsp/jsonls.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - cmd = { 'vscode-json-language-server', '--stdio' }, - filetypes = { 'json', 'jsonc' }, -} diff --git a/lsp/luals.lua b/lsp/luals.lua deleted file mode 100644 index 417399e..0000000 --- a/lsp/luals.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - cmd = { 'lua-language-server' }, - filetypes = { 'lua' }, - root_markers = { '.luarc.json', '.luarc.jsonc', '.git' }, -} diff --git a/lsp/pyright.lua b/lsp/pyright.lua deleted file mode 100644 index 5fb2efb..0000000 --- a/lsp/pyright.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - cmd = { 'pylsp' }, - filetypes = { 'python' }, - root_markers = { 'pyproject.toml', 'setup.py', 'setup.cfg', 'requirements.txt', '.git' }, -} diff --git a/lsp/rust_analyzer.lua b/lsp/rust_analyzer.lua deleted file mode 100644 index c0dacf5..0000000 --- a/lsp/rust_analyzer.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - cmd = { 'rust-analyzer' }, - filetypes = { 'rust' }, - root_markers = { 'Cargo.toml', 'rust-project.json', '.git' }, -} diff --git a/lsp/solargraph.lua b/lsp/solargraph.lua deleted file mode 100644 index f03877c..0000000 --- a/lsp/solargraph.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - cmd = { 'solargraph', 'stdio' }, - filetypes = { 'ruby' }, - root_markers = { 'Gemfile', '.git' }, -} diff --git a/lua/config/autocmds.lua b/lua/config/autocmds.lua index 775c632..0f22b69 100644 --- a/lua/config/autocmds.lua +++ b/lua/config/autocmds.lua @@ -1,12 +1,13 @@ -local autocmd = vim.api.nvim_create_autocmd - -autocmd("ModeChanged", { - callback = function(opts) - require("lualine").refresh() - end, -}) -vim.api.nvim_create_autocmd("CursorMoved", { - callback = function(opts) - require("lualine").refresh() - end, -}) +-- Equivalent to event handlers +-- local autocmd = vim.api.nvim_create_autocmd +-- +-- autocmd("ModeChanged", { +-- callback = function(opts) +-- require("lualine").refresh() +-- end, +-- }) +-- vim.api.nvim_create_autocmd("CursorMoved", { +-- callback = function(opts) +-- require("lualine").refresh() +-- end, +-- }) diff --git a/lua/config/lsp.lua b/lua/config/lsp.lua index c1054ec..edb22da 100644 --- a/lua/config/lsp.lua +++ b/lua/config/lsp.lua @@ -1,19 +1,6 @@ -- ╭─────╮ -- │ LSP │ -- ╰─────╯ -vim.lsp.enable('astro') -vim.lsp.enable('bashls') -vim.lsp.enable('clangd') -vim.lsp.enable('cssls') -vim.lsp.enable('emmet') -vim.lsp.enable('gopls') -vim.lsp.enable('html') -vim.lsp.enable('jdtls') -vim.lsp.enable('denols') -vim.lsp.enable('luals') -vim.lsp.enable('pyright') -vim.lsp.enable('rust_analyzer') -vim.lsp.enable('solargraph') +-- Manual LSP usage (some REALLY good alternatives exist) vim.lsp.enable('ts_ls') vim.lsp.enable('volar') -vim.lsp.enable('jsonls') diff --git a/lua/config/monkeylist.lua b/lua/config/monkeylist.lua deleted file mode 100644 index 6c4c439..0000000 --- a/lua/config/monkeylist.lua +++ /dev/null @@ -1 +0,0 @@ -return "one,another" diff --git a/lua/config/remap.lua b/lua/config/remap.lua index 33c933c..6a27ea3 100644 --- a/lua/config/remap.lua +++ b/lua/config/remap.lua @@ -1,28 +1,17 @@ vim.g.mapleader = " " local map = vim.keymap.set ----- Bufferline ---- +---- Bufferline (not included xd) ---- -- Not used but maybe in the future -- map("n", "bg", "BufferLinePick") --- map("n", "bpx", "BufferLinePickClose") -map("n", "box", "BufferLineCloseOthers") -map("n", "", "BufferLineCycleNext") -map("n", "", "BufferLineCyclePrev") -map("n", "bsd", "BufferLineSortByDirectory") -map("n", "bse", "BufferLineSortByExtension") -map("n", "bsr", "BufferLineSortByRelativeDirectory") -map("n", "bst", "BufferLineSortByTabs") --- buffers -map("n", "", "BufferLineMovePrev", { desc = "Move buffer to left" }) -map("n", "", "BufferLineMoveNext", { desc = "Move buffer to right" }) -map("n", "[b", "bprevious", { desc = "Prev Buffer" }) -map("n", "]b", "bnext", { desc = "Next Buffer" }) -map("n", "bd", function() - Snacks.bufdelete() -end, { desc = "Delete Buffer" }) -map("n", "x", function() - Snacks.bufdelete() -end, { desc = "Delete Buffer" }) +-- map("n", "bd", function() +-- Snacks.bufdelete() +-- end, { desc = "Delete Buffer" }) +-- map("n", "x", function() +-- Snacks.bufdelete() +-- end, { desc = "Delete Buffer" }) + +-- Some QOL mappings -- -- tabpages map("n", "]", ":+tabnext", { desc = "Goes to the next tabpage" }) @@ -31,103 +20,6 @@ map("n", "nt", ":tabnew", { desc = "Create new tabpage" }) --------------------------------------------------------------------------- --- Treesitter context -map("n", "tc", "TSContext toggle", { desc = "Toggle treesitter context" }) - --- Blueprints -map("n", "ct", "lua require('blueprints').createFromTemplateTelescope()", { desc = "Nvim blueprints" }) - ----- Git ---- -map("n", "gb", "Gitsigns blame", { desc = "Git blame" }) -map("n", "]g", "Gitsigns next_hunk", { desc = "Git next change" }) -map("n", "[g", "Gitsigns prev_hunk", { desc = "Git prev change" }) -map("n", "gdo", "DiffviewOpen", { desc = "Git diff view open" }) -map("n", "gdx", "DiffviewClose", { desc = "Git diff view close" }) -map("n", "gh", "Gitsigns preview_hunk_inline", { desc = "Git preview hunk inline" }) -map("n", "gtb", "Gitsigns toggle_current_line_blame", { desc = "Git toggle line blame" }) -map("n", "gtd", "Gitsigns toggle_deleted", { desc = "Git toggle deleted" }) - --- lazygit -map("n", "gg", function() - Snacks.lazygit() -end, { desc = "Lazygit (Root Dir)" }) -map("n", "gf", function() - local git_path = vim.api.nvim_buf_get_name(0) - Snacks.lazygit({ args = { "-f", vim.trim(git_path) } }) -end, { desc = "Lazygit Current File History" }) -map("n", "gl", function() - Snacks.lazygit({ args = { "log" } }) -end, { desc = "Lazygit Log (cwd)" }) -map("n", "gs", function() - Snacks.lazygit({ args = { "status" } }) -end, { desc = "Lazygit Log (cwd)" }) - ---------------------------------------------------------------------------- - --- Neotree -map("n", "", "Neotree toggle", { desc = "Toggle Neotree open" }) -map("n", "e", "Neotree focus", { desc = "Focus neotree" }) - --- LSP -map("n", "gD", function() - vim.lsp.buf.declaration() -end, { desc = "LSP declaration" }) -map("n", "gd", function() - vim.lsp.buf.definition() -end, { desc = "LSP definition" }) -map("n", "gT", function() - vim.lsp.buf.type_definition() -end, { desc = "LSP type definition" }) -map("n", "gr", function() - vim.lsp.buf.references() -end, { desc = "LSP references" }) -map("n", "K", function() - vim.lsp.buf.hover() -end, { desc = "LSP hover" }) -map("n", "gi", function() - vim.lsp.buf.implementation() -end, { desc = "LSP implementation" }) -map("n", "ls", function() - vim.lsp.buf.signature_help() -end, { desc = "LSP signature help" }) -map("n", "lf", function() - vim.diagnostic.open_float({ border = "rounded" }) -end, { desc = "Floating diagnostics" }) -map("n", "ca", function() - vim.lsp.buf.code_action() -end, { desc = "LSP code actions" }) -map("n", "[d", function() - vim.diagnostic.goto_prev({ float = { border = "rounded" } }) -end, { desc = "Goto prev diagnostic" }) -map("n", "]d", function() - vim.diagnostic.goto_next({ float = { border = "rounded" } }) -end, { desc = "Goto next diagnostic" }) -map("v", "ca", function() - vim.lsp.buf.code_action() -end, { desc = "LSP code action" }) -map("n", "r", function() - vim.lsp.buf.rename() -end, { desc = "LSP rename" }) --- LSP workspace folders (not used at the moment) --- map("n", "wa", function() --- vim.lsp.buf.add_workspace_folder() --- end, { desc = "Add workspace folder" }) --- map("n", "wr", function() --- vim.lsp.buf.remove_workspace_folder() --- end, { desc = "Remove workspace folder" }) --- map("n", "wl", function() --- print(vim.inspect(vim.lsp.buf.list_workspace_folders())) --- end, { desc = "List workspace folders" }) - ----- Completion ---- --- map({ "i", "s" }, "", function() --- if require("cmp").visible() then --- require("nvim-cmp").select_next_item() --- elseif require("luasnip").expand_or_jumpable() then --- vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "") --- end --- end, { desc = "Next completion item" }) - ---- Telescope find ---- map("n", "F", " Telescope resume ", { desc = "Resume las search" }) @@ -141,19 +33,7 @@ map("n", "fo", " Telescope oldfiles ", { desc = "Fild old files map("n", "fz", " Telescope current_buffer_fuzzy_find ", { desc = "Find in current buffer" }) map("n", "", " Telescope current_buffer_fuzzy_find ", { desc = "Find in current buffer" }) ----- Replace ---- -map("n", "/", " GrugFar ", { desc = "Find in current buffer" }) - ------------------------------------------------------------ - --- better up/down --- map({ "n", "x" }, "j", "v:count == 0 ? 'gj' : 'j'", { desc = "Down", expr = true, silent = true }) --- map({ "n", "x" }, "", "v:count == 0 ? 'gj' : 'j'", { desc = "Down", expr = true, silent = true }) --- map({ "n", "x" }, "k", "v:count == 0 ? 'gk' : 'k'", { desc = "Up", expr = true, silent = true }) --- map({ "n", "x" }, "", "v:count == 0 ? 'gk' : 'k'", { desc = "Up", expr = true, silent = true }) - ----- Movement ---- - +---- Improved Movement ---- -- Move Lines map("n", "", "m .+1==", { desc = "Move Down" }) map("n", "", "m .-2==", { desc = "Move Up" }) @@ -165,15 +45,6 @@ map("v", "", ":m '<-2gv=gv", { desc = "Move Up" }) -- Clear search with map({ "i", "n" }, "", "noh", { desc = "Escape and Clear hlsearch" }) --- Clear search, diff update and redraw --- taken from runtime/lua/_editor.lua -map( - "n", - "ur", - "nohlsearchdiffupdatenormal! ", - { desc = "Redraw / Clear hlsearch / Diff Update" } -) - -- https://github.com/mhinz/vim-galore#saner-behavior-of-n-and-n map("n", "n", "'Nn'[v:searchforward].'zv'", { expr = true, desc = "Next Search Result" }) map("x", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next Search Result" }) @@ -198,84 +69,10 @@ map("n", "", "enew", { desc = "New File" }) map("n", "[q", vim.cmd.cprev, { desc = "Previous Quickfix" }) map("n", "]q", vim.cmd.cnext, { desc = "Next Quickfix" }) ----- Code ---- - --- formatting -map({ "n", "v" }, "cf", function() - require("conform").format() -end, { desc = "Format" }) - --- diagnostic -local diagnostic_goto = function(next, severity) - local go = next and vim.diagnostic.goto_next or vim.diagnostic.goto_prev - severity = severity and vim.diagnostic.severity[severity] or nil - return function() - go({ severity = severity }) - end -end -map("n", "cd", vim.diagnostic.open_float, { desc = "Line Diagnostics" }) -map("n", "]d", diagnostic_goto(true), { desc = "Next Diagnostic" }) -map("n", "[d", diagnostic_goto(false), { desc = "Prev Diagnostic" }) -map("n", "]e", diagnostic_goto(true, "ERROR"), { desc = "Next Error" }) -map("n", "[e", diagnostic_goto(false, "ERROR"), { desc = "Prev Error" }) -map("n", "]w", diagnostic_goto(true, "WARN"), { desc = "Next Warning" }) -map("n", "[w", diagnostic_goto(false, "WARN"), { desc = "Prev Warning" }) - ----- Toggle options ---- -map("n", "um", function() - require("monkey-alert").enable() -- does not toggle :O -end, { desc = "Toggle monkey alert" }) -map("n", "uf", function() - LazyVim.format.toggle() -end, { desc = "Toggle Auto Format (Global)" }) -map("n", "uF", function() - LazyVim.format.toggle(true) -end, { desc = "Toggle Auto Format (Buffer)" }) -map("n", "us", function() - LazyVim.toggle("spell") -end, { desc = "Toggle Spelling" }) -map("n", "uw", function() - LazyVim.toggle("wrap") -end, { desc = "Toggle Word Wrap" }) -map("n", "uL", function() - LazyVim.toggle("relativenumber") -end, { desc = "Toggle Relative Line Numbers" }) -map("n", "ul", function() - LazyVim.toggle.number() -end, { desc = "Toggle Line Numbers" }) -map("n", "ud", function() - LazyVim.toggle.diagnostics() -end, { desc = "Toggle Diagnostics" }) -local conceallevel = vim.o.conceallevel > 0 and vim.o.conceallevel or 3 -map("n", "uc", function() - LazyVim.toggle("conceallevel", false, { 0, conceallevel }) -end, { desc = "Toggle Conceal" }) -if vim.lsp.buf.inlay_hint or vim.lsp.inlay_hint then - map("n", "uh", function() - LazyVim.toggle.inlay_hints() - end, { desc = "Toggle Inlay Hints" }) -end -map("n", "uT", function() - if vim.b.ts_highlight then - vim.treesitter.stop() - else - vim.treesitter.start() - end -end, { desc = "Toggle Treesitter Highlight" }) -map("n", "ub", function() - LazyVim.toggle("background", false, { "light", "dark" }) -end, { desc = "Toggle Background" }) --- aerial -map("n", "ua", "AerialToggle", { desc = "Toggle aerial view" }) - ---------------------------------------------------------------------------- - -- highlights under cursor map("n", "ui", vim.show_pos, { desc = "Inspect Pos" }) -map("n", "uI", "InspectTree", { desc = "Inspect Tree" }) ---- Terminal ---- - map("n", "nz", "terminal", { desc = "Open new terminal" }) -- Terminal Mappings @@ -321,12 +118,43 @@ map("n", "qq", "qa", { desc = "Quit All" }) --------------------------------------------------------------------------- ----- Utils ---- - --- undotree -map("n", "ut", "UndotreeToggle", { desc = "Toggle undotree" }) - --- aerial -map("n", "a", "AerialToggle", { desc = "Toggle aerial view" }) -map("n", "]a", "AerialNext", { desc = "Next aerial view" }) -map("n", "[a", "AerialPrev", { desc = "Prev aerial view" }) +-- LSP +map("n", "gD", function() + vim.lsp.buf.declaration() +end, { desc = "LSP declaration" }) +map("n", "gd", function() + vim.lsp.buf.definition() +end, { desc = "LSP definition" }) +map("n", "gT", function() + vim.lsp.buf.type_definition() +end, { desc = "LSP type definition" }) +map("n", "gr", function() + vim.lsp.buf.references() +end, { desc = "LSP references" }) +map("n", "K", function() + vim.lsp.buf.hover() +end, { desc = "LSP hover" }) +map("n", "gi", function() + vim.lsp.buf.implementation() +end, { desc = "LSP implementation" }) +map("n", "ls", function() + vim.lsp.buf.signature_help() +end, { desc = "LSP signature help" }) +map("n", "lf", function() + vim.diagnostic.open_float({ border = "rounded" }) +end, { desc = "Floating diagnostics" }) +map("n", "ca", function() + vim.lsp.buf.code_action() +end, { desc = "LSP code actions" }) +map("n", "[d", function() + vim.diagnostic.goto_prev({ float = { border = "rounded" } }) +end, { desc = "Goto prev diagnostic" }) +map("n", "]d", function() + vim.diagnostic.goto_next({ float = { border = "rounded" } }) +end, { desc = "Goto next diagnostic" }) +map("v", "ca", function() + vim.lsp.buf.code_action() +end, { desc = "LSP code action" }) +map("n", "r", function() + vim.lsp.buf.rename() +end, { desc = "LSP rename" }) diff --git a/lua/plugins/blueprints.lua b/lua/plugins/blueprints.lua deleted file mode 100644 index 6d00fe4..0000000 --- a/lua/plugins/blueprints.lua +++ /dev/null @@ -1,12 +0,0 @@ --- ╭────────────╮ --- │ Blueprints │ --- ╰────────────╯ -return { - { - "dqnid/nvim-blueprints", - name = "blueprints", - init = function() - require("blueprints").setup({ blueprintsDir = "/home/danih/.config/nvim/blueprints" }) - end, - }, -} diff --git a/lua/plugins/code-utils.lua b/lua/plugins/code-utils.lua deleted file mode 100644 index 0ec62c0..0000000 --- a/lua/plugins/code-utils.lua +++ /dev/null @@ -1,101 +0,0 @@ --- ╭────────────╮ --- │ Code utils │ --- ╰────────────╯ -return { - -- │ Code parse │ - { - "nvim-treesitter/nvim-treesitter", - opts = function() - return require("plugins.opts.treesitter") - end, - config = function(_, opts) - require("nvim-treesitter.configs").setup(opts) - end, - }, - - { - "nvim-treesitter/nvim-treesitter-context", - opts = function() - return require("plugins.opts.treesitterContext") - end, - }, - - -- │ Completion │ - { - "saghen/blink.cmp", - dependencies = { "rafamadriz/friendly-snippets" }, - version = "1.*", - -- build = "cargo build --release", - opts = { - -- C-e: Hide menu - -- C-k: Toggle signature help (if signature.enabled = true) - keymap = { - preset = "default", - [""] = { "accept", "fallback" }, - [""] = { "select_next", "fallback" }, - [""] = { "select_prev", "fallback" }, - }, - appearance = { - nerd_font_variant = "mono", - }, - completion = { - accept = { auto_brackets = { enabled = false }, }, - list = { selection = { preselect = false, auto_insert = true } }, - menu = { - auto_show = true, - - -- nvim-cmp style menu - draw = { - columns = { - { "label", "label_description", gap = 1 }, - { "kind_icon", "kind" } - }, - } - }, - - -- Show documentation when selecting a completion item - documentation = { auto_show = true, auto_show_delay_ms = 500 }, - -- Display a preview of the selected item on the current line - ghost_text = { enabled = true }, - }, - sources = {}, - fuzzy = { implementation = "prefer_rust_with_warning" }, - }, - opts_extend = { "sources.default" }, - }, - - -- -- │ Auto close │ - { - "windwp/nvim-ts-autotag", - config = function(_, opts) - require("nvim-ts-autotag").setup({ - opts = { - enable_close = true, - enable_rename = true, - enable_close_on_slash = false, - }, - }) - end, - }, - - { - 'm4xshen/autoclose.nvim', - opts = function() - return require("plugins.opts.autoclose") - end, - }, - - -- │ Diagnostics │ - { - "folke/trouble.nvim", - opts = { use_diagnostic_signs = true }, - }, - - { - "folke/todo-comments.nvim", - dependencies = { "nvim-lua/plenary.nvim" }, - opts = function() - return require("plugins.opts.todocomments") - end, - }, -} diff --git a/lua/plugins/context.lua b/lua/plugins/context.lua deleted file mode 100644 index 81e5735..0000000 --- a/lua/plugins/context.lua +++ /dev/null @@ -1,97 +0,0 @@ --- ╭─────────╮ --- │ Context │ --- ╰─────────╯ -return { - { - "akinsho/bufferline.nvim", - version = "*", - dependencies = "nvim-tree/nvim-web-devicons", - opts = function() - return require("plugins.opts.bufferline") - end, - }, - - { - "nvim-lualine/lualine.nvim", - event = "VeryLazy", - dependencies = { "nvim-tree/nvim-web-devicons" }, - opts = function() - return require("plugins.opts.lualine") - end, - }, - - { - "nvim-neo-tree/neo-tree.nvim", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", - "MunifTanjim/nui.nvim", - { - "s1n7ax/nvim-window-picker", - version = "2.*", - config = function() - require("window-picker").setup({ - filter_rules = { - include_current_win = false, - autoselect_one = true, - bo = { - filetype = { "neo-tree", "neo-tree-popup", "notify" }, - buftype = { "terminal", "quickfix" }, - }, - }, - }) - end, - }, - }, - opts = function() - return require("plugins.opts.neotree") - end, - }, - - { - "stevearc/aerial.nvim", - opts = {}, - dependencies = { - "nvim-treesitter/nvim-treesitter", - "nvim-tree/nvim-web-devicons", - }, - }, - - { - "petertriho/nvim-scrollbar", - opts = function() - return require("plugins.opts.scrollbar") - end, - config = function(_, opts) - require("scrollbar").setup(opts) - end, - }, - - { - "lukas-reineke/indent-blankline.nvim", - main = "ibl", - opts = {}, - init = function() - require("ibl").setup({ - indent = { - -- highlight = { "hl-IblIndent" }, - smart_indent_cap = true, - char = "▏", - }, - whitespace = { - highlight = { "Whitespace", "NonText" }, - remove_blankline_trail = true, - }, - scope = { - char = "⋅", - enabled = true, - show_start = false, - show_end = false, - highlight = { "Function", "Label" }, - priority = 500, - exclude = { language = { "css" } }, - }, - }) - end, - }, -} diff --git a/lua/plugins/formater.lua b/lua/plugins/formater.lua deleted file mode 100644 index bae8057..0000000 --- a/lua/plugins/formater.lua +++ /dev/null @@ -1,11 +0,0 @@ --- ╭────────────────╮ --- │ Code formatter │ --- ╰────────────────╯ -return { - { - "stevearc/conform.nvim", - opts = function() - return require("plugins.opts.conformFormat") - end, - }, -} diff --git a/lua/plugins/git.lua b/lua/plugins/git.lua deleted file mode 100644 index df1ff0f..0000000 --- a/lua/plugins/git.lua +++ /dev/null @@ -1,31 +0,0 @@ --- ╭─────╮ --- │ Git │ --- ╰─────╯ -return { - { - "lewis6991/gitsigns.nvim", - opts = function() - return require("plugins.opts.gitsigns") - end, - }, - - { - "sindrets/diffview.nvim", - lazy = false, - }, - - { "tpope/vim-fugitive" }, - - -- { - -- -- dir = "~/Documents/Code/monkey-alert.nvim", - -- "dqnid/monkey-alert.nvim", - -- name = "monkey-alert", - -- opts = { - -- monkey_mail_list = require("config.monkeylist"), - -- blame_text_color_hex = "#c0ffee", - -- blame_text = "- Monkey alert 🐒", - -- blame_position = "eol", - -- auto_attach = false, - -- }, - -- }, -} diff --git a/lua/plugins/help.lua b/lua/plugins/help.lua index fbf422e..7376444 100644 --- a/lua/plugins/help.lua +++ b/lua/plugins/help.lua @@ -2,67 +2,50 @@ -- │ Usage help │ -- ╰────────────╯ return { - { - "nvim-mini/mini.clue", - opts = { - triggers = { - -- Leader triggers - { mode = 'n', keys = '' }, - { mode = 'x', keys = '' }, + { + "nvim-mini/mini.clue", + opts = { + triggers = { + -- Leader triggers + { mode = 'n', keys = '' }, + { mode = 'x', keys = '' }, - -- Built-in completion - { mode = 'i', keys = '' }, + -- Built-in completion + { mode = 'i', keys = '' }, - -- `g` key - { mode = 'n', keys = 'g' }, - { mode = 'x', keys = 'g' }, + -- `g` key + { mode = 'n', keys = 'g' }, + { mode = 'x', keys = 'g' }, - -- Marks - { mode = 'n', keys = "'" }, - { mode = 'n', keys = '`' }, - { mode = 'x', keys = "'" }, - { mode = 'x', keys = '`' }, + -- Marks + { mode = 'n', keys = "'" }, + { mode = 'n', keys = '`' }, + { mode = 'x', keys = "'" }, + { mode = 'x', keys = '`' }, - -- Registers - { mode = 'n', keys = '"' }, - { mode = 'x', keys = '"' }, - { mode = 'i', keys = '' }, - { mode = 'c', keys = '' }, + -- Registers + { mode = 'n', keys = '"' }, + { mode = 'x', keys = '"' }, + { mode = 'i', keys = '' }, + { mode = 'c', keys = '' }, - -- Window commands - { mode = 'n', keys = '' }, + -- Window commands + { mode = 'n', keys = '' }, - -- `z` key - { mode = 'n', keys = 'z' }, - { mode = 'x', keys = 'z' }, - }, + -- `z` key + { mode = 'n', keys = 'z' }, + { mode = 'x', keys = 'z' }, + }, - clues = { - -- Enhance this by adding descriptions for mapping groups - -- miniclue.gen_clues.builtin_completion(), - -- miniclue.gen_clues.g(), - -- miniclue.gen_clues.marks(), - -- miniclue.gen_clues.registers(), - -- miniclue.gen_clues.windows(), - -- miniclue.gen_clues.z(), - }, - } - }, - -- Breaks LSP attach - -- { - -- "folke/which-key.nvim", - -- event = "VeryLazy", - -- opts = function() - -- return require("plugins.opts.whichKey") - -- end, - -- keys = { - -- { - -- "?", - -- function() - -- require("which-key").show({ global = false }) - -- end, - -- desc = "Buffer Local Keymaps (which-key)", - -- }, - -- }, - -- } + clues = { + -- Enhance this by adding descriptions for mapping groups + -- miniclue.gen_clues.builtin_completion(), + -- miniclue.gen_clues.g(), + -- miniclue.gen_clues.marks(), + -- miniclue.gen_clues.registers(), + -- miniclue.gen_clues.windows(), + -- miniclue.gen_clues.z(), + }, + } + }, } diff --git a/lua/plugins/ia.lua b/lua/plugins/ia.lua deleted file mode 100644 index e7a68ce..0000000 --- a/lua/plugins/ia.lua +++ /dev/null @@ -1,19 +0,0 @@ -return { - { - "github/copilot.vim", - enabled = false, - }, - { - "olimorris/codecompanion.nvim", - enabled = false, - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-treesitter/nvim-treesitter", - }, - opts = { - opts = { - log_level = "DEBUG", -- or "TRACE" - }, - }, - }, -} diff --git a/lua/plugins/navigation.lua b/lua/plugins/navigation.lua deleted file mode 100644 index 97aeadd..0000000 --- a/lua/plugins/navigation.lua +++ /dev/null @@ -1,2 +0,0 @@ -return { -} diff --git a/lua/plugins/opts/aerialview.lua b/lua/plugins/opts/aerialview.lua deleted file mode 100644 index d0fff89..0000000 --- a/lua/plugins/opts/aerialview.lua +++ /dev/null @@ -1,323 +0,0 @@ -local config = { - backends = { "treesitter", "lsp", "markdown", "asciidoc", "man" }, - - layout = { - -- These control the width of the aerial window. - -- They can be integers or a float between 0 and 1 (e.g. 0.4 for 40%) - -- min_width and max_width can be a list of mixed types. - -- max_width = {40, 0.2} means "the lesser of 40 columns or 20% of total" - max_width = { 40, 0.2 }, - width = nil, - min_width = 10, - - -- key-value pairs of window-local options for aerial window (e.g. winhl) - win_opts = {}, - - -- Determines the default direction to open the aerial window. The 'prefer' - -- options will open the window in the other direction *if* there is a - -- different buffer in the way of the preferred direction - -- Enum: prefer_right, prefer_left, right, left, float - default_direction = "prefer_right", - - -- Determines where the aerial window will be opened - -- edge - open aerial at the far right/left of the editor - -- window - open aerial to the right/left of the current window - placement = "window", - - -- When the symbols change, resize the aerial window (within min/max constraints) to fit - resize_to_content = true, - - -- Preserve window size equality with (:help CTRL-W_=) - preserve_equality = false, - }, - - -- Determines how the aerial window decides which buffer to display symbols for - -- window - aerial window will display symbols for the buffer in the window from which it was opened - -- global - aerial window will display symbols for the current window - attach_mode = "window", - - -- List of enum values that configure when to auto-close the aerial window - -- unfocus - close aerial when you leave the original source window - -- switch_buffer - close aerial when you change buffers in the source window - -- unsupported - close aerial when attaching to a buffer that has no symbol source - close_automatic_events = {}, - - -- Keymaps in aerial window. Can be any value that `vim.keymap.set` accepts OR a table of keymap - -- options with a `callback` (e.g. { callback = function() ... end, desc = "", nowait = true }) - -- Additionally, if it is a string that matches "actions.", - -- it will use the mapping at require("aerial.actions"). - -- Set to `false` to remove a keymap - keymaps = { - ["?"] = "actions.show_help", - ["g?"] = "actions.show_help", - [""] = "actions.jump", - ["<2-LeftMouse>"] = "actions.jump", - [""] = "actions.jump_vsplit", - [""] = "actions.jump_split", - ["p"] = "actions.scroll", - [""] = "actions.down_and_scroll", - [""] = "actions.up_and_scroll", - ["{"] = "actions.prev", - ["}"] = "actions.next", - ["[["] = "actions.prev_up", - ["]]"] = "actions.next_up", - ["q"] = "actions.close", - ["o"] = "actions.tree_toggle", - ["za"] = "actions.tree_toggle", - ["O"] = "actions.tree_toggle_recursive", - ["zA"] = "actions.tree_toggle_recursive", - ["l"] = "actions.tree_open", - ["zo"] = "actions.tree_open", - ["L"] = "actions.tree_open_recursive", - ["zO"] = "actions.tree_open_recursive", - ["h"] = "actions.tree_close", - ["zc"] = "actions.tree_close", - ["H"] = "actions.tree_close_recursive", - ["zC"] = "actions.tree_close_recursive", - ["zr"] = "actions.tree_increase_fold_level", - ["zR"] = "actions.tree_open_all", - ["zm"] = "actions.tree_decrease_fold_level", - ["zM"] = "actions.tree_close_all", - ["zx"] = "actions.tree_sync_folds", - ["zX"] = "actions.tree_sync_folds", - }, - - -- When true, don't load aerial until a command or function is called - -- Defaults to true, unless `on_attach` is provided, then it defaults to false - lazy_load = true, - - -- Disable aerial on files with this many lines - disable_max_lines = 10000, - - -- Disable aerial on files this size or larger (in bytes) - disable_max_size = 2000000, -- Default 2MB - - -- A list of all symbols to display. Set to false to display all symbols. - -- This can be a filetype map (see :help aerial-filetype-map) - -- To see all available values, see :help SymbolKind - filter_kind = { - "Class", - "Constructor", - "Enum", - "Function", - "Interface", - "Module", - "Method", - "Struct", - }, - - -- Determines line highlighting mode when multiple splits are visible. - -- split_width Each open window will have its cursor location marked in the - -- aerial buffer. Each line will only be partially highlighted - -- to indicate which window is at that location. - -- full_width Each open window will have its cursor location marked as a - -- full-width highlight in the aerial buffer. - -- last Only the most-recently focused window will have its location - -- marked in the aerial buffer. - -- none Do not show the cursor locations in the aerial window. - highlight_mode = "split_width", - - -- Highlight the closest symbol if the cursor is not exactly on one. - highlight_closest = true, - - -- Highlight the symbol in the source buffer when cursor is in the aerial win - highlight_on_hover = false, - - -- When jumping to a symbol, highlight the line for this many ms. - -- Set to false to disable - highlight_on_jump = 300, - - -- Jump to symbol in source window when the cursor moves - autojump = false, - - -- Define symbol icons. You can also specify "Collapsed" to change the - -- icon when the tree is collapsed at that symbol, or "Collapsed" to specify a - -- default collapsed icon. The default icon set is determined by the - -- "nerd_font" option below. - -- If you have lspkind-nvim installed, it will be the default icon set. - -- This can be a filetype map (see :help aerial-filetype-map) - icons = {}, - - -- Control which windows and buffers aerial should ignore. - -- Aerial will not open when these are focused, and existing aerial windows will not be updated - ignore = { - -- Ignore unlisted buffers. See :help buflisted - unlisted_buffers = false, - - -- Ignore diff windows (setting to false will allow aerial in diff windows) - diff_windows = true, - - -- List of filetypes to ignore. - filetypes = {}, - - -- Ignored buftypes. - -- Can be one of the following: - -- false or nil - No buftypes are ignored. - -- "special" - All buffers other than normal, help and man page buffers are ignored. - -- table - A list of buftypes to ignore. See :help buftype for the - -- possible values. - -- function - A function that returns true if the buffer should be - -- ignored or false if it should not be ignored. - -- Takes two arguments, `bufnr` and `buftype`. - buftypes = "special", - - -- Ignored wintypes. - -- Can be one of the following: - -- false or nil - No wintypes are ignored. - -- "special" - All windows other than normal windows are ignored. - -- table - A list of wintypes to ignore. See :help win_gettype() for the - -- possible values. - -- function - A function that returns true if the window should be - -- ignored or false if it should not be ignored. - -- Takes two arguments, `winid` and `wintype`. - wintypes = "special", - }, - - -- Use symbol tree for folding. Set to true or false to enable/disable - -- Set to "auto" to manage folds if your previous foldmethod was 'manual' - -- This can be a filetype map (see :help aerial-filetype-map) - manage_folds = false, - - -- When you fold code with za, zo, or zc, update the aerial tree as well. - -- Only works when manage_folds = true - link_folds_to_tree = false, - - -- Fold code when you open/collapse symbols in the tree. - -- Only works when manage_folds = true - link_tree_to_folds = true, - - -- Set default symbol icons to use patched font icons (see https://www.nerdfonts.com/) - -- "auto" will set it to true if nvim-web-devicons or lspkind-nvim is installed. - nerd_font = "auto", - - -- Call this function when aerial attaches to a buffer. - on_attach = function(bufnr) end, - - -- Call this function when aerial first sets symbols on a buffer. - on_first_symbols = function(bufnr) end, - - -- Automatically open aerial when entering supported buffers. - -- This can be a function (see :help aerial-open-automatic) - open_automatic = false, - - -- Run this command after jumping to a symbol (false will disable) - post_jump_cmd = "normal! zz", - - -- Invoked after each symbol is parsed, can be used to modify the parsed item, - -- or to filter it by returning false. - -- - -- bufnr: a neovim buffer number - -- item: of type aerial.Symbol - -- ctx: a record containing the following fields: - -- * backend_name: treesitter, lsp, man... - -- * lang: info about the language - -- * symbols?: specific to the lsp backend - -- * symbol?: specific to the lsp backend - -- * syntax_tree?: specific to the treesitter backend - -- * match?: specific to the treesitter backend, TS query match - post_parse_symbol = function(bufnr, item, ctx) - return true - end, - - -- Invoked after all symbols have been parsed and post-processed, - -- allows to modify the symbol structure before final display - -- - -- bufnr: a neovim buffer number - -- items: a collection of aerial.Symbol items, organized in a tree, - -- with 'parent' and 'children' fields - -- ctx: a record containing the following fields: - -- * backend_name: treesitter, lsp, man... - -- * lang: info about the language - -- * symbols?: specific to the lsp backend - -- * syntax_tree?: specific to the treesitter backend - post_add_all_symbols = function(bufnr, items, ctx) - return items - end, - - -- When true, aerial will automatically close after jumping to a symbol - close_on_select = false, - - -- The autocmds that trigger symbols update (not used for LSP backend) - update_events = "TextChanged,InsertLeave", - - -- Show box drawing characters for the tree hierarchy - show_guides = false, - - -- Customize the characters used when show_guides = true - guides = { - -- When the child item has a sibling below it - mid_item = "├─", - -- When the child item is the last in the list - last_item = "└─", - -- When there are nested child guides to the right - nested_top = "│ ", - -- Raw indentation - whitespace = " ", - }, - - -- Set this function to override the highlight groups for certain symbols - get_highlight = function(symbol, is_icon, is_collapsed) - -- return "MyHighlight" .. symbol.kind - end, - - -- Options for opening aerial in a floating win - float = { - -- Controls border appearance. Passed to nvim_open_win - border = "rounded", - - -- Determines location of floating window - -- cursor - Opens float on top of the cursor - -- editor - Opens float centered in the editor - -- win - Opens float centered in the window - relative = "cursor", - - -- These control the height of the floating window. - -- They can be integers or a float between 0 and 1 (e.g. 0.4 for 40%) - -- min_height and max_height can be a list of mixed types. - -- min_height = {8, 0.1} means "the greater of 8 rows or 10% of total" - max_height = 0.9, - height = nil, - min_height = { 8, 0.1 }, - - override = function(conf, source_winid) - -- This is the config that will be passed to nvim_open_win. - -- Change values here to customize the layout - return conf - end, - }, - - -- Options for the floating nav windows - nav = { - border = "rounded", - max_height = 0.9, - min_height = { 10, 0.1 }, - max_width = 0.5, - min_width = { 0.2, 20 }, - win_opts = { - cursorline = true, - winblend = 10, - }, - -- Jump to symbol in source window when the cursor moves - autojump = false, - -- Show a preview of the code in the right column, when there are no child symbols - preview = false, - -- Keymaps in the nav window - keymaps = { - [""] = "actions.jump", - ["<2-LeftMouse>"] = "actions.jump", - [""] = "actions.jump_vsplit", - [""] = "actions.jump_split", - ["h"] = "actions.left", - ["l"] = "actions.right", - [""] = "actions.close", - }, - }, - - lsp = { - diagnostics_trigger_update = false, - update_when_errors = true, - update_delay = 300, - }, -} - -return config diff --git a/lua/plugins/opts/autoclose.lua b/lua/plugins/opts/autoclose.lua deleted file mode 100644 index e0d6359..0000000 --- a/lua/plugins/opts/autoclose.lua +++ /dev/null @@ -1,24 +0,0 @@ -return { - keys = { - ["("] = { escape = false, close = true, pair = "()" }, - ["["] = { escape = false, close = true, pair = "[]" }, - ["{"] = { escape = false, close = true, pair = "{}" }, - - [">"] = { escape = true, close = false, pair = "<>" }, - [")"] = { escape = true, close = false, pair = "()" }, - ["]"] = { escape = true, close = false, pair = "[]" }, - ["}"] = { escape = true, close = false, pair = "{}" }, - - ['"'] = { escape = true, close = true, pair = '""' }, - ["'"] = { escape = true, close = true, pair = "''" }, - ["`"] = { escape = true, close = true, pair = "``" }, - }, - options = { - disabled_filetypes = { "text" }, - disable_when_touch = false, - touch_regex = "[%w(%[{]", - pair_spaces = false, - auto_indent = true, - disable_command_mode = false, - }, -} diff --git a/lua/plugins/opts/bufferline.lua b/lua/plugins/opts/bufferline.lua deleted file mode 100644 index 88d022b..0000000 --- a/lua/plugins/opts/bufferline.lua +++ /dev/null @@ -1,112 +0,0 @@ -local config = { - highlights = { - buffer_selected = { bold = true }, - diagnostic_selected = { bold = true }, - info_selected = { bold = true }, - info_diagnostic_selected = { bold = true }, - warning_selected = { bold = true }, - warning_diagnostic_selected = { bold = true }, - error_selected = { bold = true }, - error_diagnostic_selected = { bold = true }, - }, - options = { - themeable = true, - numbers = "none", - diagnostics = "nvim_lsp", -- or "coc" - max_prefix_length = 8, - close_command = "b# | bd#", - right_mouse_command = "b# | bd#", - left_mouse_command = "buffer %d", - buffer_close_icon = "󰅖", - modified_icon = "●", - close_icon = "", - left_trunc_marker = "", - right_trunc_marker = "", - max_name_length = 18, - truncate_names = true, - tab_size = 18, - color_icons = true, - show_buffer_icons = true, - show_buffer_close_icons = true, - show_tab_indicators = true, - duplicates_across_groups = true, -- whether to consider duplicate paths in different groups as duplicates - persist_buffer_sort = true, -- whether or not custom sorted buffers should persist - separator_style = { "▍", "" }, -- { "▏", "" } | "slant" | "slope" | "thick" | "thin" | { 'any', 'any' }, - -- always_show_bufferline = false, - auto_toggle_bufferline = true, - show_close_icon = true, - hover = { - enabled = true, - delay = 200, - reveal = { "close" }, - }, - offsets = { - { - filetype = "neo-tree", - text = "", - highlight = "Directory", - separator = "▎", -- use a "true" to enable the default, or set your own character - }, - }, - groups = { - options = { - toggle_hidden_on_enter = true, -- when you re-enter a hidden group this options re-opens that group so the buffer is visible - }, - items = { - -- { - -- name = "Tests", - -- -- icon = "󰙨 ", - -- highlight = { underline = false }, - -- priority = 2, - -- matcher = function(buf) - -- return buf.path:match("%.test") or buf.path:match("%_test") or buf.path:match("%_spec") - -- end, - -- }, - -- { - -- name = "Docs", - -- -- icon = "󰈙 ", - -- priority = 3, - -- -- highlight = { undercurl = false, sp = "grey" }, - -- highlight = { undercurl = false }, - -- auto_close = false, - -- matcher = function(buf) - -- return buf.path:match("%.md") or buf.path:match("%.txt") - -- end, - -- separator = { - -- style = require("bufferline.groups").separator.tab, - -- }, - -- }, - { - name = "Sh", - -- icon = " ", - highlight = { undercurl = false }, - auto_close = false, - priority = 4, - matcher = function(buf) - return buf.path:match("zsh") - end, - separator = { - style = require("bufferline.groups").separator.tab, - }, - }, - { - name = "Container", - highlight = { undercurl = false }, - auto_close = false, - -- icon = " ", - matcher = function(buf) - return buf.path:match("dockerfile") - or buf.path:match("DOCKERFILE") - or buf.path:match("Dockerfile") - or buf.path:match("docker%-compose%.yml") - end, - separator = { - style = require("bufferline.groups").separator.tab, - }, - }, - }, - }, - }, -} - -return config diff --git a/lua/plugins/opts/cmp.lua b/lua/plugins/opts/cmp.lua deleted file mode 100644 index d367093..0000000 --- a/lua/plugins/opts/cmp.lua +++ /dev/null @@ -1,83 +0,0 @@ -local cmp = require("cmp") - -local function border(hl_name) - return { - { "╭", hl_name }, - { "─", hl_name }, - { "╮", hl_name }, - { "│", hl_name }, - { "╯", hl_name }, - { "─", hl_name }, - { "╰", hl_name }, - { "│", hl_name }, - } -end - -local options = { - completion = { - completeopt = "menu,menuone", - }, - - window = { - completion = { - side_padding = 1, - scrollbar = false, - }, - documentation = { - border = border("CmpDocBorder"), - winhighlight = "Normal:CmpDoc", - }, - }, - snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, - }, - preselect = cmp.PreselectMode.None, - mapping = { - [""] = cmp.mapping.select_prev_item(), - [""] = cmp.mapping.select_next_item(), - [""] = cmp.mapping.scroll_docs(-4), - [""] = cmp.mapping.scroll_docs(4), - [""] = cmp.mapping.complete(), - [""] = cmp.mapping.close(), - [""] = cmp.mapping.confirm({ - behavior = cmp.ConfirmBehavior.Insert, - select = true, - }), - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif require("luasnip").expand_or_jumpable() then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "") - else - fallback() - end - end, { - "i", - "s", - }), - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif require("luasnip").jumpable(-1) then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-jump-prev", true, true, true), "") - else - fallback() - end - end, { - "i", - "s", - }), - }, - sources = { - { name = "nvim_lsp" }, - { name = "luasnip" }, - { name = "buffer" }, - { name = "nvim_lua" }, - { name = "path" }, - { name = "emoji" }, - }, -} - -return options diff --git a/lua/plugins/opts/conformFormat.lua b/lua/plugins/opts/conformFormat.lua deleted file mode 100644 index faa10fa..0000000 --- a/lua/plugins/opts/conformFormat.lua +++ /dev/null @@ -1,35 +0,0 @@ -local config = { - -- Define your formatters - formatters_by_ft = { - rust = { "rustfmt" }, - lua = { "stylua" }, - go = { "goimports", "gofmt" }, - javascript = { "prettierd", "prettier", "biome", stop_after_first = true }, - javascriptreact = { "prettierd", "prettier", "biome", stop_after_first = true }, - typescript = { "prettierd", "prettier", "biome", stop_after_first = true }, - typescriptreact = { "prettierd", "prettier", "biome", stop_after_first = true }, - css = { "prettierd", "prettier", "biome", stop_after_first = true }, - scss = { "prettierd", "prettier", "biome", stop_after_first = true }, - -- python = function(bufnr) - -- if require("conform").get_formatter_info("ruff_format", bufnr).available then - -- return { "ruff_format" } - -- else - -- return { "isort", "black" } - -- end - -- end, - ["_"] = { "trim_whitespace" }, -- run only on filetypes without formater - -- ["*"] = { "trim_whitespace" }, -- run in all filetypes - }, - format_on_save = { - timeout_ms = 500, - lsp_format = "fallback", - }, - -- Customize formatters - formatters = { - shfmt = { - prepend_args = { "-i", "2" }, - }, - }, -} - -return config diff --git a/lua/plugins/opts/gitsigns.lua b/lua/plugins/opts/gitsigns.lua deleted file mode 100644 index 5b3cbfa..0000000 --- a/lua/plugins/opts/gitsigns.lua +++ /dev/null @@ -1,51 +0,0 @@ -local config = { - signs = { - add = { text = "▌" }, - change = { text = "▌" }, - delete = { text = "_" }, - topdelete = { text = "‾" }, - changedelete = { text = "~" }, - untracked = { text = "┆" }, - }, - signs_staged = { - add = { text = "▌" }, - change = { text = "▌" }, - delete = { text = "_" }, - topdelete = { text = "‾" }, - changedelete = { text = "~" }, - untracked = { text = "┆" }, - }, - signs_staged_enable = true, - signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` - numhl = true, -- Toggle with `:Gitsigns toggle_numhl` - linehl = false, -- Toggle with `:Gitsigns toggle_linehl` - word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` - watch_gitdir = { - follow_files = true, - }, - auto_attach = true, - attach_to_untracked = false, - current_line_blame = true, -- Toggle with `:Gitsigns toggle_current_line_blame` - current_line_blame_opts = { - virt_text = true, - virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align' - delay = 500, - ignore_whitespace = false, - virt_text_priority = 100, - }, - current_line_blame_formatter = ", - ", - sign_priority = 6, - update_debounce = 100, - status_formatter = nil, -- Use default - max_file_length = 40000, -- Disable if file is longer than this (in lines) - preview_config = { - -- Options passed to nvim_open_win - border = "single", - style = "minimal", - relative = "cursor", - row = 0, - col = 1, - }, -} - -return config diff --git a/lua/plugins/opts/lualine.lua b/lua/plugins/opts/lualine.lua deleted file mode 100644 index 071fd62..0000000 --- a/lua/plugins/opts/lualine.lua +++ /dev/null @@ -1,43 +0,0 @@ -local options = { - options = { - icons_enabled = true, - theme = "auto", - component_separators = { left = "•", right = "•" }, - section_separators = { left = "┃", right = "┃" }, - disabled_filetypes = { - statusline = {}, - winbar = {}, - }, - ignore_focus = {}, - always_divide_middle = true, - always_show_tabline = true, - globalstatus = true, - refresh = { - statusline = 1000, - tabline = 1000, - winbar = 1000, - }, - }, - sections = { - lualine_a = { "mode" }, - lualine_b = { "branch", "diff" }, - lualine_c = { "filename" }, - lualine_x = { "diagnostics", "filetype", "encoding", "fileformat" }, - lualine_y = { "progress" }, - lualine_z = { "location" }, - }, - inactive_sections = { - lualine_a = {}, - lualine_b = {}, - lualine_c = { "filename" }, - lualine_x = { "location" }, - lualine_y = {}, - lualine_z = {}, - }, - tabline = {}, - winbar = {}, - inactive_winbar = {}, - extensions = {}, -} - -return options diff --git a/lua/plugins/opts/neotree.lua b/lua/plugins/opts/neotree.lua deleted file mode 100644 index de8c6fd..0000000 --- a/lua/plugins/opts/neotree.lua +++ /dev/null @@ -1,282 +0,0 @@ -local config = { - close_if_last_window = false, - popup_border_style = "rounded", - enable_git_status = true, - enable_diagnostics = true, - open_files_do_not_replace_types = { "trouble", "qf" }, -- when opening files, do not use windows containing these filetypes or buftypes: "terminal" is an option - sort_case_insensitive = false, -- used when sorting files and directories in the tree - sort_function = nil, - follow_current_file = { enabled = true }, - source_selector = { - winbar = false, - statusline = false, - }, - default_component_configs = { - container = { - enable_character_fade = true, - }, - diagnostics = { - symbols = { - hint = "H", - info = "I", - warn = "!", - error = "X", - }, - highlights = { - hint = "DiagnosticSignHint", - info = "DiagnosticSignInfo", - warn = "DiagnosticSignWarn", - error = "DiagnosticSignError", - }, - }, - indent = { - indent_size = 2, - padding = 1, -- extra padding on left hand side - -- indent guides - with_markers = true, - indent_marker = "│", - last_indent_marker = "└", - highlight = "NeoTreeIndentMarker", - -- expander config, needed for nesting files - with_expanders = nil, -- if nil and file nesting is enabled, will enable expanders - expander_collapsed = "", - expander_expanded = "", - expander_highlight = "NeoTreeExpander", - }, - icon = { - folder_closed = "", - folder_open = "", - folder_empty = "󰜌", - -- The next two settings are only a fallback, if you use nvim-web-devicons and configure default icons there - -- then these will never be used. - default = "*", - highlight = "NeoTreeFileIcon", - }, - modified = { - symbol = "[+]", - highlight = "NeoTreeModified", - }, - name = { - trailing_slash = false, - use_git_status_colors = true, - highlight = "NeoTreeFileName", - }, - git_status = { - symbols = { - -- Change type - added = "", -- or "✚", but this is redundant info if you use git_status_colors on the name - modified = "", -- or "", but this is redundant info if you use git_status_colors on the name - deleted = "✖", -- this can only be used in the git_status source - renamed = "󰁕", -- this can only be used in the git_status source - -- Status type - untracked = "", - ignored = "", - unstaged = "󰄱", - staged = "", - conflict = "", - }, - }, - -- If you don't want to use these columns, you can set `enabled = false` for each of them individually - file_size = { - enabled = true, - required_width = 64, -- min width of window required to show this column - }, - type = { - enabled = true, - required_width = 122, -- min width of window required to show this column - }, - last_modified = { - enabled = true, - required_width = 88, -- min width of window required to show this column - }, - created = { - enabled = true, - required_width = 110, -- min width of window required to show this column - }, - symlink_target = { - enabled = false, - }, - }, - -- A list of functions, each representing a global custom command - -- that will be available in all sources (if not overridden in `opts[source_name].commands`) - -- see `:h neo-tree-custom-commands-global` - commands = {}, - window = { - position = "left", - width = 40, - mapping_options = { - noremap = true, - nowait = true, - }, - mappings = { - [""] = { - "toggle_node", - nowait = false, -- disable `nowait` if you have existing combos starting with this char that you want to use - }, - ["<2-LeftMouse>"] = "open", - [""] = "open", - [""] = "cancel", -- close preview or floating neo-tree window - ["P"] = { "toggle_preview", config = { use_float = true, use_image_nvim = true } }, - -- Read `# Preview Mode` for more information - ["l"] = "focus_preview", - ["S"] = "open_split", - ["s"] = "open_vsplit", - -- ["S"] = "split_with_window_picker", - -- ["s"] = "vsplit_with_window_picker", - ["t"] = "open_tabnew", - -- [""] = "open_drop", - -- ["t"] = "open_tab_drop", - ["w"] = "open_with_window_picker", - --["P"] = "toggle_preview", -- enter preview mode, which shows the current node without focusing - ["C"] = "close_node", - -- ['C'] = 'close_all_subnodes', - ["z"] = "close_all_nodes", - --["Z"] = "expand_all_nodes", - ["a"] = { - "add", - -- this command supports BASH style brace expansion ("x{a,b,c}" -> xa,xb,xc). see `:h neo-tree-file-actions` for details - -- some commands may take optional config options, see `:h neo-tree-mappings` for details - config = { - show_path = "none", -- "none", "relative", "absolute" - }, - }, - ["A"] = "add_directory", -- also accepts the optional config.show_path option like "add". this also supports BASH style brace expansion. - ["d"] = "delete", - ["r"] = "rename", - ["y"] = "copy_to_clipboard", - ["x"] = "cut_to_clipboard", - ["p"] = "paste_from_clipboard", - ["c"] = "copy", -- takes text input for destination, also accepts the optional config.show_path option like "add": - -- ["c"] = { - -- "copy", - -- config = { - -- show_path = "none" -- "none", "relative", "absolute" - -- } - --} - ["m"] = "move", -- takes text input for destination, also accepts the optional config.show_path option like "add". - ["q"] = "close_window", - ["R"] = "refresh", - ["?"] = "show_help", - [""] = "prev_source", - [""] = "next_source", - ["i"] = "show_file_details", - }, - }, - nesting_rules = {}, - document_symbols = {}, - filesystem = { - filtered_items = { - visible = false, -- when true, they will just be displayed differently than normal items - hide_dotfiles = true, - hide_gitignored = true, - hide_hidden = true, -- only works on Windows for hidden files/directories - hide_by_name = { - --"node_modules" - }, - hide_by_pattern = { -- uses glob style patterns - --"*.meta", - --"*/src/*/tsconfig.json", - }, - always_show = { -- remains visible even if other settings would normally hide it - --".gitignored", - }, - always_show_by_pattern = { -- uses glob style patterns - --".env*", - }, - never_show = { -- remains hidden even if visible is toggled to true, this overrides always_show - --".DS_Store", - --"thumbs.db" - }, - never_show_by_pattern = { -- uses glob style patterns - --".null-ls_*", - }, - }, - group_empty_dirs = false, -- when true, empty folders will be grouped together - hijack_netrw_behavior = "open_default", -- netrw disabled, opening a directory opens neo-tree - -- in whatever position is specified in window.position - -- "open_current", -- netrw disabled, opening a directory opens within the - -- window like netrw would, regardless of window.position - -- "disabled", -- netrw left alone, neo-tree does not handle opening dirs - use_libuv_file_watcher = false, -- This will use the OS level file watchers to detect changes - follow_current_file = { enabled = true }, - -- instead of relying on nvim autocmd events. - window = { - mappings = { - [""] = "navigate_up", - ["."] = "set_root", - ["H"] = "toggle_hidden", - ["/"] = "fuzzy_finder", - ["D"] = "fuzzy_finder_directory", - ["#"] = "fuzzy_sorter", -- fuzzy sorting using the fzy algorithm - -- ["D"] = "fuzzy_sorter_directory", - ["f"] = "filter_on_submit", - [""] = "clear_filter", - ["[g"] = "prev_git_modified", - ["]g"] = "next_git_modified", - ["o"] = { "show_help", nowait = false, config = { title = "Order by", prefix_key = "o" } }, - ["oc"] = { "order_by_created", nowait = false }, - ["od"] = { "order_by_diagnostics", nowait = false }, - ["og"] = { "order_by_git_status", nowait = false }, - ["om"] = { "order_by_modified", nowait = false }, - ["on"] = { "order_by_name", nowait = false }, - ["os"] = { "order_by_size", nowait = false }, - ["ot"] = { "order_by_type", nowait = false }, - -- [''] = function(state) ... end, - }, - fuzzy_finder_mappings = { -- define keymaps for filter popup window in fuzzy_finder_mode - [""] = "move_cursor_down", - [""] = "move_cursor_down", - [""] = "move_cursor_up", - [""] = "move_cursor_up", - -- [''] = function(state, scroll_padding) ... end, - }, - }, - - commands = {}, -- Add a custom command or override a global one using the same function name - }, - buffers = { - follow_current_file = { - enabled = true, -- This will find and focus the file in the active buffer every time - leave_dirs_open = true, -- `false` closes auto expanded dirs, such as with `:Neotree reveal` - }, - group_empty_dirs = true, -- when true, empty folders will be grouped together - show_unloaded = true, - window = { - mappings = { - ["bd"] = "buffer_delete", - [""] = "navigate_up", - ["."] = "set_root", - ["o"] = { "show_help", nowait = false, config = { title = "Order by", prefix_key = "o" } }, - ["oc"] = { "order_by_created", nowait = false }, - ["od"] = { "order_by_diagnostics", nowait = false }, - ["om"] = { "order_by_modified", nowait = false }, - ["on"] = { "order_by_name", nowait = false }, - ["os"] = { "order_by_size", nowait = false }, - ["ot"] = { "order_by_type", nowait = false }, - }, - }, - }, - git_status = { - window = { - position = "float", - mappings = { - ["A"] = "git_add_all", - ["gu"] = "git_unstage_file", - ["ga"] = "git_add_file", - ["gr"] = "git_revert_file", - ["gc"] = "git_commit", - ["gp"] = "git_push", - ["gg"] = "git_commit_and_push", - ["o"] = { "show_help", nowait = false, config = { title = "Order by", prefix_key = "o" } }, - ["oc"] = { "order_by_created", nowait = false }, - ["od"] = { "order_by_diagnostics", nowait = false }, - ["om"] = { "order_by_modified", nowait = false }, - ["on"] = { "order_by_name", nowait = false }, - ["os"] = { "order_by_size", nowait = false }, - ["ot"] = { "order_by_type", nowait = false }, - }, - }, - }, -} - -return config diff --git a/lua/plugins/opts/noice.lua b/lua/plugins/opts/noice.lua deleted file mode 100644 index 85af31a..0000000 --- a/lua/plugins/opts/noice.lua +++ /dev/null @@ -1,81 +0,0 @@ -local config = { - views = { - cmdline_popup = { - position = { - row = 3, - col = "50%", - }, - size = { - width = 60, - height = "auto", - }, - }, - cmdline_popupmenu = { - position = { - row = 6, - col = "50%", - }, - size = { - width = 60, - height = "auto", - }, - }, - }, - cmdline = { - enabled = true, - view = "cmdline", -- cmdline, cmdline_popup - opts = {}, - ---@type table - format = { - cmdline = { pattern = "^:", icon = "λ", lang = "vim", title = "" }, - search_down = { kind = "search", pattern = "^/", icon = " ", lang = "regex" }, - search_up = { kind = "search", pattern = "^%?", icon = " ", lang = "regex" }, - filter = { pattern = "^:%s*!", icon = "$", lang = "bash" }, - lua = { - pattern = { "^:%s*lua%s+", "^:%s*lua%s*=%s*", "^:%s*=%s*" }, - icon = "", - lang = "lua", - }, - help = { pattern = "^:%s*he?l?p?%s+", icon = "" }, - input = {}, -- Used by input() - -- lua = false, -- to disable a format, set to `false` - }, - }, - notify = { - -- Noice can be used as `vim.notify` so you can route any notification like other messages - -- Notification messages have their level and other properties set. - -- event is always "notify" and kind can be any log level as a string - -- The default routes will forward notifications to nvim-notify - -- Benefit of using Noice for this is the routing and consistent history view - enabled = false, - view = "notify", - }, - lsp = { - -- override markdown rendering so that **cmp** and other plugins use **Treesitter** - override = { - ["vim.lsp.util.convert_input_to_markdown_lines"] = true, - ["vim.lsp.util.stylize_markdown"] = true, - ["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp - }, - }, - presets = { - bottom_search = true, -- use a classic bottom cmdline for search - command_palette = true, -- position the cmdline and popupmenu together - long_message_to_split = true, -- long messages will be sent to a split - inc_rename = false, -- enables an input dialog for inc-rename.nvim - lsp_doc_border = false, -- add a border to hover docs and signature help - }, - routes = { - { view = "cmdline", filter = { event = "msg_showmode" } }, - { - filter = { - event = "msg_show", - kind = "", - find = "written", - }, - opts = { skip = true }, - }, - }, -} - -return config diff --git a/lua/plugins/opts/scrollbar.lua b/lua/plugins/opts/scrollbar.lua deleted file mode 100644 index 69f3114..0000000 --- a/lua/plugins/opts/scrollbar.lua +++ /dev/null @@ -1,153 +0,0 @@ -return { - show = true, - show_in_active_only = false, - set_highlights = true, - folds = 1000, -- handle folds, set to number to disable folds if no. of lines in buffer exceeds this - max_lines = false, -- disables if no. of lines in buffer exceeds this - hide_if_all_visible = false, -- Hides everything if all lines are visible - throttle_ms = 100, - handle = { - text = " ", - blend = 30, -- Integer between 0 and 100. 0 for fully opaque and 100 to full transparent. Defaults to 30. - color = nil, - color_nr = nil, -- cterm - highlight = "CursorColumn", - hide_if_all_visible = true, -- Hides handle if all lines are visible - }, - marks = { - Cursor = { - text = "•", - priority = 0, - gui = nil, - color = nil, - cterm = nil, - color_nr = nil, -- cterm - highlight = "Normal", - }, - Search = { - text = { "-", "=" }, - priority = 1, - gui = nil, - color = nil, - cterm = nil, - color_nr = nil, -- cterm - highlight = "Search", - }, - Error = { - text = { "-", "x" }, - priority = 2, - gui = nil, - color = nil, - cterm = nil, - color_nr = nil, -- cterm - highlight = "DiagnosticVirtualTextError", - }, - Warn = { - text = { "-", "!" }, - priority = 3, - gui = nil, - color = nil, - cterm = nil, - color_nr = nil, -- cterm - highlight = "DiagnosticVirtualTextWarn", - }, - Info = { - text = { "-", "" }, - priority = 4, - gui = nil, - color = nil, - cterm = nil, - color_nr = nil, -- cterm - highlight = "DiagnosticVirtualTextInfo", - }, - Hint = { - text = { "-", "=" }, - priority = 5, - gui = nil, - color = nil, - cterm = nil, - color_nr = nil, -- cterm - highlight = "DiagnosticVirtualTextHint", - }, - Misc = { - text = { "-", "=" }, - priority = 6, - gui = nil, - color = nil, - cterm = nil, - color_nr = nil, -- cterm - highlight = "Normal", - }, - GitAdd = { - text = "+", - priority = 7, - gui = nil, - color = nil, - cterm = nil, - color_nr = nil, -- cterm - highlight = "GitSignsAdd", - }, - GitChange = { - text = "~", - priority = 7, - gui = nil, - color = nil, - cterm = nil, - color_nr = nil, -- cterm - highlight = "GitSignsChange", - }, - GitDelete = { - text = "▁", - priority = 7, - gui = nil, - color = nil, - cterm = nil, - color_nr = nil, -- cterm - highlight = "GitSignsDelete", - }, - }, - excluded_buftypes = { - "terminal", - "neo-tree", - "filesystem", - }, - excluded_filetypes = { - "blink-cmp-menu", - "dropbar_menu", - "dropbar_menu_fzf", - "DressingInput", - "cmp_docs", - "cmp_menu", - "noice", - "prompt", - "TelescopePrompt", - "neo-tree", - "filesystem", - }, - autocmd = { - render = { - "BufWinEnter", - "TabEnter", - "TermEnter", - "WinEnter", - "CmdwinLeave", - "TextChanged", - "VimResized", - "WinScrolled", - }, - clear = { - "BufWinLeave", - "TabLeave", - "TermLeave", - "WinLeave", - }, - }, - handlers = { - cursor = true, - diagnostic = true, - gitsigns = true, -- Requires gitsigns - handle = true, - search = false, -- Requires hlslens - ale = false, -- Requires ALE - }, -} diff --git a/lua/plugins/opts/todocomments.lua b/lua/plugins/opts/todocomments.lua deleted file mode 100644 index e69de29..0000000 diff --git a/lua/plugins/opts/treesitter.lua b/lua/plugins/opts/treesitter.lua deleted file mode 100644 index 1c5b9ae..0000000 --- a/lua/plugins/opts/treesitter.lua +++ /dev/null @@ -1,35 +0,0 @@ -local options = { - auto_install = true, - ensure_installed = { - "lua", - "css", - "scss", - "html", - "json", - "tsx", - "bash", - "javascript", - "json", - "markdown", - "markdown_inline", - "python", - "query", - "regex", - "typescript", - "styled", - "vim", - "yaml", - "rust", - "ruby", - "c", - }, - - highlight = { - enable = true, - use_languagetree = true, - }, - - indent = { enable = true }, -} - -return options diff --git a/lua/plugins/opts/treesitterContext.lua b/lua/plugins/opts/treesitterContext.lua deleted file mode 100644 index 8e4b873..0000000 --- a/lua/plugins/opts/treesitterContext.lua +++ /dev/null @@ -1,16 +0,0 @@ -local options = { - enable = true, -- Enable this plugin (Can be enabled/disabled later via commands) - max_lines = 1, -- How many lines the window should span. Values <= 0 mean no limit. - min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit. - line_numbers = true, - multiline_threshold = 20, -- Maximum number of lines to show for a single context - trim_scope = "outer", -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer' - mode = "cursor", -- Line used to calculate context. Choices: 'cursor', 'topline' - -- Separator between context and content. Should be a single character string, like '-'. - -- When separator is set, the context will only show up when there are at least 2 lines above cursorline. - separator = nil, - zindex = 20, -- The Z-index of the context window - on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching -} - -return options diff --git a/lua/plugins/preview.lua b/lua/plugins/preview.lua deleted file mode 100644 index 5962eca..0000000 --- a/lua/plugins/preview.lua +++ /dev/null @@ -1,18 +0,0 @@ -return { - -- { - -- "toppair/peek.nvim", - -- event = { "VeryLazy" }, - -- build = "deno task --quiet build:fast", - -- config = function() - -- require("peek").setup() - -- vim.api.nvim_create_user_command("PeekOpen", require("peek").open, {}) - -- vim.api.nvim_create_user_command("PeekClose", require("peek").close, {}) - -- end, - -- }, - { - "norcalli/nvim-colorizer.lua", - init = function(_, opts) - return require("colorizer").setup(opts) - end, - }, -} diff --git a/lua/plugins/qol.lua b/lua/plugins/qol.lua deleted file mode 100644 index 055eaaa..0000000 --- a/lua/plugins/qol.lua +++ /dev/null @@ -1,36 +0,0 @@ -local config = { - { - "folke/snacks.nvim", - priority = 1000, - lazy = false, - opts = { - bigfile = { enabled = true }, - dashboard = { enabled = true }, - explorer = { enabled = false }, - indent = { enabled = false }, - input = { enabled = false }, - picker = { enabled = true }, - notifier = { enabled = false }, - quickfile = { enabled = false }, - scope = { enabled = true }, - scroll = { enabled = true }, - statuscolumn = { enabled = true }, - words = { enabled = true }, - }, - }, - { - 'stevearc/overseer.nvim', - opts = {}, - }, - { - "rmagatti/auto-session", - lazy = false, - ---@module "auto-session" - opts = { - suppressed_dirs = { "~/", "~/Downloads", "/" }, - }, - } - -} - -return config diff --git a/lua/plugins/search.lua b/lua/plugins/search.lua index a25c9d3..4367831 100644 --- a/lua/plugins/search.lua +++ b/lua/plugins/search.lua @@ -29,25 +29,4 @@ return { end end, }, - { 'mbbill/undotree' }, - { - "folke/flash.nvim", - event = "VeryLazy", - ---@type Flash.Config - opts = {}, - keys = { - { "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" }, - { "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" }, - { "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" }, - { "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" }, - { "", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" }, - }, - }, - { - 'MagicDuck/grug-far.nvim', - -- config = function() - -- require('grug-far').setup({ - -- }); - -- end - }, } diff --git a/lua/plugins/style.lua b/lua/plugins/style.lua index 0efa569..c6a3901 100644 --- a/lua/plugins/style.lua +++ b/lua/plugins/style.lua @@ -2,44 +2,6 @@ -- │ Styling │ -- ╰─────────╯ return { - -- { - -- dir = "~/Documents/Code/plain-colors.nvim", - -- -- "rose-pine/neovim", - -- name = "rose-pine", - -- opts = { - -- variant = "darker", -- dark, light, darker | dawn - -- }, - -- }, - { - "oskarnurm/koda.nvim", - lazy = false, - priority = 1000, - }, - { - "dqnid/komau.vim", - -- dir = "~/Documents/Code/komau.vim", - opts = { - style = "auto", -- "dark" | "light" | "auto" (uses &background) - transparent = false, - dim_inactive = false, - terminal_colors = true, - styles = { - comments = { italic = true }, - keywords = { bold = true }, - }, - integrations = { - treesitter = true, - lsp = true, - telescope = true, - cmp = true, - gitsigns = true, - which_key = true, - indent_blankline = true, - mini = true, - statusline = { lightline = true, lualine = true }, - }, - }, - }, { "ellisonleao/gruvbox.nvim", priority = 1000, @@ -69,45 +31,4 @@ return { transparent_mode = false, }, }, - - { "echasnovski/mini.icons" }, - - { - "folke/noice.nvim", - event = "VeryLazy", - opts = function() - return require("plugins.opts.noice") - end, - dependencies = { - "MunifTanjim/nui.nvim", - -- OPTIONAL: - -- `nvim-notify` is only needed, if you want to use the notification view. - -- If not available, we use `mini` as the fallback - -- "rcarriga/nvim-notify", - }, - }, - - { - "shortcuts/no-neck-pain.nvim", - version = "*", - }, - - { - "sphamba/smear-cursor.nvim", - opts = { - smear_between_buffers = false, - smear_between_neighbor_lines = true, - scroll_buffer_space = false, - -- Set to `true` if your font supports legacy computing symbols (block unicode symbols). - legacy_computing_symbols_support = false, - smear_insert_mode = true, - - -- fast smear - stiffness = 0.8, -- 0.6 [0, 1] - trailing_stiffness = 0.5, -- 0.4 [0, 1] - stiffness_insert_mode = 0.6, -- 0.4 [0, 1] - trailing_stiffness_insert_mode = 0.6, -- 0.4 [0, 1] - distance_stop_animating = 0.5, -- 0.1 > 0 - }, - }, }