diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf index 2ea1556..4b077f9 100644 --- a/.config/kitty/kitty.conf +++ b/.config/kitty/kitty.conf @@ -854,7 +854,7 @@ macos_titlebar_color system #: you are probably better off just hiding the titlebar with #: hide_window_decorations. -macos_option_as_alt no +macos_option_as_alt yes #: Use the option key as an alt key. With this set to no, kitty will #: use the macOS native Option+Key = unicode character behavior. This diff --git a/.config/nvim-astro/after/plugin/options.lua b/.config/nvim-astro/after/plugin/options.lua index 83449b3..ed51687 100644 --- a/.config/nvim-astro/after/plugin/options.lua +++ b/.config/nvim-astro/after/plugin/options.lua @@ -46,5 +46,5 @@ o.wildignore:append { } if vim.fn.executable "rg" == 1 then - o.grepprg = "rg --vimgrep -uu --smart-case -g '!{.git/,node_modules/,android/,ios/,dist/,vendor/}'" -- Also check RIPGREP_CONFIG_PATH="$HOME/.config/ripgreprc" + o.grepprg = "rg --vimgrep --smart-case" -- Also check RIPGREP_CONFIG_PATH="$HOME/.config/ripgreprc" end diff --git a/.config/nvim-astro/lua/plugins/astrolsp.lua b/.config/nvim-astro/lua/plugins/astrolsp.lua index 91c1706..32477be 100644 --- a/.config/nvim-astro/lua/plugins/astrolsp.lua +++ b/.config/nvim-astro/lua/plugins/astrolsp.lua @@ -175,7 +175,6 @@ return { else builtin.lsp_definitions() end - print(ok) end, desc = "Goto references", cond = "textDocument/definition", diff --git a/.config/nvim-astro/lua/plugins/mini/operators.lua b/.config/nvim-astro/lua/plugins/mini/operators.lua index 69eebd5..5a02d1c 100644 --- a/.config/nvim-astro/lua/plugins/mini/operators.lua +++ b/.config/nvim-astro/lua/plugins/mini/operators.lua @@ -7,13 +7,16 @@ return { { "g=", mode = { "n", "x" }, desc = "Evalute" }, { "ge", mode = { "n", "x" }, desc = "Exchange" }, { "gm", mode = { "n", "x" }, desc = "Duplicate" }, - { "gy", mode = { "n", "x" }, desc = "Replace with register" }, + { "x", mode = { "n", "x" }, desc = "Replace with register" }, { "gs", mode = { "n", "x" }, desc = "Sort" }, }, opts = { -- Exchange text regions exchange = { prefix = "ge" }, - replace = { prefix = "gy" }, + replace = { prefix = "x" }, }, - config = function(_, opts) require("mini.operators").setup(opts) end, + config = function(_, opts) + require("mini.operators").setup(opts) + vim.keymap.set("n", "X", "x$", { desc = "Replace to end of line" }) + end, } diff --git a/.config/nvim-lazy/.ignore b/.config/nvim-lazy/.ignore new file mode 100644 index 0000000..f0d3191 --- /dev/null +++ b/.config/nvim-lazy/.ignore @@ -0,0 +1,12 @@ +tt.* +.tests +doc/tags +debug +.repro +foo.* +*.log +data +./lazy-lock.json +./lazyvim.json +./README.md +./LICENSE diff --git a/.config/nvim-lazy/README.md b/.config/nvim-lazy/README.md deleted file mode 100644 index 185280b..0000000 --- a/.config/nvim-lazy/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# đź’¤ LazyVim - -A starter template for [LazyVim](https://github.com/LazyVim/LazyVim). -Refer to the [documentation](https://lazyvim.github.io/installation) to get started. diff --git a/.config/nvim-lazy/lazy-lock.json b/.config/nvim-lazy/lazy-lock.json index ad17ec5..74f2402 100644 --- a/.config/nvim-lazy/lazy-lock.json +++ b/.config/nvim-lazy/lazy-lock.json @@ -1,99 +1,93 @@ { - "LazyVim": { "branch": "main", "commit": "3c605f547c594b509d83f8677bb7609c005edea5" }, + "LazyVim": { "branch": "main", "commit": "d0c366e4d861b848bdc710696d5311dca2c6d540" }, "LuaSnip": { "branch": "master", "commit": "33b06d72d220aa56a7ce80a0dd6f06c70cd82b9d" }, "NeoTerm.lua": { "branch": "main", "commit": "f71a4a9663c52673a677a09894d945983c8da303" }, - "SchemaStore.nvim": { "branch": "main", "commit": "f8c2a0f5d51b800ea4625808e243d9e8f7c5e1df" }, + "SchemaStore.nvim": { "branch": "main", "commit": "545d8814f624fb5239c4691fa0914549540e6f53" }, "age.nvim": { "branch": "main", "commit": "f1793e14123a7c5374a3744aacab9c283014fa1d" }, "auto-session": { "branch": "main", "commit": "021b64ed7d4ac68a37be3ad28d8e1cba5bec582c" }, - "avante.nvim": { "branch": "main", "commit": "4464b7f4ae26254cd506a354284a02129941e244" }, + "avante.nvim": { "branch": "main", "commit": "be92be6124f743c30ba4b52ded908d02cfb80a1b" }, + "blink-ripgrep.nvim": { "branch": "main", "commit": "8a47d404a359c70c796cb0979ddde4c788fd44e5" }, + "blink.cmp": { "branch": "main", "commit": "5f442681df24fe705d1ee7ce5b4d435aa4b4dee4" }, "bufferline.nvim": { "branch": "main", "commit": "261a72b90d6db4ed8014f7bda976bcdc9dd7ce76" }, "bullets.vim": { "branch": "master", "commit": "2253f970e54320dbd76fd6bb4f5a0bf2436ce232" }, - "catppuccin": { "branch": "main", "commit": "faf15ab0201b564b6368ffa47b56feefc92ce3f4" }, + "catppuccin": { "branch": "main", "commit": "5d9582dbbe37e465f7f93ca6e3dd60cd20eea44f" }, "clangd_extensions.nvim": { "branch": "main", "commit": "8f7b72100883e0e34400d9518d40a03f21e4d0a6" }, - "cmp-async-path": { "branch": "main", "commit": "d6d1ffa2075039632a2d71e8fa139818e15ac757" }, - "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-git": { "branch": "main", "commit": "ec049036e354ed8ed0215f2427112882e1ea7051" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, - "cmp-rg": { "branch": "master", "commit": "70a43543f61b6083ba9c3b7deb9ccee671410ac6" }, - "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "codecompanion.nvim": { "branch": "main", "commit": "b993cc1d15cb041a71dc06759347add9a68c4577" }, - "conform.nvim": { "branch": "master", "commit": "0e915ff2c9bee21df34980777cd47667473b3cc1" }, - "copilot.lua": { "branch": "master", "commit": "c810500b69cb8bcea58f2be635cb1340011714b5" }, + "codecompanion.nvim": { "branch": "main", "commit": "8529f7a7be99a1cc1ed53edf5d86fdf617036a50" }, + "conform.nvim": { "branch": "master", "commit": "9180320205d250429f0f80e073326c674e2a7149" }, + "copilot.lua": { "branch": "master", "commit": "886ee73b6d464b2b3e3e6a7ff55ce87feac423a9" }, "crates.nvim": { "branch": "main", "commit": "8bf8358ee326d5d8c11dcd7ac0bcc9ff97dbc785" }, "dial.nvim": { "branch": "master", "commit": "46b4375e84e8eb771129bff6b2b1e47746601ef9" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, - "dooing": { "branch": "main", "commit": "4c2847ce959eafe2593f1fe1c709e1ca64a40af7" }, - "dressing.nvim": { "branch": "master", "commit": "fc78a3ca96f4db9f8893bb7e2fd9823e0780451b" }, + "dooing": { "branch": "main", "commit": "0f944edd5cbd6486bb4598d0f275fffadc7fcfb5" }, + "dressing.nvim": { "branch": "master", "commit": "3a45525bb182730fe462325c99395529308f431e" }, "flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" }, "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, + "fzf-lua": { "branch": "main", "commit": "e724f5080b94ae685978919c971b3371b1b48a60" }, "git-conflict.nvim": { "branch": "main", "commit": "4bbfdd92d547d2862a75b4e80afaf30e73f7bbb4" }, "gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" }, "grapple.nvim": { "branch": "main", "commit": "b41ddfc1c39f87f3d1799b99c2f0f1daa524c5f7" }, - "grug-far.nvim": { "branch": "main", "commit": "938ba023eb5cb462436c8c43fa4d9859242b7ba3" }, + "grug-far.nvim": { "branch": "main", "commit": "c88435b825a35bfa468b47159709b3221976ecd1" }, "gx.nvim": { "branch": "main", "commit": "b01db725a001e4215f363159fc04727f6fde0a1c" }, "img-clip.nvim": { "branch": "main", "commit": "5ff183655ad98b5fc50c55c66540375bbd62438c" }, - "indent-blankline.nvim": { "branch": "master", "commit": "259357fa4097e232730341fa60988087d189193a" }, - "lazy.nvim": { "branch": "main", "commit": "014d1d6d78df4e58f962158e6e00261d8632612c" }, - "lazydev.nvim": { "branch": "main", "commit": "f59bd14a852ca43db38e3662395354cb2a9b13e0" }, + "lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" }, + "lazydev.nvim": { "branch": "main", "commit": "8620f82ee3f59ff2187647167b6b47387a13a018" }, "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "8e46de9241d3997927af12196bd8faa0ed08c29a" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "c6c686781f9841d855bf1b926e10aa5e19430a38" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, "mini.ai": { "branch": "main", "commit": "ebb04799794a7f94628153991e6334c3304961b8" }, "mini.align": { "branch": "main", "commit": "26111a737494bc39576ad67b52bbc2638ca23553" }, - "mini.icons": { "branch": "main", "commit": "54686be7d58807906cb2c8c2216e0bf9c044f19a" }, + "mini.icons": { "branch": "main", "commit": "44c0160526f7ae17ca8e8eab9ab235d047fcf7a6" }, "mini.move": { "branch": "main", "commit": "4caa1c212f5ca3d1633d21cfb184808090ed74b1" }, "mini.operators": { "branch": "main", "commit": "35b12f54bd5acb860f4297fd6d12fd07b1b065e2" }, "mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" }, "mini.surround": { "branch": "main", "commit": "aa5e245829dd12d8ff0c96ef11da28681d6049aa" }, - "neo-tree.nvim": { "branch": "main", "commit": "395ce4675a54828f9fd730d78f7910c114ab0a49" }, + "neo-tree.nvim": { "branch": "main", "commit": "ecf9ba5d017bb80d859124388a32313c7ee423e9" }, "neogen": { "branch": "main", "commit": "37dd095892e3f846418c465852f7b21f81d0f46c" }, - "neogit": { "branch": "master", "commit": "40038473707c54a846bd11ecaf5933dd45858972" }, + "neogit": { "branch": "master", "commit": "9ea60f79e370d8f4847efc145e53afe4b0613fc1" }, "neotest": { "branch": "master", "commit": "6d3d22cdad49999ef774ebe1bc250a4994038964" }, "neotest-elixir": { "branch": "master", "commit": "c5067bcc3ec6a0bba7b5694fa15aeb17f16aeb3c" }, - "neotest-golang": { "branch": "main", "commit": "148cf3145dfac42fe7ff21d7c96bce1a7802d7c1" }, + "neotest-golang": { "branch": "main", "commit": "722b6116b4c9201a97edb06565ebed797f88441d" }, "neotest-python": { "branch": "master", "commit": "a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e" }, - "noice.nvim": { "branch": "main", "commit": "7b1960c48078a8b2fb44a89db82f4fa637b2d7c8" }, + "noice.nvim": { "branch": "main", "commit": "eaed6cc9c06aa2013b5255349e4f26a6b17ab70f" }, "nordic.nvim": { "branch": "main", "commit": "1ee4044077059b34eacd18d93613495a602c131f" }, - "nui.nvim": { "branch": "main", "commit": "b1b9b75a2d8041e1c2234f7448c61f8468a4258d" }, - "nvim-cmp": { "branch": "main", "commit": "3403e2e9391ed0a28c3afddd8612701b647c8e26" }, - "nvim-dap": { "branch": "master", "commit": "b08e05d7cff6024a9c29b64287d295db7c191450" }, + "nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" }, + "nvim-cmp": { "branch": "main", "commit": "b555203ce4bd7ff6192e759af3362f9d217e8c89" }, + "nvim-dap": { "branch": "master", "commit": "665d3569a86395fe0dab85efbdb26d7d2ee57e49" }, "nvim-dap-go": { "branch": "main", "commit": "6aa88167ea1224bcef578e8c7160fe8afbb44848" }, "nvim-dap-python": { "branch": "master", "commit": "34282820bb713b9a5fdb120ae8dd85c2b3f49b51" }, "nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" }, - "nvim-dap-virtual-text": { "branch": "master", "commit": "76d80c3d171224315b61c006502a1e30c213a9ab" }, - "nvim-highlight-colors": { "branch": "main", "commit": "e967e2ba13fd4ca731b41d0e5cc1ac2edcd6e25e" }, - "nvim-lint": { "branch": "master", "commit": "6b46370d02cd001509a765591a3ffc481b538794" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "df66808cd78b5a97576bbaeee95ed5ca385a9750" }, + "nvim-highlight-colors": { "branch": "main", "commit": "68a4df620cf58e2c7336e53738e8cf3a522ad694" }, + "nvim-lint": { "branch": "master", "commit": "1fea92f1d9908eaa5eb8bafe08b4293d7aadaa55" }, "nvim-lsp-file-operations": { "branch": "master", "commit": "9744b738183a5adca0f916527922078a965515ed" }, - "nvim-lspconfig": { "branch": "master", "commit": "5a812abc65d529ea7673059a348814c21d7f87ff" }, + "nvim-lspconfig": { "branch": "master", "commit": "ff2b85abaa810f6611233dbe6d31c07510ebf43d" }, "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, "nvim-snippets": { "branch": "main", "commit": "56b4052f71220144689caaa2e5b66222ba5661eb" }, - "nvim-treesitter": { "branch": "master", "commit": "337b503688eccb3046547661e4c738e674548fcf" }, - "nvim-treesitter-context": { "branch": "master", "commit": "3288c5af7d3820d716272f1d05ab661cc540a5d6" }, + "nvim-treesitter": { "branch": "master", "commit": "17678b00fa5c2712890a0ec2e269d0a4de1207df" }, + "nvim-treesitter-context": { "branch": "master", "commit": "2bcf700b59bc92850ca83a1c02e86ba832e0fae0" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" }, "nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" }, - "nvim-web-devicons": { "branch": "master", "commit": "e73d2774d12d0ecf9e05578d692ba1ea50508cf2" }, + "nvim-web-devicons": { "branch": "master", "commit": "c1a86a2c386c55efc02fa2ec2c3a914af653d954" }, "nvim-window-picker": { "branch": "main", "commit": "41cfaa428577c53552200a404ae9b3a0b5719706" }, "persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, "quick-scope": { "branch": "master", "commit": "4d35d3b2bc6794666353dcc241b2680bd560416f" }, "refactoring.nvim": { "branch": "master", "commit": "2db6d378e873de31d18ade549c2edba64ff1c2e3" }, - "render-markdown.nvim": { "branch": "main", "commit": "e41b0002fe4196825450ab5a6343300c40791d51" }, - "rustaceanvim": { "branch": "master", "commit": "a244210b28f9055c2b4cfa85c92c8a71c13671c9" }, - "snacks.nvim": { "branch": "main", "commit": "66f7daa2b5b46213d98b94b8702e5b9377c6b976" }, - "tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "3d3cd95e4a4135c250faf83dd5ed61b8e5502b86" }, + "render-markdown.nvim": { "branch": "main", "commit": "ba6253d9673daf0cf394b87b2c2ecb7630944c7d" }, + "rustaceanvim": { "branch": "master", "commit": "6db1fe9e3f005b2e0921c7302d2c195eeb90a451" }, + "snacks.nvim": { "branch": "main", "commit": "98df370703b3c47a297988f3e55ce99628639590" }, "telescope-egrepify.nvim": { "branch": "master", "commit": "a8070970a661330c4e00450d25f874f6c2b00af9" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope.nvim": { "branch": "master", "commit": "2eca9ba22002184ac05eddbe47a7fe2d5a384dfc" }, "template-string.nvim": { "branch": "main", "commit": "419bfb2e4d5f0e6ddd0d4435f85b69da0d88d524" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, "tokyonight.nvim": { "branch": "main", "commit": "c2725eb6d086c8c9624456d734bd365194660017" }, "trouble.nvim": { "branch": "main", "commit": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6" }, - "ts-comments.nvim": { "branch": "main", "commit": "2002692ad1d3f6518d016550c20c2a890f0cbf0e" }, + "ts-comments.nvim": { "branch": "main", "commit": "872dcfa0418f4a33b7437fb4d9f4e89f2f000d74" }, "venv-selector.nvim": { "branch": "regexp", "commit": "e82594274bf7b54387f9a2abe65f74909ac66e97" }, "vim-subversive": { "branch": "master", "commit": "cea98a62ded4028118ad71c3e81b26eff2e0b8a0" }, "vim-visual-multi": { "branch": "master", "commit": "a6975e7c1ee157615bbc80fc25e4392f71c344d4" }, - "which-key.nvim": { "branch": "main", "commit": "9b365a6428a9633e3eeb34dbef1b791511c54f70" }, - "yazi.nvim": { "branch": "main", "commit": "ce6b5b249cde9e4a27dfce18a6adb57c170d4325" } + "which-key.nvim": { "branch": "main", "commit": "8ab96b38a2530eacba5be717f52e04601eb59326" }, + "yazi.nvim": { "branch": "main", "commit": "229e12bc1791a4050bf7e43f6b16608eeaf8d2a8" } } diff --git a/.config/nvim-lazy/lazyvim.json b/.config/nvim-lazy/lazyvim.json index 7fd2a72..82e173e 100644 --- a/.config/nvim-lazy/lazyvim.json +++ b/.config/nvim-lazy/lazyvim.json @@ -3,7 +3,7 @@ ], "news": { - "NEWS.md": "7429" + "NEWS.md": "10960" }, "version": 7 } \ No newline at end of file diff --git a/.config/nvim-lazy/lua/config/keymaps.lua b/.config/nvim-lazy/lua/config/keymaps.lua index 40c5663..864b74f 100644 --- a/.config/nvim-lazy/lua/config/keymaps.lua +++ b/.config/nvim-lazy/lua/config/keymaps.lua @@ -29,3 +29,6 @@ vim.keymap.set("n", "C", '"_C') for i = 1, 9 do vim.keymap.set("n", "" .. i, i .. "gt", { desc = "Goto Tab " .. i }) end +if _G.Snacks then + Snacks.toggle.zoom():map("m") +end diff --git a/.config/nvim-lazy/lua/config/lazy.lua b/.config/nvim-lazy/lua/config/lazy.lua index a2f9ea7..1d1380c 100644 --- a/.config/nvim-lazy/lua/config/lazy.lua +++ b/.config/nvim-lazy/lua/config/lazy.lua @@ -21,8 +21,8 @@ require("lazy").setup({ { import = "lazyvim.plugins.extras.editor.refactoring" }, { import = "lazyvim.plugins.extras.editor.dial" }, + -- { import = "lazyvim.plugins.extras.editor.telescope" }, { import = "lazyvim.plugins.extras.coding.luasnip" }, - -- { import = "lazyvim.plugins.extras.coding.blink" }, { import = "lazyvim.plugins.extras.ui.treesitter-context" }, { import = "lazyvim.plugins.extras.dap.core" }, diff --git a/.config/nvim-lazy/lua/plugins/completion.lua b/.config/nvim-lazy/lua/plugins/completion.lua index 6035c37..b475707 100644 --- a/.config/nvim-lazy/lua/plugins/completion.lua +++ b/.config/nvim-lazy/lua/plugins/completion.lua @@ -15,17 +15,79 @@ end ---@type LazySpec return { - -- "saghen/blink.cmp", - -- opts = { - -- keymap = { - -- preset = "enter", - -- [""] = { "accept", "fallback" }, - -- [""] = { "select_prev", "fallback" }, - -- [""] = { "select_next", "fallback" }, - -- }, - -- }, + { + "saghen/blink.cmp", + enabled = vim.g.lazyvim_cmp == "blink.cmp" or vim.g.lazyvim_cmp == "auto", + dependencies = { + "mikavilpas/blink-ripgrep.nvim", + }, + ---@module 'blink.cmp' + ---@type blink.cmp.Config + opts = { + keymap = { + preset = "enter", + [""] = { "select_and_accept", "fallback" }, + [""] = { "select_prev", "fallback" }, + [""] = { "select_next", "fallback" }, + [""] = { "select_next", "snippet_forward", "fallback" }, + [""] = { "select_prev", "snippet_backward", "fallback" }, + cmdline = { + preset = "enter", + [""] = {}, + [""] = {}, + [""] = { "select_prev", "fallback" }, + [""] = { "select_next", "fallback" }, + [""] = { "select_next", "fallback" }, + [""] = { "select_prev", "fallback" }, + }, + }, + completion = { + menu = { border = "rounded" }, + documentation = { window = { border = "rounded" } }, + list = { + selection = function(ctx) + return ctx.mode == "cmdline" and "auto_insert" or "preselect" + end, + }, + }, + sources = { + default = { + "lsp", + "path", + "snippets", + "buffer", + "ripgrep", + }, + providers = { + ripgrep = { + module = "blink-ripgrep", + name = "Ripgrep", + ---@module "blink-ripgrep" + ---@type blink-ripgrep.Options + opts = { + prefix_min_len = 4, + score_offset = 1, -- should be lower priority + max_filesize = "300K", + search_casing = "--smart-case", + }, + }, + }, + cmdline = function() + local type = vim.fn.getcmdtype() + if type == ":" then + return { "path", "cmdline" } + end + if type == "/" or type == "?" then + return { "buffer" } + end + return {} + end, + }, + }, + }, { "hrsh7th/nvim-cmp", + enabled = vim.g.lazyvim_cmp == "nvim-cmp", dependencies = { { "hrsh7th/cmp-path", enabled = false }, "lukas-reineke/cmp-rg", diff --git a/.config/nvim-lazy/lua/plugins/fzf-lua.lua b/.config/nvim-lazy/lua/plugins/fzf-lua.lua new file mode 100644 index 0000000..d64edce --- /dev/null +++ b/.config/nvim-lazy/lua/plugins/fzf-lua.lua @@ -0,0 +1,198 @@ +local rg_cmd = + -- 'rg --files -l ".*" --follow --color=never --sortr=modified -g "!.git/" -g "!*.png" -g "!node_modules/" -g "!*.jpeg" -g "!*.jpg" -g "!*.ico" -g "!*.exe" -g "!*.out"' + { + "rg", + "--files", + "--color", + "never", + "--ignore", + "--hidden", + "--sortr", + "modified", + "--glob", + "!{" .. vim.iter(vim.opt.wildignore:get()):join(",") .. "}", + } + +---@type LazySpec +return { + { + "ibhagwan/fzf-lua", + keys = { + { + "", + function() + LazyVim.pick.open("files", { + find_command = rg_cmd, + }) + end, + desc = "Pick files", + }, + { "fn", LazyVim.pick.config_files(), desc = "Find Config File" }, + { + "fd", + LazyVim.pick("files", { cwd = vim.fn.expand("~/Documents/dotfiles/.config/") }), + desc = "Find Dotfiles", + }, + { + "fN", + LazyVim.pick("files", { + cwd = vim.fn.stdpath("data") .. "/lazy/LazyVim", + find_command = rg_cmd, + }), + desc = "Find Data files", + }, + { + "gB", + function() + require("fzf-lua").git_branches() + end, + desc = "Git Branch", + }, + { + "f/", + function() + require("fzf-lua").lgrep_curbuf({ + prompt = "Bufferâť« ", + }) + end, + desc = "Grep buffer", + }, + + { + "", + function() + require("fzf-lua").complete_bline() + end, + mode = "i", + desc = "Complete bline", + silent = true, + }, + { + "", + function() + require("fzf-lua").complete_line() + end, + mode = "i", + desc = "Complete line", + silent = true, + }, + { + "", + function() + require("fzf-lua").complete_path() + end, + mode = "i", + desc = "Complete path", + silent = true, + }, + }, + opts = { + defaults = { + keymap = { + fzf = { + ["ctrl-d"] = "preview-page-down", + ["ctrl-u"] = "preview-page-up", + }, + }, + }, + files = { + formatter = "path.filename_first", + fzf_opts = { + ["--layout"] = "reverse", + ["--tiebreak"] = "length", + }, + winopts = { + height = 0.55, + width = 0.65, + row = 0.52, + col = 0.47, + preview = { + ---@type 'wrap'|'nowrap' + wrap = "nowrap", + ---@type 'hidden'|'nohidden' + hidden = "hidden", + }, + }, + }, + git = { + files = { + cmd = "git ls-files --exclude-standard --cached --others", -- '--others' is used to show untracked files + -- actions = m_keys, + winopts = { + height = 0.55, + width = 0.65, + row = 0.52, + col = 0.47, + }, + previewer = false, + }, + bcommits = { + -- actions = m_keys, + winopts = { preview = { layout = "vertical", vertical = "up:60%" } }, + }, + commits = { + -- actions = m_keys, + winopts = { preview = { layout = "vertical", vertical = "up:60%" } }, + }, + branches = { + winopts = { preview = { layout = "vertical", vertical = "up:60%" } }, + cmd = "git branch --all --color | sed 's#remotes/origin/##g'", + cmd_add = { "git", "checkout", "-b" }, + }, + }, + buffers = { + ignore_current_buffer = true, + winopts = { preview = { layout = "vertical", vertical = "up:60%" } }, + }, + diagnostics = { + winopts = { preview = { layout = "vertical", vertical = "up:60%" } }, + }, + grep = { + winopts = { preview = { layout = "vertical", vertical = "up:60%" } }, + -- actions = m_keys, + rg_glob = true, + glob_flah = "--glob", + glob_separator = "%s%-%-", + }, + lsp = { + smbols = { + winopts = { preview = { layout = "vertical", vertical = "up:60%" } }, + }, + finder = { + winopts = { preview = { layout = "vertical", vertical = "up:60%" } }, + }, + code_actions = { + winopts = { preview = { layout = "vertical", vertical = "up:60%" } }, + }, + }, + }, + }, + -- { + -- "ibhagwan/fzf-lua", + -- opts = function() + -- local actions = require("fzf-lua.actions") + -- local keys = { + -- ["alt-enter"] = actions.file_tabedit, + -- ["ctrl-t"] = actions.file_tabedit, + -- ["ctrl-x"] = actions.file_split, + -- } + -- return { + -- files = { actions = keys }, + -- buffers = { actions = keys }, + -- grep = { actions = keys }, + -- git = { + -- files = { actions = keys }, + -- status = { actions = keys }, + -- bcommits = { actions = keys }, + -- commits = { actions = keys }, + -- }, + -- lsp = { + -- declarations = { actions = keys }, + -- definitions = { actions = keys }, + -- references = { actions = keys }, + -- symbols = { actions = keys }, + -- }, + -- } + -- end, + -- }, +} diff --git a/.config/nvim-lazy/lua/plugins/lsp/mappings.lua b/.config/nvim-lazy/lua/plugins/lsp/mappings.lua index 3a86df3..b3d3b33 100644 --- a/.config/nvim-lazy/lua/plugins/lsp/mappings.lua +++ b/.config/nvim-lazy/lua/plugins/lsp/mappings.lua @@ -6,7 +6,16 @@ return { -- change a keymap keys[#keys + 1] = { "gl", vim.diagnostic.open_float, desc = "Open diagnostic" } -- disable a keymap - -- keys[#keys + 1] = { "K", false } + keys[#keys + 1] = { "", mode = "i", false } + keys[#keys + 1] = { + "", + function() + return vim.lsp.buf.signature_help() + end, + mode = "i", + desc = "Signature Help", + has = "signatureHelp", + } -- add a keymap -- keys[#keys + 1] = { "H", "echo 'hello'" } end, diff --git a/.config/nvim-lazy/lua/plugins/mini/operators.lua b/.config/nvim-lazy/lua/plugins/mini/operators.lua index f273d10..5a02d1c 100644 --- a/.config/nvim-lazy/lua/plugins/mini/operators.lua +++ b/.config/nvim-lazy/lua/plugins/mini/operators.lua @@ -7,15 +7,16 @@ return { { "g=", mode = { "n", "x" }, desc = "Evalute" }, { "ge", mode = { "n", "x" }, desc = "Exchange" }, { "gm", mode = { "n", "x" }, desc = "Duplicate" }, - { "gy", mode = { "n", "x" }, desc = "Replace with register" }, + { "x", mode = { "n", "x" }, desc = "Replace with register" }, { "gs", mode = { "n", "x" }, desc = "Sort" }, }, opts = { -- Exchange text regions exchange = { prefix = "ge" }, - replace = { prefix = "gy" }, + replace = { prefix = "x" }, }, config = function(_, opts) require("mini.operators").setup(opts) + vim.keymap.set("n", "X", "x$", { desc = "Replace to end of line" }) end, } diff --git a/.config/nvim-lazy/lua/plugins/mini/surround.lua b/.config/nvim-lazy/lua/plugins/mini/surround.lua index 5d80d83..ba25c22 100644 --- a/.config/nvim-lazy/lua/plugins/mini/surround.lua +++ b/.config/nvim-lazy/lua/plugins/mini/surround.lua @@ -11,7 +11,6 @@ return { { "gzh", mode = { "n" }, desc = "Surround highlight" }, }, opts = { - search_method = "cover_or_prev", n_lines = 500, mappings = { add = "ys", -- Add surrounding in Normal and Visual modes diff --git a/.config/nvim-lazy/lua/plugins/neotree.lua b/.config/nvim-lazy/lua/plugins/neotree.lua index 312634d..7fb555f 100644 --- a/.config/nvim-lazy/lua/plugins/neotree.lua +++ b/.config/nvim-lazy/lua/plugins/neotree.lua @@ -2,10 +2,24 @@ local cmd = "trash" if vim.fn.executable("trash-put") == 1 then cmd = "trash-put" end +--- if current buffer is a neotree buffer, toggle it +--- if we're currently not in focused for neotree then focus on the neotree buffer +local function better_toggle_neotree() + local bufnr = vim.api.nvim_get_current_buf() + local bufname = vim.fn.bufname(bufnr) + if bufname ~= "" and string.match(bufname, "neo.tree %w+") ~= nil then + vim.cmd("Neotree toggle") + else + vim.cmd("Neotree reveal focus") + end +end ---@type LazySpec return { "nvim-neo-tree/neo-tree.nvim", + keys = { + { "e", better_toggle_neotree, desc = "[E]xplorer neotree" }, + }, dependencies = { { "antosha417/nvim-lsp-file-operations", diff --git a/.config/nvim-lazy/lua/plugins/telescope.lua b/.config/nvim-lazy/lua/plugins/telescope.lua index 7b87db1..356768f 100644 --- a/.config/nvim-lazy/lua/plugins/telescope.lua +++ b/.config/nvim-lazy/lua/plugins/telescope.lua @@ -14,9 +14,11 @@ end ---@type LazySpec return { "fdschmidt93/telescope-egrepify.nvim", + enabled = vim.g.lazyvim_picker == "telescope", dependencies = { { "nvim-telescope/telescope.nvim", + enabled = vim.g.lazyvim_picker == "telescope", opts = { defaults = { sorting_strategy = "ascending", diff --git a/.config/nvim/lua/plugins/config/fzf.lua b/.config/nvim/lua/plugins/config/fzf.lua index 60207bf..a150dcb 100644 --- a/.config/nvim/lua/plugins/config/fzf.lua +++ b/.config/nvim/lua/plugins/config/fzf.lua @@ -11,8 +11,9 @@ local rg_cmd = local m_keys = { ['alt-enter'] = actions.file_tabedit, + ['ctrl-t'] = actions.file_tabedit, ['ctrl-x'] = actions.file_split, - ['ctrl-q'] = actions.file_edit_or_qf, + -- ['ctrl-q'] = actions.file_edit_or_qf, } -- calling `setup` is optional for customization fzf.setup({ @@ -176,43 +177,6 @@ if not ok_dressing then fzf.register_ui_select() end --- vim.lsp.handlers['textDocument/codeAction'] = fzf.lsp_code_actions --- vim.lsp.handlers['textDocument/references'] = function() --- fzf.lsp_references({ --- jump_to_single_result = true, --- winopts = { preview = { layout = 'vertical', vertical = 'up:60%' } }, --- }) --- end --- --- vim.lsp.handlers['textDocument/definition'] = function() --- fzf.lsp_definitions({ --- jump_to_single_result = true, --- winopts = { preview = { layout = 'vertical', vertical = 'up:60%' } }, --- }) --- end --- vim.lsp.handlers['textDocument/declaration'] = function() --- fzf.lsp_declarations({ --- jump_to_single_result = true, --- winopts = { preview = { layout = 'vertical', vertical = 'up:60%' } }, --- }) --- end --- vim.lsp.handlers['textDocument/typeDefinition'] = fzf.lsp_typedefs --- vim.lsp.handlers['textDocument/implementation'] = fzf.lsp_implementations --- --- vim.lsp.handlers['textDocument/documentSymbol'] = fzf.lsp_document_symbols --- vim.lsp.handlers['workspace/symbol'] = fzf.lsp_workspace_symbols --- --- vim.lsp.handlers['callHierarchy/incomingCalls'] = function() --- fzf.lsp_incoming_calls({ --- winopts = { preview = { layout = 'vertical', vertical = 'up:60%' } }, --- }) --- end --- vim.lsp.handlers['callHierarchy/outgoingCalls'] = function() --- fzf.lsp_outgoing_calls({ --- winopts = { preview = { layout = 'vertical', vertical = 'up:60%' } }, --- }) --- end - local function fzf_create_file() local fzf = require 'fzf-lua' local path = require 'fzf-lua.path' diff --git a/.config/nvim/lua/plugins/mini/operators.lua b/.config/nvim/lua/plugins/mini/operators.lua index f018851..0b5612a 100644 --- a/.config/nvim/lua/plugins/mini/operators.lua +++ b/.config/nvim/lua/plugins/mini/operators.lua @@ -7,15 +7,16 @@ return { { 'g=', mode = { 'n', 'x' }, desc = 'Evalute' }, { 'ge', mode = { 'n', 'x' }, desc = 'Exchange' }, { 'gm', mode = { 'n', 'x' }, desc = 'Duplicate' }, - { 'gy', mode = { 'n', 'x' }, desc = 'Replace with register' }, + { 'x', mode = { 'n', 'x' }, desc = 'Replace with register' }, { 'gs', mode = { 'n', 'x' }, desc = 'Sort' }, }, opts = { -- Exchange text regions exchange = { prefix = 'ge' }, - replace = { prefix = 'gy' }, + replace = { prefix = 'x' }, }, config = function(_, opts) require('mini.operators').setup(opts) + vim.keymap.set('n', 'X', 'x$', { desc = 'Replace to end of line' }) end, } diff --git a/.ignore b/.ignore new file mode 100644 index 0000000..9a0b94d --- /dev/null +++ b/.ignore @@ -0,0 +1,58 @@ +.config/tmux/plugins +.config/nvim/plugin/packer_compiled.* +.config/nvim/snippets/ +.config/nvim/spell/ +.config/nvim/tmp_dirs/ +.local/share/nvim/* +.config/vifm/colors/* +.config/vifm/vifm-help.txt +.config/vifm/vifm-v0.10.1-builtin-normal.pdf +.config/vifm/vifminfo.json +homefiles/zlua +npm +.config/mpv/watch_later/* +.config/qutebrowser/qsettings/QtProject.conf +.local/share/qutebrowser/adblock-cache.dat +.local/share/qutebrowser/blocked-hosts +.local/share/qutebrowser/cmd-history +.local/share/qutebrowser/cookies +.local/share/qutebrowser/greasemonkey/ +.local/share/qutebrowser/history.sqlite* +.local/share/qutebrowser/qtwebengine_dictionaries/ +.local/share/qutebrowser/sessions/ +.local/share/qutebrowser/state +.local/share/qutebrowser/webengine/ +.config/zsh/.zcompdump* +.config/zsh/.zhistory +.config/zsh/plugins/* +.config/emacs*/auto-save-list/* +.config/emacs*/.local +.config/emacs*/*~ +.config/emacs*/elpa +.config/emacs*/etc +.config/emacs*/var +.ccls-cache/ + +.config/vifm/vifminfo.json_66761 +.venv/ +.config/qtile/__pycache__ +.config/qtile/.venv +.config/suckless/my-st/tmux-client-29128.log +.config/nvim-vscode/plugin +.config/qtile/qtile_extras +.config/xmonad/.stack-work +.config/xmonad/dbus-git +.config/xmonad/xmonad-contrib-git +.config/xmonad/xmonad-git +.config/vifm/colors +.config/zsh-omz/ohmyzsh +.config/zsh-omz/.p10k.zsh +.config/zsh-omz/.zcomp* +.config/zsh-omz/.zsh_history +.config/wezterm/wezterm_state_default.json +.config/qtile/modules/__pycache__ +.local/bin/myscripts/sorting_filev3 +.local/bin/myscripts/sort_files + +.config/nvim-lazy/lazyvim.json +.config/nvim-lazy/lazy-lock.json