mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
Merge branch 'main' into add-solidity-support
This commit is contained in:
commit
4e7236bc4f
127 changed files with 4481 additions and 1774 deletions
2
.github/.release-please-manifest.json
vendored
2
.github/.release-please-manifest.json
vendored
|
|
@ -1,3 +1,3 @@
|
||||||
{
|
{
|
||||||
".": "13.0.0"
|
".": "15.7.1"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
765
CHANGELOG.md
765
CHANGELOG.md
|
|
@ -1,5 +1,770 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [15.7.1](https://github.com/LazyVim/LazyVim/compare/v15.7.0...v15.7.1) (2025-10-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **sidekick:** better keymaps ([188b288](https://github.com/LazyVim/LazyVim/commit/188b2886147acb4d9e2a5c8ae7b73770fd66a92c))
|
||||||
|
|
||||||
|
## [15.7.0](https://github.com/LazyVim/LazyVim/compare/v15.6.0...v15.7.0) (2025-10-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **sidekick:** updated keymaps for sidekick ([2942bd4](https://github.com/LazyVim/LazyVim/commit/2942bd4a0d738d693af51354e96aa7be5407d105))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **copilot-native:** schedule inline_completion.enable ([23b1da1](https://github.com/LazyVim/LazyVim/commit/23b1da170f6367fafe0be47b9c141770ed75a78e))
|
||||||
|
* **sidekick:** better keymaps ([aabc03f](https://github.com/LazyVim/LazyVim/commit/aabc03f88d30b0424926d9d894adc5c91eb84ec2))
|
||||||
|
* **stylua:** stylua is now also an LSP. Disable it since we use the CLI tool. ([2f76d57](https://github.com/LazyVim/LazyVim/commit/2f76d572a2b172e5e7e236d3e972443242c36b66))
|
||||||
|
|
||||||
|
## [15.6.0](https://github.com/LazyVim/LazyVim/compare/v15.5.0...v15.6.0) (2025-09-30)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **sidekick:** added keymaps to work with AI cli tools ([5d18a46](https://github.com/LazyVim/LazyVim/commit/5d18a46b6a7bb5b946a6c87b9a45a2738c9ec9c3))
|
||||||
|
* **sidekick:** fancier lualine component ([b889978](https://github.com/LazyVim/LazyVim/commit/b8899781516da71ba0f63afa93fb4a6b25dff144))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **config:** clipboard:get() ([22851dc](https://github.com/LazyVim/LazyVim/commit/22851dce979c4cac379c6795ca7885c83c1c7eaf))
|
||||||
|
* **copilot-native:** change Copilot-native's `<M-[>` description to "Prev Suggestion" ([#6553](https://github.com/LazyVim/LazyVim/issues/6553)) ([089d0a5](https://github.com/LazyVim/LazyVim/commit/089d0a5ac1ab85238804e017ac1ef0dc0a8341f0))
|
||||||
|
* **sidekick:** changed keymap to open new tool ([3d3739b](https://github.com/LazyVim/LazyVim/commit/3d3739b4b8943b5e7143d37f60bb0adbb6cf82f3))
|
||||||
|
|
||||||
|
## [15.5.0](https://github.com/LazyVim/LazyVim/compare/v15.4.0...v15.5.0) (2025-09-27)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **ai.copilot-native:** let sidekick.nvim handle some things if available ([b25ea9c](https://github.com/LazyVim/LazyVim/commit/b25ea9c153e76d11579731e1d5529f275a36f91d))
|
||||||
|
* **ai:** added completion hooks for next edit suggestions ([30a325d](https://github.com/LazyVim/LazyVim/commit/30a325d67184a80006dc55352d9663cdf01082d5))
|
||||||
|
* **extras:** added extra for `sidekick.nvim` (Copilot LSP integration) ([dbfe209](https://github.com/LazyVim/LazyVim/commit/dbfe20996ce62d6b0048245ab4e304610548da04))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **ai.copilot:** disable copilot lsp if installed. copilot.lua needs its own version of the LSP ([e9bc607](https://github.com/LazyVim/LazyVim/commit/e9bc6074d1ea69e921a6195d1dc34333eaa310f8))
|
||||||
|
|
||||||
|
## [15.4.0](https://github.com/LazyVim/LazyVim/compare/v15.3.0...v15.4.0) (2025-09-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **copilot-native:** added experimental support for next edit suggestions. check the docs to enable ([c83df9e](https://github.com/LazyVim/LazyVim/commit/c83df9e68dd41f5a3f7df5a7048169ee286a7da8))
|
||||||
|
* **copilot-native:** added keymaps to cycle suggestions ([6bd630c](https://github.com/LazyVim/LazyVim/commit/6bd630cec6f905665691d593dc5d0fb3d54f560c))
|
||||||
|
* **copilot-native:** better lualine status ([9913e16](https://github.com/LazyVim/LazyVim/commit/9913e1665d783d9c4407633bc33475d403aff433))
|
||||||
|
* **copilot-native:** removed experimental **nes** support with `copilot_lsp` for now, since it's not the best experience right now ([ed637bb](https://github.com/LazyVim/LazyVim/commit/ed637bb0f7f418de069a4d5a7ed8a7b3b93eb425))
|
||||||
|
* **copilot:** added `copilot-native` extra to setup native inline completions in Neovim ([3b02963](https://github.com/LazyVim/LazyVim/commit/3b0296358508da1eb258c8716df163dd04fa6449))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **catppuccin:** follow-up on api change ([#6505](https://github.com/LazyVim/LazyVim/issues/6505)) ([af6e250](https://github.com/LazyVim/LazyVim/commit/af6e2505b54270c30145e8f4191b865870537287))
|
||||||
|
* **treesitter:** create buffer-local textobjects keymaps only when available. Closes [#6508](https://github.com/LazyVim/LazyVim/issues/6508) ([5985ca0](https://github.com/LazyVim/LazyVim/commit/5985ca0cf1a0c1ddee8b2b718c730f988cec7001))
|
||||||
|
|
||||||
|
## [15.3.0](https://github.com/LazyVim/LazyVim/compare/v15.2.0...v15.3.0) (2025-09-23)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **copilot:** use `blink-copilot` as blink.cmp copilot source ([#5551](https://github.com/LazyVim/LazyVim/issues/5551)) ([13069f2](https://github.com/LazyVim/LazyVim/commit/13069f20183655d8a02f3acbd21d0ac4c9ce811c))
|
||||||
|
* **treesitter:** show an error if the user tries to set a custom treesitter compiler ([89ff1fd](https://github.com/LazyVim/LazyVim/commit/89ff1fd600bb6ff4cf2c9edbc2217a40ecb8d160))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **jdtls:** allow mason jdtls installation ([#6498](https://github.com/LazyVim/LazyVim/issues/6498)) ([80990ec](https://github.com/LazyVim/LazyVim/commit/80990ec62fd36fc4b6b921a9041f55858e33e030))
|
||||||
|
* **jdtls:** bundle configuration bug fix ([#6499](https://github.com/LazyVim/LazyVim/issues/6499)) ([c423765](https://github.com/LazyVim/LazyVim/commit/c4237659621e406089f4d13d32192954d52c4924))
|
||||||
|
* **keymaps:** enable snacks git keybindings ([#6323](https://github.com/LazyVim/LazyVim/issues/6323)) ([720e06a](https://github.com/LazyVim/LazyVim/commit/720e06a908cbf6e3afb4eccc049d58df9ace770a))
|
||||||
|
* **lsp:** fix mason install/exclude. Closes [#6504](https://github.com/LazyVim/LazyVim/issues/6504) ([37b1ec4](https://github.com/LazyVim/LazyVim/commit/37b1ec41ae57e8396d5c923a4bfdf7050215b4d6))
|
||||||
|
* **lsp:** fixup for when not using mason ([a90b565](https://github.com/LazyVim/LazyVim/commit/a90b56518f4f2291985952d79472d4f935c0bad0))
|
||||||
|
* **luasnip:** add missing optional tag to garymjr/nvim-snippets ([#5733](https://github.com/LazyVim/LazyVim/issues/5733)) ([37a1c1a](https://github.com/LazyVim/LazyVim/commit/37a1c1af5dbbcf069bb94a71b4dda3626fbda77a))
|
||||||
|
* **vtsls:** fix and move denols/vtsls disambigutaion to typescript extra. Fixes [#6476](https://github.com/LazyVim/LazyVim/issues/6476) ([775621a](https://github.com/LazyVim/LazyVim/commit/775621ac0af42486ef1cd4254d1a6625a190040b))
|
||||||
|
|
||||||
|
## [15.2.0](https://github.com/LazyVim/LazyVim/compare/v15.1.1...v15.2.0) (2025-09-20)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **clojure:** use 'nvim-paredit' instead 'nvim-treesitter-sexp' as clojure S-exp Plugin ([#5876](https://github.com/LazyVim/LazyVim/issues/5876)) ([2659028](https://github.com/LazyVim/LazyVim/commit/26590285ead7a89bb45f309714f7f40136c89267))
|
||||||
|
* **core:** relax hard requirement for `vim.lsp.is_enabled`. Show warning instead ([3ca7b47](https://github.com/LazyVim/LazyVim/commit/3ca7b47365c85a07047e48cad450feff66c8bdd6))
|
||||||
|
* **options:** don't overwrite indentexpr/foldexpr/foldmethod when set by plugins. Fixes [#6464](https://github.com/LazyVim/LazyVim/issues/6464) ([ccbaf55](https://github.com/LazyVim/LazyVim/commit/ccbaf55c2f8bc691f8f64fe40ce00a1abda4fbac))
|
||||||
|
* **yanky:** use snacks picker for improved yank history navigation ([#5802](https://github.com/LazyVim/LazyVim/issues/5802)) ([55e762a](https://github.com/LazyVim/LazyVim/commit/55e762a8888cd5f336e4e2d4b2cc6b8b1b950663))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **editor:** calculate the height passed to the prompt of fzf-lua properly ([#6481](https://github.com/LazyVim/LazyVim/issues/6481)) ([65e38d3](https://github.com/LazyVim/LazyVim/commit/65e38d3b34cab653a05318c1a9014df3c89fdb53))
|
||||||
|
* **lang.clojure:** correct cmp-conjure source name ([#6208](https://github.com/LazyVim/LazyVim/issues/6208)) ([55b5c1f](https://github.com/LazyVim/LazyVim/commit/55b5c1fecb0b7e71c5eb40555b17d1e4820690f0))
|
||||||
|
* **options:** set_default option ([2401d5f](https://github.com/LazyVim/LazyVim/commit/2401d5fca6f2a2fcaca4f9c4c84c4b713c602352))
|
||||||
|
* **options:** track some initial options right after loading `options.lua`. See [#6463](https://github.com/LazyVim/LazyVim/issues/6463) ([9c611b0](https://github.com/LazyVim/LazyVim/commit/9c611b0c5758d0d659e7fdb29119b7083a56f989))
|
||||||
|
* **treesitter:** check if queries for indent/fold exists before enabling it. Fixes [#6474](https://github.com/LazyVim/LazyVim/issues/6474) ([5ce7cd6](https://github.com/LazyVim/LazyVim/commit/5ce7cd650a5fffc257e0312b82fffd26abe2a1fa))
|
||||||
|
|
||||||
|
## [15.1.1](https://github.com/LazyVim/LazyVim/compare/v15.1.0...v15.1.1) (2025-09-18)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **core:** check for outdated nightly. See [#6458](https://github.com/LazyVim/LazyVim/issues/6458) ([cfac3c9](https://github.com/LazyVim/LazyVim/commit/cfac3c9a85526ad7406f9b246097a1ec4fa1a2c3))
|
||||||
|
* **lspconfig:** remove all usage of `lspconfig` ([36b4191](https://github.com/LazyVim/LazyVim/commit/36b41911ab90fe19505af306a31a5a699342d3c3))
|
||||||
|
* **lsp:** schedule_wrap setting up LSPs to work around root cause of [#6456](https://github.com/LazyVim/LazyVim/issues/6456). Fixes [#6456](https://github.com/LazyVim/LazyVim/issues/6456) ([75a3809](https://github.com/LazyVim/LazyVim/commit/75a3809e15a0ecff9adc46c6cd3aaac51d99b561))
|
||||||
|
|
||||||
|
## [15.1.0](https://github.com/LazyVim/LazyVim/compare/v15.0.3...v15.1.0) (2025-09-18)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **treesitter:** automatically install and use mason's tree-sitter-cli if not installed on system ([725d048](https://github.com/LazyVim/LazyVim/commit/725d048e009b866425b2a0cc620ba2c413e8b65f))
|
||||||
|
* **treesitter:** refactored setting up treesitter indent/highlight/folds ([b93303d](https://github.com/LazyVim/LazyVim/commit/b93303d2339b1117171780cebed1d710fd3805d5))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **snacks:** safe wrapper around snacks statuscolumn to prevent errors when LazyVim is still installing ([5bf2378](https://github.com/LazyVim/LazyVim/commit/5bf237820d7938b1b6490164fbd75e4117d341c1))
|
||||||
|
|
||||||
|
## [15.0.3](https://github.com/LazyVim/LazyVim/compare/v15.0.2...v15.0.3) (2025-09-17)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **treesitter:** properly update installedd languages after setup ([c28f599](https://github.com/LazyVim/LazyVim/commit/c28f599d4f5d175f3d259a621c4e7b5d0b2a0759))
|
||||||
|
|
||||||
|
## [15.0.2](https://github.com/LazyVim/LazyVim/compare/v15.0.1...v15.0.2) (2025-09-17)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **python:** remove the wrapping `settings` key from `setup()` options ([#6069](https://github.com/LazyVim/LazyVim/issues/6069)) ([ed3aa74](https://github.com/LazyVim/LazyVim/commit/ed3aa74c107de7dc3e06367ce4afb20056710441))
|
||||||
|
* **treesitter:** indentexpr/foldexpr now work as intended and override ftplugin settings. Fixes [#6447](https://github.com/LazyVim/LazyVim/issues/6447) ([a6b38de](https://github.com/LazyVim/LazyVim/commit/a6b38de763addf2d22e8a43a1e679cc855dc376d))
|
||||||
|
|
||||||
|
## [15.0.1](https://github.com/LazyVim/LazyVim/compare/v15.0.0...v15.0.1) (2025-09-17)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **treesitter:** TS update during inital build ([2d56d3b](https://github.com/LazyVim/LazyVim/commit/2d56d3b37c275890a403845c00b5c8d38cb387e6))
|
||||||
|
|
||||||
|
## [15.0.0](https://github.com/LazyVim/LazyVim/compare/v14.15.1...v15.0.0) (2025-09-17)
|
||||||
|
|
||||||
|
|
||||||
|
### ⚠ BREAKING CHANGES
|
||||||
|
|
||||||
|
* **treesitter:** migrate to `nvim-treesitter` **main** branch
|
||||||
|
* bump Neovim requirement to 0.11.2
|
||||||
|
* LazyVim now requires Neovim >= 0.11 See #6421 for more info
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **blink:** enable blink cmdline completions ([011a35c](https://github.com/LazyVim/LazyVim/commit/011a35ccb810cbe5d25def9cc92271e8423feb74))
|
||||||
|
* **blink:** enable cmdline completions ([ff7c12c](https://github.com/LazyVim/LazyVim/commit/ff7c12c48e23941ffd9a7bbe61857624929ae9da))
|
||||||
|
* bump Neovim requirement to 0.11.2 ([cccfe70](https://github.com/LazyVim/LazyVim/commit/cccfe70ea4390c1915f67ab7d2893971fba3f3fa))
|
||||||
|
* **extras:** added an experimental extra for the treesitter `main` branch ([5668ad7](https://github.com/LazyVim/LazyVim/commit/5668ad72ca806b3a7915bb7b35dcc5cccfe774f7))
|
||||||
|
* LazyVim now requires Neovim >= 0.11 See [#6421](https://github.com/LazyVim/LazyVim/issues/6421) for more info ([e7ce65e](https://github.com/LazyVim/LazyVim/commit/e7ce65e1bb814f79ecb45bfeca934e997e0ee42c))
|
||||||
|
* **lsp:** enable LSP folds when available ([5e2c4e6](https://github.com/LazyVim/LazyVim/commit/5e2c4e62f28a85e0b27d5c97ea92af8c1ab74cef))
|
||||||
|
* **treesitter:** migrate to `nvim-treesitter` **main** branch ([5eac460](https://github.com/LazyVim/LazyVim/commit/5eac460c092103e5516bec345236853b9f35ec7c))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **blink:** make blink completions in cmdline behave more like regular cmdline ([f54fd7f](https://github.com/LazyVim/LazyVim/commit/f54fd7f751e902e824c3a4c9d212a0d18387d0b6))
|
||||||
|
* **catppuccin:** follow renamed integration ([#6354](https://github.com/LazyVim/LazyVim/issues/6354)) ([02d0c9a](https://github.com/LazyVim/LazyVim/commit/02d0c9aebddb902d9c974a38bb44db9bae4eac6d))
|
||||||
|
* **clangd:** file detection improvements ([#6436](https://github.com/LazyVim/LazyVim/issues/6436)) ([aab503f](https://github.com/LazyVim/LazyVim/commit/aab503fda63f34cff6bce229f73ea5209e8afaf0))
|
||||||
|
* **clangd:** rewrite the root_dir function ([#6060](https://github.com/LazyVim/LazyVim/issues/6060)) ([167d39b](https://github.com/LazyVim/LazyVim/commit/167d39b2bef24024be1a48267e14cc6c82146462))
|
||||||
|
* **eslint:** remove old 0.10 code ([919c9e5](https://github.com/LazyVim/LazyVim/commit/919c9e5d091f11b2892c56825249fc4a495d3e8f))
|
||||||
|
* **extras:** disable blink path source in CopilotChat ([#5666](https://github.com/LazyVim/LazyVim/issues/5666)) ([#5754](https://github.com/LazyVim/LazyVim/issues/5754)) ([3aa2916](https://github.com/LazyVim/LazyVim/commit/3aa2916569df2664cb68e1c7c38882868f36f8d0))
|
||||||
|
* **gitsigns:** use silent for gitsigns keymaps ([#5841](https://github.com/LazyVim/LazyVim/issues/5841)) ([6eed178](https://github.com/LazyVim/LazyVim/commit/6eed1781c185ea6d1f313aee60a7097448f473cb))
|
||||||
|
* **grug-far:** add support for GrugFarWithin so it gets loaded by default ([#5772](https://github.com/LazyVim/LazyVim/issues/5772)) ([fd1b02a](https://github.com/LazyVim/LazyVim/commit/fd1b02ae5740dc651cc43291391084dbe7b1b3c4))
|
||||||
|
* **harpoon:** keymaps for 1-9. Fixes [#6319](https://github.com/LazyVim/LazyVim/issues/6319) ([e2ba6bb](https://github.com/LazyVim/LazyVim/commit/e2ba6bb51107cbd076b53b49ed7be99fc2fa3991))
|
||||||
|
* **jdtls:** root_dir ([271fecb](https://github.com/LazyVim/LazyVim/commit/271fecb067ec223a8eab90c1abd1162e9ebae5df))
|
||||||
|
* **jdtls:** root_dir ([#6429](https://github.com/LazyVim/LazyVim/issues/6429)) ([c053921](https://github.com/LazyVim/LazyVim/commit/c05392186e9e540d4af169922c333b5baa583cbe))
|
||||||
|
* **lang.haskell:** prevent Haskell extras from installing telescope.nvim ([#6419](https://github.com/LazyVim/LazyVim/issues/6419)) ([cc4a3e5](https://github.com/LazyVim/LazyVim/commit/cc4a3e556424dba784b41ec3bd92eeb7b62746bc))
|
||||||
|
* **lsp:** buffer should be second arg for supports_method ([44ade7f](https://github.com/LazyVim/LazyVim/commit/44ade7fdea98a0356c64ff9edaf2534547b958bc))
|
||||||
|
* **lspconfig:** remove all references to lspconfig. Closes [#6426](https://github.com/LazyVim/LazyVim/issues/6426) ([23b9cde](https://github.com/LazyVim/LazyVim/commit/23b9cdeb3471b655532e9884fa2dd36ee83062d5))
|
||||||
|
* **lsp:** properly ambiguate denols vs vtsls ([2f75d9a](https://github.com/LazyVim/LazyVim/commit/2f75d9a90fc9cf43f7ba2365dbb745e5595fc02e))
|
||||||
|
* **lsp:** properly register capabilities with new vim.lsp.config. Not needed for blink ([9fa832d](https://github.com/LazyVim/LazyVim/commit/9fa832dc95cb77a5551bbeff12b4520d8b7bdc2a))
|
||||||
|
* **mason:** migrate to mason v2 ([#6053](https://github.com/LazyVim/LazyVim/issues/6053)) ([773f28b](https://github.com/LazyVim/LazyVim/commit/773f28b4912d5505a21da9686d56ab7cf41a9be7))
|
||||||
|
* **mini:** update mini plugin references from echasnovski to nvim-mini ([#6374](https://github.com/LazyVim/LazyVim/issues/6374)) ([ae3aaf2](https://github.com/LazyVim/LazyVim/commit/ae3aaf2dd3a04eb5dbc5b1e34843558c85e45ac2))
|
||||||
|
* **neo-tree:** import neo-tree Extra before edgy Extra ([#5763](https://github.com/LazyVim/LazyVim/issues/5763)) ([848dd31](https://github.com/LazyVim/LazyVim/commit/848dd3132af50f6d211d0c07166ea7c1a4259088))
|
||||||
|
* **ocaml:** use `root_dir` instead of `root_markers` for globs support ([#6428](https://github.com/LazyVim/LazyVim/issues/6428)) ([44cc063](https://github.com/LazyVim/LazyVim/commit/44cc0635bc3d2ccc55eb76bc7668092befcf0536))
|
||||||
|
* **refactoring:** update funcs to return, add `expr=true`, operator mode ([#5882](https://github.com/LazyVim/LazyVim/issues/5882)) ([6e1de74](https://github.com/LazyVim/LazyVim/commit/6e1de74597fa07ea805920da370f9d998740bc5e))
|
||||||
|
* remove 0.9 compat ([3516ae7](https://github.com/LazyVim/LazyVim/commit/3516ae736a333185f6f17b70af20b088d04cbbb6))
|
||||||
|
* **schemastore:** use `before_init` instead of `on_new_config` to load schema store ([#6427](https://github.com/LazyVim/LazyVim/issues/6427)) ([14d2a9b](https://github.com/LazyVim/LazyVim/commit/14d2a9baa1306bd0969112fcf8f69a11840cc5e6))
|
||||||
|
* **treesitter-main:** move exe check to config ([96316e5](https://github.com/LazyVim/LazyVim/commit/96316e5a69b4cc45311f5b7225e7d7bea1f977ee))
|
||||||
|
* **treesitter-main:** set vim.bo.indentexpr in FileType autocmd ([#6430](https://github.com/LazyVim/LazyVim/issues/6430)) ([b926e7d](https://github.com/LazyVim/LazyVim/commit/b926e7db417bc7b0e80feb778bed7924ffe8e85d))
|
||||||
|
* **vue:** `volar` -> `vua_ls`. Fixes [#6236](https://github.com/LazyVim/LazyVim/issues/6236). Closes [#6238](https://github.com/LazyVim/LazyVim/issues/6238). Closes [#6174](https://github.com/LazyVim/LazyVim/issues/6174) ([4a3b4a8](https://github.com/LazyVim/LazyVim/commit/4a3b4a80a89fe5a52d30fbe4afe85c152878ab1b))
|
||||||
|
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* **blink:** only enable lazydev in lua files ([4961b3d](https://github.com/LazyVim/LazyVim/commit/4961b3d4d4b2999816e978c3ea4ef7c320e4206d))
|
||||||
|
* **treesitter-main:** only enable highlighting for installed treesitter langs ([2f309fc](https://github.com/LazyVim/LazyVim/commit/2f309fc8b5bf93af25293c1e4688d409de718a36))
|
||||||
|
|
||||||
|
## [14.15.1](https://github.com/LazyVim/LazyVim/compare/v14.15.0...v14.15.1) (2025-09-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **blink:** use .get method to access presets ([#6183](https://github.com/LazyVim/LazyVim/issues/6183)) ([1a729e2](https://github.com/LazyVim/LazyVim/commit/1a729e2d4c4162501fe13224d669a654849deb36))
|
||||||
|
* **extras.ai.copilot:** update status retrieval for lualine ([#5900](https://github.com/LazyVim/LazyVim/issues/5900)) ([55e9944](https://github.com/LazyVim/LazyVim/commit/55e9944e2b1e152b5acdc9cc015978a905fc2966))
|
||||||
|
* **lang.python:** enable venv-selector even when telescope is not available ([#5829](https://github.com/LazyVim/LazyVim/issues/5829)) ([10e5bf5](https://github.com/LazyVim/LazyVim/commit/10e5bf5c5b5fb4da0afbb2d4d2b75595502c9690))
|
||||||
|
* **lsp:** fixed deprecated warnings ([bed725a](https://github.com/LazyVim/LazyVim/commit/bed725a054ed3e8c8c56dce7e2100335e567cf01))
|
||||||
|
|
||||||
|
## [14.15.0](https://github.com/LazyVim/LazyVim/compare/v14.14.0...v14.15.0) (2025-05-12)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **chezmoi:** enhance fzf-lua chezmoi picker and add snacks.dasbhoard entry ([#5275](https://github.com/LazyVim/LazyVim/issues/5275)) ([759a19e](https://github.com/LazyVim/LazyVim/commit/759a19e785735eb8513b4f8d4483ec5ab1b75307))
|
||||||
|
* **keymaps:** show lang when opening treesitter inspect ([9c59668](https://github.com/LazyVim/LazyVim/commit/9c596681f684c549e69652a5c77a68bd5ecc93e3))
|
||||||
|
* **octo:** add support for snacks picker ([#5625](https://github.com/LazyVim/LazyVim/issues/5625)) ([16a7724](https://github.com/LazyVim/LazyVim/commit/16a772452a515790c3304b358dd66a618fda3260))
|
||||||
|
* **snippets:** mini.snippets standalone and blink.resubscribe ([#5507](https://github.com/LazyVim/LazyVim/issues/5507)) ([f2f2aea](https://github.com/LazyVim/LazyVim/commit/f2f2aea6722b530281b476c08ec60f2d320f1c3d))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **blink:** make sure to use `LazyVim.config.icons.kinds` ([#5668](https://github.com/LazyVim/LazyVim/issues/5668)) ([771089f](https://github.com/LazyVim/LazyVim/commit/771089f6928512ab0f431e9db04e7dc802a5e1a5))
|
||||||
|
* **blink:** remove unnecessary `sources` from `cmdline` ([#5620](https://github.com/LazyVim/LazyVim/issues/5620)) ([5b94baa](https://github.com/LazyVim/LazyVim/commit/5b94baa1d2e7d8ec7e9a9cab82fabd8c3655d369))
|
||||||
|
* **copilot-chat:** switch from deprecated picker integrations ([#5707](https://github.com/LazyVim/LazyVim/issues/5707)) ([b0334fd](https://github.com/LazyVim/LazyVim/commit/b0334fd57cdb920e03afab3c1940114ad43e4fbe))
|
||||||
|
* **mason:** rename and pin to v1 ([c20c402](https://github.com/LazyVim/LazyVim/commit/c20c4022958780617424a090eee2360d560eb939))
|
||||||
|
* **snacks.picker:** remove redundant leader-gc keymap. Closes [#5646](https://github.com/LazyVim/LazyVim/issues/5646) ([606b964](https://github.com/LazyVim/LazyVim/commit/606b96466eeb39b1c1bb576c9b99041b64705f43))
|
||||||
|
|
||||||
|
## [14.14.0](https://github.com/LazyVim/LazyVim/compare/v14.13.0...v14.14.0) (2025-02-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **extras:** setup neogen and mini.snippets integration ([#5594](https://github.com/LazyVim/LazyVim/issues/5594)) ([5788b9d](https://github.com/LazyVim/LazyVim/commit/5788b9d1e06dfb5f99f92354dc550c9f2c5a6710))
|
||||||
|
* **keymaps:** enable toggling in quickfix list and location list ([#5608](https://github.com/LazyVim/LazyVim/issues/5608)) ([32e575a](https://github.com/LazyVim/LazyVim/commit/32e575aa75792c63f710f0bdc3e2fb5aa8ea75ad))
|
||||||
|
* **snacks.picker:** added support for Project shortcuts in other dashboards ([#5607](https://github.com/LazyVim/LazyVim/issues/5607)) ([401ef48](https://github.com/LazyVim/LazyVim/commit/401ef48fcd617534b017ef471309bb1bd6465131))
|
||||||
|
* **snacks.picker:** move trouble keymap from `ctrl+t` -> `alt+t` ([4aff006](https://github.com/LazyVim/LazyVim/commit/4aff0063a42bbc499cfa03feb6e58d4339c0950d))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **blink:** `blink` released new version, remove previous hack ([#5616](https://github.com/LazyVim/LazyVim/issues/5616)) ([b35015a](https://github.com/LazyVim/LazyVim/commit/b35015ac59f0c630b2efe18ccf10d693397d0ca4))
|
||||||
|
* **blink:** `cmdline` is now top-level on main branch ([#5615](https://github.com/LazyVim/LazyVim/issues/5615)) ([0458e46](https://github.com/LazyVim/LazyVim/commit/0458e46dcca49cc404062e04a9054a8bd058dcd3))
|
||||||
|
* **blink:** enable Neovim native mapping with `<Tab>` ([#5617](https://github.com/LazyVim/LazyVim/issues/5617)) ([e7f8e4f](https://github.com/LazyVim/LazyVim/commit/e7f8e4faba0c6d397526238923f1aeff1740d09c))
|
||||||
|
|
||||||
|
## [14.13.0](https://github.com/LazyVim/LazyVim/compare/v14.12.0...v14.13.0) (2025-02-12)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **editor:** update parameter for fzf-lua ([#5584](https://github.com/LazyVim/LazyVim/issues/5584)) ([0a5965b](https://github.com/LazyVim/LazyVim/commit/0a5965b787e4d513b5a2e1182b35bd11ceafeeb3))
|
||||||
|
* **lsp:** use lsp_config picker instead of `LspInfo` ([7529773](https://github.com/LazyVim/LazyVim/commit/75297733710951e81b505d88b2d728a5b0a9b6ab))
|
||||||
|
|
||||||
|
## [14.12.0](https://github.com/LazyVim/LazyVim/compare/v14.11.0...v14.12.0) (2025-02-10)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **config:** add option to disable the order check to warning message ([da3b515](https://github.com/LazyVim/LazyVim/commit/da3b5159df326bc31d5a0ebdfa2c5cbbd32df9d2))
|
||||||
|
* **config:** allow disabling the order check with `vim.g.lazyvim_check_order = false` ([0bbce17](https://github.com/LazyVim/LazyVim/commit/0bbce1775b7d6750d3c4d761f3ad1bcfb77fb805))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **copilot-chat:** added support for snacks picker. Closes [#5432](https://github.com/LazyVim/LazyVim/issues/5432). Closes [#5552](https://github.com/LazyVim/LazyVim/issues/5552) ([2a608f0](https://github.com/LazyVim/LazyVim/commit/2a608f00d47bb6679a27a313fb0404e4d3a2196c))
|
||||||
|
* **extras:** disable import handling when loading `:LazyExtras` + changed some recommendations ([121a2e2](https://github.com/LazyVim/LazyVim/commit/121a2e27ef0f4d8ab64bf76768b9600c45fd2364))
|
||||||
|
|
||||||
|
## [14.11.0](https://github.com/LazyVim/LazyVim/compare/v14.10.0...v14.11.0) (2025-02-08)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **config:** show a warning when lazy.nvim imports order is incorrect ([83988ea](https://github.com/LazyVim/LazyVim/commit/83988ea46eccbe20953cd807984d2e89d679aa6e))
|
||||||
|
* **defaults:** new installs now default to snacks picker/explorer. Existing installs don't change. ([25d90b5](https://github.com/LazyVim/LazyVim/commit/25d90b54a3b1863cb4428fd309ab855732289710))
|
||||||
|
* **extras:** big rework of default extras ([525377d](https://github.com/LazyVim/LazyVim/commit/525377dee9ac3d19f53e333538e4e85586163ad8))
|
||||||
|
* **util:** `has_extra` now also checks for manual imports in `lazy.lua` ([0416376](https://github.com/LazyVim/LazyVim/commit/041637673371db7866f8bf00d77fc2fb6cc673c6))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **extras:** remove debug ([b4c24a3](https://github.com/LazyVim/LazyVim/commit/b4c24a3fe882c21555e60a1ec44087526e856eb9))
|
||||||
|
* **snacks.explorer:** no longer needed to disable neo-tree ([2d6b492](https://github.com/LazyVim/LazyVim/commit/2d6b49281d2550222be6aada0b7eeca07bb26e10))
|
||||||
|
* **snacks.picker:** move dashboard shortcut to picker extra. Closes [#5549](https://github.com/LazyVim/LazyVim/issues/5549) ([2b3bcf3](https://github.com/LazyVim/LazyVim/commit/2b3bcf36b2392bef94afefc07e2fcf32960960d7))
|
||||||
|
|
||||||
|
## [14.10.0](https://github.com/LazyVim/LazyVim/compare/v14.9.0...v14.10.0) (2025-02-07)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **bufferline:** support for snacks picker sidebars ([3500d6a](https://github.com/LazyVim/LazyVim/commit/3500d6a826a32d06d921f3e22342734c61ef09fe))
|
||||||
|
* **refactoring:** fallback to using vim ui select for refactoring.nvim ([#5540](https://github.com/LazyVim/LazyVim/issues/5540)) ([23a1bbd](https://github.com/LazyVim/LazyVim/commit/23a1bbdae90f37aab4a86bfb4c113531a28e7f71))
|
||||||
|
* **snacks.explorer:** enabled netrw integration ([4f006f1](https://github.com/LazyVim/LazyVim/commit/4f006f1fba5fdaa0150c544ad7966b96ec9cb04a))
|
||||||
|
* **snacks.picker:** add projects picker to dashboard if snacks picker is enabled ([fb256f2](https://github.com/LazyVim/LazyVim/commit/fb256f2b688cb7ac9875f704fe6c00f27efc2354))
|
||||||
|
* **snacks.picker:** some extra keymaps ([ab30442](https://github.com/LazyVim/LazyVim/commit/ab304426527723e116742cd7862fc976f876107c))
|
||||||
|
* **snippets:** mini.snippets is out of beta ([#5505](https://github.com/LazyVim/LazyVim/issues/5505)) ([4a81a37](https://github.com/LazyVim/LazyVim/commit/4a81a370d7868d7db32042f69b0fc5a6218059c5))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **copilot:** remove load on BufReadPost instead of InsertEnter ([8f4e9b8](https://github.com/LazyVim/LazyVim/commit/8f4e9b8c1e43e354d91529484aedca54f04bdcf6))
|
||||||
|
* **go:** update go.lua to eliminate fieldalignment from analyses ([#5170](https://github.com/LazyVim/LazyVim/issues/5170)) ([5c97327](https://github.com/LazyVim/LazyVim/commit/5c9732733de62a4e15988826f53d16a4dfdf960c))
|
||||||
|
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* **snacks_picker:** lazy-load trouble open action ([1a4d948](https://github.com/LazyVim/LazyVim/commit/1a4d948e0dae360836187be8c86283d7e814b7ef))
|
||||||
|
|
||||||
|
## [14.9.0](https://github.com/LazyVim/LazyVim/compare/v14.8.0...v14.9.0) (2025-01-30)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **markdown:** added markdown support for codecompanion ([e9db488](https://github.com/LazyVim/LazyVim/commit/e9db488acaa04f1a9eca6d022e57fed4271b8af8))
|
||||||
|
* **snacks.picker:** added <leader>si to search icons ([#5460](https://github.com/LazyVim/LazyVim/issues/5460)) ([eea52be](https://github.com/LazyVim/LazyVim/commit/eea52be3447502dde77d9e6fa75fd597a0b5a86a))
|
||||||
|
* **snacks.picker:** added <leader>su to search undotree ([#5447](https://github.com/LazyVim/LazyVim/issues/5447)) ([332b320](https://github.com/LazyVim/LazyVim/commit/332b32080c52727a16db90e06989caa0c378caa1))
|
||||||
|
* **snacks.picker:** added `leader-fB` to find any buffer (including hidden & nofile) ([83bf636](https://github.com/LazyVim/LazyVim/commit/83bf6360a1f28a3fc1afe31ae300247fc01c7a90))
|
||||||
|
* **snacks.picker:** added `leader-sp` to search for plugin spec ([7cf4185](https://github.com/LazyVim/LazyVim/commit/7cf4185dc4d1fe49ad004d33a6703603fb4500ff))
|
||||||
|
* **snacks.picker:** added alt-c to toggle between cwd/root dir ([6be7c4f](https://github.com/LazyVim/LazyVim/commit/6be7c4fee4fb755ff07f7bcc13eac96e1d8c279a))
|
||||||
|
* **snacks.picker:** flash.nvim integration ([5d24aa6](https://github.com/LazyVim/LazyVim/commit/5d24aa63111af68fbada8c97fedb75b07b8c3c92))
|
||||||
|
* **snacks.picker:** use snacks picker for notifications when enabled ([01a70cc](https://github.com/LazyVim/LazyVim/commit/01a70cc60ed2760afc819510177fb8d12a371b25))
|
||||||
|
* **snacks:** extra for snacks explorer (replacement for neo-tree) ([e20d9af](https://github.com/LazyVim/LazyVim/commit/e20d9afcbc980510093a3753a3991d8c934cbb75))
|
||||||
|
* **snippets:** an extra for mini.snippets ([#5274](https://github.com/LazyVim/LazyVim/issues/5274)) ([8b4e6ff](https://github.com/LazyVim/LazyVim/commit/8b4e6ff70d682cad3b1f4999623c3f0ac639fa82))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **keymaps:** remove unneeded and ambiguous `<leader>w` keymap ([#5459](https://github.com/LazyVim/LazyVim/issues/5459)) ([132986a](https://github.com/LazyVim/LazyVim/commit/132986a624b49bf740161d90ce94f16dd5ea5883))
|
||||||
|
* **luasnip:** schedule `jump` to be compatible with blink, nvim-cmp still works after change ([#5470](https://github.com/LazyVim/LazyVim/issues/5470)) ([0350934](https://github.com/LazyVim/LazyVim/commit/0350934d56579f3e6a9d40fa47313b2970d74772))
|
||||||
|
* **root:** pass args to root.get ([dc8512f](https://github.com/LazyVim/LazyVim/commit/dc8512fce1ec1cd4b0ca52d1077b2ed3894d51c8))
|
||||||
|
* **snacks.picker:** flash integration ([b5cd0d0](https://github.com/LazyVim/LazyVim/commit/b5cd0d0e27081be3ef1905475a0fe541b7661870))
|
||||||
|
* **snacks.picker:** snacks => flash ([3de7b24](https://github.com/LazyVim/LazyVim/commit/3de7b24cf6ed844772ea047476a400c56d5f4b42))
|
||||||
|
* **snacks:** use `Snacks.picker` for recent files ([#5485](https://github.com/LazyVim/LazyVim/issues/5485)) ([f0d2629](https://github.com/LazyVim/LazyVim/commit/f0d2629bd859eeac343999b0fe145f9beb227c4a))
|
||||||
|
* **sql:** better nvim-cmp check. Closes [#5188](https://github.com/LazyVim/LazyVim/issues/5188) ([1e83b4f](https://github.com/LazyVim/LazyVim/commit/1e83b4f843f88678189df81b1c88a400c53abdbc))
|
||||||
|
* **vscode:** diabled some snacks plugins. Fixes [#5364](https://github.com/LazyVim/LazyVim/issues/5364) ([c7a7ab5](https://github.com/LazyVim/LazyVim/commit/c7a7ab51129692927ae47f4e57ce22d10d48467e))
|
||||||
|
|
||||||
|
## [14.8.0](https://github.com/LazyVim/LazyVim/compare/v14.7.0...v14.8.0) (2025-01-20)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **chezmoi:** add snacks picker integration for chezmoi files ([#5429](https://github.com/LazyVim/LazyVim/issues/5429)) ([970d1a0](https://github.com/LazyVim/LazyVim/commit/970d1a05da37554aa17b671c869431a7b387d8be))
|
||||||
|
* **dial:** add checkbox augend for markdown ([#5411](https://github.com/LazyVim/LazyVim/issues/5411)) ([b19f207](https://github.com/LazyVim/LazyVim/commit/b19f2070b847a3067436f4d16a0cc5b84a9f9819))
|
||||||
|
* **snacks.picker:** added leader-sS to search lsp workspace symbols ([8787ec1](https://github.com/LazyVim/LazyVim/commit/8787ec1227e10123ad7291cf916020d9a8626525))
|
||||||
|
* **snacks:** added git diff keymap to pick hunks with leader-gd ([62cb4a4](https://github.com/LazyVim/LazyVim/commit/62cb4a465c490c7d41f7a3bf52fb0e222f2cf83b))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **markdown:** disable checkbox rendering since it's annoying to edit ([4f31bfa](https://github.com/LazyVim/LazyVim/commit/4f31bfab86402c819e5ea1e18b3c5d139628c864))
|
||||||
|
* **snacks.picker:** fix mapping for `Recent (cwd)` ([#5407](https://github.com/LazyVim/LazyVim/issues/5407)) ([8307b0f](https://github.com/LazyVim/LazyVim/commit/8307b0fe506a38417f3b7835e2c4b43d9a970946))
|
||||||
|
* **snacks.picker:** fix mapping for Projects for consistency ([#5433](https://github.com/LazyVim/LazyVim/issues/5433)) ([eb7b453](https://github.com/LazyVim/LazyVim/commit/eb7b453b48ab7e3008013e0edf2822f622111e97))
|
||||||
|
* **snacks.picker:** respect lazyvim.config.kind_filter ([#5415](https://github.com/LazyVim/LazyVim/issues/5415)) ([df7426e](https://github.com/LazyVim/LazyVim/commit/df7426eefa79d5dfa2fcbe2f381abfb2cca70bad))
|
||||||
|
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* **java:** setting opts.dap_main to false to disable main class scan ([#5391](https://github.com/LazyVim/LazyVim/issues/5391)) ([66c3577](https://github.com/LazyVim/LazyVim/commit/66c3577bc779d31a7c2addd47de7cc6d215795ba))
|
||||||
|
|
||||||
|
## [14.7.0](https://github.com/LazyVim/LazyVim/compare/v14.6.1...v14.7.0) (2025-01-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **extras:** added extra for snacks picker ([#5368](https://github.com/LazyVim/LazyVim/issues/5368)) ([13044c2](https://github.com/LazyVim/LazyVim/commit/13044c298ed1837a2d938b64710528d359dc8407))
|
||||||
|
|
||||||
|
## [14.6.1](https://github.com/LazyVim/LazyVim/compare/v14.6.0...v14.6.1) (2025-01-08)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **blink:** added new luasnip preset ([8d2d9a9](https://github.com/LazyVim/LazyVim/commit/8d2d9a9bd965aab0a752f24ec327d2f391a8406b))
|
||||||
|
* **luasnip:** correctly remove duplicate snippets ([#5214](https://github.com/LazyVim/LazyVim/issues/5214)) ([05c3447](https://github.com/LazyVim/LazyVim/commit/05c3447558fa6eef7ae3c0d3e7ed1c281572274d))
|
||||||
|
* **nlua:** debugger not responding ([#5319](https://github.com/LazyVim/LazyVim/issues/5319)) ([4e746d0](https://github.com/LazyVim/LazyVim/commit/4e746d0e5625662e1f121b39f63836b653ed728b))
|
||||||
|
|
||||||
|
## [14.6.0](https://github.com/LazyVim/LazyVim/compare/v14.5.0...v14.6.0) (2024-12-20)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **colorscheme:** add fzf integration to catppuccin ([#5175](https://github.com/LazyVim/LazyVim/issues/5175)) ([751803f](https://github.com/LazyVim/LazyVim/commit/751803f98bf3baaf7db1c1e2ddd28e082396124a))
|
||||||
|
* **lualine:** add fzf extensions. ([#5203](https://github.com/LazyVim/LazyVim/issues/5203)) ([7a16a75](https://github.com/LazyVim/LazyVim/commit/7a16a752ba1fa535bb54d6492fb8df6c72ab8ba0))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **blink:** remove compatibility with 0.7.6 release ([#5212](https://github.com/LazyVim/LazyVim/issues/5212)) ([857f330](https://github.com/LazyVim/LazyVim/commit/857f330c2139c328cfce0251b11713dc179d6a81))
|
||||||
|
* **codeium:** doesnt automatically load when `vim.g.ai_cmp` is set to false ([#5182](https://github.com/LazyVim/LazyVim/issues/5182)) ([b51279c](https://github.com/LazyVim/LazyVim/commit/b51279c6d727a09cd3d2bf3c9d0cf829810280bb))
|
||||||
|
* **fzf:** fzf.lua compatible hidden scrollbar ([#5177](https://github.com/LazyVim/LazyVim/issues/5177)) ([3a79273](https://github.com/LazyVim/LazyVim/commit/3a79273f3c3bbd22bcdba795b7b8fe6a949db96e))
|
||||||
|
* **luasnip:** use blink's luasnip source. Closes [#5211](https://github.com/LazyVim/LazyVim/issues/5211) ([86de9c9](https://github.com/LazyVim/LazyVim/commit/86de9c9e443572b0244ee9bbdcf5f10ecaabaf74))
|
||||||
|
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* **supermaven:** add lazy-loading ([#5183](https://github.com/LazyVim/LazyVim/issues/5183)) ([a3a28bf](https://github.com/LazyVim/LazyVim/commit/a3a28bf8e43f7239316942c2f2bac6e74b28586b))
|
||||||
|
|
||||||
|
|
||||||
|
### Reverts
|
||||||
|
|
||||||
|
* fix(fzf): fzf.lua compatible hidden scrollbar ([#5177](https://github.com/LazyVim/LazyVim/issues/5177)) ([c40692c](https://github.com/LazyVim/LazyVim/commit/c40692c1b0a95492eead8cc093972c634d54043b))
|
||||||
|
|
||||||
|
## [14.5.0](https://github.com/LazyVim/LazyVim/compare/v14.4.0...v14.5.0) (2024-12-17)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **blink:** increase lazydev scores ([22015e0](https://github.com/LazyVim/LazyVim/commit/22015e0b4835ae148c19b459bf494fe5f72b415b))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **blink:** add `vim.snippet` fixes to blink (was already added to cmp). Fixes [#5067](https://github.com/LazyVim/LazyVim/issues/5067) ([5ea3cfa](https://github.com/LazyVim/LazyVim/commit/5ea3cfa48e6ac88b90282da86dba7799f67b2e30))
|
||||||
|
* **blink:** don't trigger automatically on insert ([2cf3d23](https://github.com/LazyVim/LazyVim/commit/2cf3d234bfc31a1a4eda282ddabc12987f762893))
|
||||||
|
* **blink:** remove show_on_insert_on_trigger_character since this has been fixed for {} and others ([0f3a120](https://github.com/LazyVim/LazyVim/commit/0f3a1201861e6d6e8834aa8937dcf3e4a70a937a))
|
||||||
|
* **illuminate:** disable snacks.words when illuminate extra is enabled. Fixes [#5125](https://github.com/LazyVim/LazyVim/issues/5125) ([d025115](https://github.com/LazyVim/LazyVim/commit/d0251155ab2a293136c933b4e925e1fa16d39a2d))
|
||||||
|
* **supermaven:** don't attach to bigfile and some snacks ft. Fixes [#5139](https://github.com/LazyVim/LazyVim/issues/5139) ([25ee13c](https://github.com/LazyVim/LazyVim/commit/25ee13ce29ad8c4e10d677e641955cfd3c810fb5))
|
||||||
|
* **vscode:** disable some snacks plugins in vscode. Closes [#5124](https://github.com/LazyVim/LazyVim/issues/5124) ([301135b](https://github.com/LazyVim/LazyVim/commit/301135b2749affe71645c610001c8253ae78c591))
|
||||||
|
|
||||||
|
## [14.4.0](https://github.com/LazyVim/LazyVim/compare/v14.3.0...v14.4.0) (2024-12-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **blink:** boost results from ai providers and enable async, to get much faster completions ([6bc56e4](https://github.com/LazyVim/LazyVim/commit/6bc56e4e8142e3d453f2fbfea8ace62fcfc3750f))
|
||||||
|
* **keymaps:** unlink luasnip on `esc` ([ef91026](https://github.com/LazyVim/LazyVim/commit/ef9102677f9b7a31d0bb7cfcd76f24401a7385fc))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **blink:** allow overriding `<Tab>` key. Fixes [#5095](https://github.com/LazyVim/LazyVim/issues/5095). Closes [#5099](https://github.com/LazyVim/LazyVim/issues/5099) ([89314cb](https://github.com/LazyVim/LazyVim/commit/89314cb2aae76b434122592ac8da264fa689bdff))
|
||||||
|
* **keymaps:** better escape ([8f113a5](https://github.com/LazyVim/LazyVim/commit/8f113a514c130cba8d0f79acdd091d18ef997829))
|
||||||
|
|
||||||
|
## [14.3.0](https://github.com/LazyVim/LazyVim/compare/v14.2.0...v14.3.0) (2024-12-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **config:** better icon for snippets ([195a6e6](https://github.com/LazyVim/LazyVim/commit/195a6e611495da9dbb1afef4b470926cc2535f19))
|
||||||
|
* **keymaps:** stop native snippets on escape. Closes [#5083](https://github.com/LazyVim/LazyVim/issues/5083) ([15c81fd](https://github.com/LazyVim/LazyVim/commit/15c81fdbb839f0c657fe4c077114475e82f423fe))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **blink:** super-tab and ai completions ([413566a](https://github.com/LazyVim/LazyVim/commit/413566af591e9152f156944bff35c89d5d973148))
|
||||||
|
|
||||||
|
## [14.2.0](https://github.com/LazyVim/LazyVim/compare/v14.1.0...v14.2.0) (2024-12-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **blink:** add `<c-y>` to keymaps ([3866fbc](https://github.com/LazyVim/LazyVim/commit/3866fbcd40dfd52f4012dfbb434208a9f953cf05))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **blink:** `draw.treesitter` expects table ([#5044](https://github.com/LazyVim/LazyVim/issues/5044)) ([08a7f7e](https://github.com/LazyVim/LazyVim/commit/08a7f7e3f92aeced3092c5ec462d784f765e8654))
|
||||||
|
* **blink:** compat with 0.7.6 ([63eab6d](https://github.com/LazyVim/LazyVim/commit/63eab6d9a54b6d9e93d3cc445d57014bbe8cc271))
|
||||||
|
* **blink:** only override color symbol kind for blink ([b07378d](https://github.com/LazyVim/LazyVim/commit/b07378dde40f1fa98b099cbd496129f5ca376e2c))
|
||||||
|
* **health:** added `fzf` to healthchecks ([380cea9](https://github.com/LazyVim/LazyVim/commit/380cea97bf92fda3ad4ae14d1d4d37acffe5019a))
|
||||||
|
* **health:** added curl to health checks ([5de1532](https://github.com/LazyVim/LazyVim/commit/5de15329fb5f7a846140fca96f9c5587245d63c1))
|
||||||
|
|
||||||
|
## [14.1.0](https://github.com/LazyVim/LazyVim/compare/v14.0.2...v14.1.0) (2024-12-13)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **blink:** use block vs. icon for colors ([#5037](https://github.com/LazyVim/LazyVim/issues/5037)) ([4488cb2](https://github.com/LazyVim/LazyVim/commit/4488cb24f72e04dd5adb2e7c0388a51c2b36f4f0))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **blink:** add backward compat for config ([1517ec9](https://github.com/LazyVim/LazyVim/commit/1517ec9bb46b454d253186aff5e5abd41e96d723))
|
||||||
|
|
||||||
|
## [14.0.2](https://github.com/LazyVim/LazyVim/compare/v14.0.1...v14.0.2) (2024-12-13)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **cmp:** disable nvim-cmp/blink.cmp when needed ([60b7704](https://github.com/LazyVim/LazyVim/commit/60b77045d57d5473e50042b9b879c9c1054e6a10))
|
||||||
|
* **cmp:** wrong extras check for nvim-cmp ([009e358](https://github.com/LazyVim/LazyVim/commit/009e3587be1badc04c9a8b8b459e8555b405509c))
|
||||||
|
|
||||||
|
## [14.0.1](https://github.com/LazyVim/LazyVim/compare/v14.0.0...v14.0.1) (2024-12-13)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **NEWS:** typo ([0fd7140](https://github.com/LazyVim/LazyVim/commit/0fd7140a6de936edb27a4ba4f4825153ae801c21))
|
||||||
|
|
||||||
|
## [14.0.0](https://github.com/LazyVim/LazyVim/compare/v13.9.1...v14.0.0) (2024-12-13)
|
||||||
|
|
||||||
|
|
||||||
|
### ⚠ BREAKING CHANGES
|
||||||
|
|
||||||
|
* **cmp:** moved `nvim-cmp` to extras and prefer `blink.cmp` on Neovim >= `0.10` as default completion engine
|
||||||
|
* **cmp:** moved `nvim-cmp` to extras and prefer `blink.cmp` on Neovim >= `0.10` as default completion engine
|
||||||
|
* **snacks:** use `snacks.scope` indent objects in favor of custom `mini.ai` indent objects
|
||||||
|
* **snacks:** use `snacks.indent` and moved `indent-blankline` to extras
|
||||||
|
* **pick:** make fzf the default picker for LazyVim
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **cmp:** moved `nvim-cmp` to extras and prefer `blink.cmp` on Neovim >= `0.10` as default completion engine ([152f9d1](https://github.com/LazyVim/LazyVim/commit/152f9d113fa2b4fc2af72d2846c4dd68c31b7596))
|
||||||
|
* **cmp:** moved `nvim-cmp` to extras and prefer `blink.cmp` on Neovim >= `0.10` as default completion engine ([2cbfb9b](https://github.com/LazyVim/LazyVim/commit/2cbfb9b6b7b9b4bb1c9ce94ad02ab0a851310fc0))
|
||||||
|
* **keymaps:** added leader-uD to toggle dim mode ([9b97388](https://github.com/LazyVim/LazyVim/commit/9b973882b8bcbab32f850da7c553cdc6388af4ad))
|
||||||
|
* **keymaps:** added leader-z to toggle zen mode ([e6d6a09](https://github.com/LazyVim/LazyVim/commit/e6d6a096b34ad887b9f954a3f43bcc3fd7833f73))
|
||||||
|
* **keymaps:** added leader-Z to toggle zoom ([f2e1cac](https://github.com/LazyVim/LazyVim/commit/f2e1cac965e41d7761073856b11bea223cac1e4d))
|
||||||
|
* **lualine:** add snacks profiler status ([7bc8490](https://github.com/LazyVim/LazyVim/commit/7bc8490d46e002d624f45037fc507e8dd10d4b70))
|
||||||
|
* **pick:** make fzf the default picker for LazyVim ([ae2340f](https://github.com/LazyVim/LazyVim/commit/ae2340f60a012df125c87fe46e6d98d0be04bd10))
|
||||||
|
* **rust:** exclude bad directories from rust-analyzer ([#5021](https://github.com/LazyVim/LazyVim/issues/5021)) ([94f6df0](https://github.com/LazyVim/LazyVim/commit/94f6df048fbecfdf2f65ab96156b713555df40dc))
|
||||||
|
* **snacks:** added `snacks.input` ([54bece1](https://github.com/LazyVim/LazyVim/commit/54bece17b390453ea0beac41e419394d5e0d69ff))
|
||||||
|
* **snacks:** added leader-ua to toggle global animations ([303980d](https://github.com/LazyVim/LazyVim/commit/303980d267577972bb12e34ef152a0e8b9a953e2))
|
||||||
|
* **snacks:** added leader-ug to toggle indent guides ([b3ac642](https://github.com/LazyVim/LazyVim/commit/b3ac642317cd60e9b35869068dd74fe779a22146))
|
||||||
|
* **snacks:** added leader-uS to toggle scroll ([cded8d4](https://github.com/LazyVim/LazyVim/commit/cded8d4d2808250db5ea864fb8e479fd8b5a4a2c))
|
||||||
|
* **snacks:** added profiler keymaps ([a8332c6](https://github.com/LazyVim/LazyVim/commit/a8332c6d50106cf35e45953cdaa463cbb6c5b085))
|
||||||
|
* **snacks:** enable `snacks.scroll` ([1a1a484](https://github.com/LazyVim/LazyVim/commit/1a1a48497c53e232b0f525baab87d5f23a2205b2))
|
||||||
|
* **snacks:** use `snacks.indent` and moved `indent-blankline` to extras ([94fdc42](https://github.com/LazyVim/LazyVim/commit/94fdc421a11b960e116888658dd9b2b85c3b58fc))
|
||||||
|
* **snacks:** use `snacks.scope` indent objects in favor of custom `mini.ai` indent objects ([d904a1e](https://github.com/LazyVim/LazyVim/commit/d904a1ef47638e4defede775a7f0966fb8e0a2b4))
|
||||||
|
* **snacks:** use `Snacks.zen.zoom()` instead of custom **maximize** ([e389a5a](https://github.com/LazyVim/LazyVim/commit/e389a5ada955c253771ff5c9f8301e2f17c206d2))
|
||||||
|
* **which-key:** make `helix` the default which-key preset ([44c712a](https://github.com/LazyVim/LazyVim/commit/44c712aa31e7e05971259841e1f87c9f3d9c6cd5))
|
||||||
|
* **zen:** zoom with leader-wm and leader-uZ. zen with leader-uz ([2acedaa](https://github.com/LazyVim/LazyVim/commit/2acedaa3a8312e53d84a299bd82d616e1c26328a))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **blink:** disable cmdline integration for now since it doesn't work well with the enter keymap ([20eff4f](https://github.com/LazyVim/LazyVim/commit/20eff4fc3f55fbeb1e415f0cc5a2d1f3019e5da6))
|
||||||
|
* **blink:** remove unneeded code ([d95e530](https://github.com/LazyVim/LazyVim/commit/d95e530c02cbb2bcf36da5bb3e235780bdf6d239))
|
||||||
|
* **blink:** unset provider.kind ([#5024](https://github.com/LazyVim/LazyVim/issues/5024)) ([29c4dea](https://github.com/LazyVim/LazyVim/commit/29c4dea4e75b82ad4b06c21e360eefa3951a3fba))
|
||||||
|
* **blink:** unset sources.compat. Fixes [#5016](https://github.com/LazyVim/LazyVim/issues/5016). Closes [#5017](https://github.com/LazyVim/LazyVim/issues/5017) ([2946031](https://github.com/LazyVim/LazyVim/commit/29460318f302b6dceaf16bd06c45cb3ed58d5fd8))
|
||||||
|
* **clangd:** avoid nil-indexing the completion sorting comparators ([#5011](https://github.com/LazyVim/LazyVim/issues/5011)) ([c4b0d6d](https://github.com/LazyVim/LazyVim/commit/c4b0d6d0d1ee11c07c0ab4ed3f87f97b76a6f592))
|
||||||
|
* **clangd:** nvim-cmp optional ([94be6fb](https://github.com/LazyVim/LazyVim/commit/94be6fb78786e9a53e914db9d5cfab09b13225ba))
|
||||||
|
* **copliot:** restructure copilot-cmp spec ([34d2bdc](https://github.com/LazyVim/LazyVim/commit/34d2bdcac6fabe5d02e157bffa3475391ca1f7ec))
|
||||||
|
* fqn for nvim-cmp ([a9a273d](https://github.com/LazyVim/LazyVim/commit/a9a273d041e2dd0e5654b5b492fd29138259fe68))
|
||||||
|
* **git:** make nvim-cmp optional for the git extra ([ec92fa8](https://github.com/LazyVim/LazyVim/commit/ec92fa85586b4082f04b30ad94cb98b24463665e))
|
||||||
|
* **java:** only setup debug adapter config if mason is installed ([#5013](https://github.com/LazyVim/LazyVim/issues/5013)) ([aad0edb](https://github.com/LazyVim/LazyVim/commit/aad0edbf749bcbe16e9ef8d2a65a19dd3fe2bd87))
|
||||||
|
* **java:** only setup debug adapter config if mason is installed (for real this time) ([#5014](https://github.com/LazyVim/LazyVim/issues/5014)) ([5b1b6b2](https://github.com/LazyVim/LazyVim/commit/5b1b6b29d717adeffb0528cffef9f1a3972d3701))
|
||||||
|
* **java:** only use mason-registry if mason installed ([#4991](https://github.com/LazyVim/LazyVim/issues/4991)) ([21b02f0](https://github.com/LazyVim/LazyVim/commit/21b02f056d924d0a3cb3513b163e3dbdfa9c15ec))
|
||||||
|
* **mini.animate:** disable `snacks.scroll` when `mini.animate` is enabled ([9b07544](https://github.com/LazyVim/LazyVim/commit/9b07544e89ecead354ef0f17ebc3127f3fa5bbd8))
|
||||||
|
* **mini.indentscope:** disable snacks and indent-blankline scope ([98c77f1](https://github.com/LazyVim/LazyVim/commit/98c77f1de479b12bc29dc8339fbfe694959d99ed))
|
||||||
|
* **nvim-cmp:** set high prio for loading the nvim-cmp extra to prevent issues with opts ([adf8db6](https://github.com/LazyVim/LazyVim/commit/adf8db69ed91f8c15fe3cf37df9dc0801dbaeb39))
|
||||||
|
* **nvim-cmp:** specs ([88e77b0](https://github.com/LazyVim/LazyVim/commit/88e77b0e2439a27d06e95e89839227f1e9446c74))
|
||||||
|
* **ui:** use `Snacks.util.color` instead of `LazyVim.ui.fg` ([6d774ba](https://github.com/LazyVim/LazyVim/commit/6d774ba8f21f87aaa8bf9dbeb0a84b747541b349))
|
||||||
|
|
||||||
|
## [13.9.1](https://github.com/LazyVim/LazyVim/compare/v13.9.0...v13.9.1) (2024-12-12)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **blink:** set kind to int, not string, if overriding ([#4999](https://github.com/LazyVim/LazyVim/issues/4999)) ([cee60a6](https://github.com/LazyVim/LazyVim/commit/cee60a6d3040181ac9c5b709d79e80e180b34d48))
|
||||||
|
|
||||||
|
## [13.9.0](https://github.com/LazyVim/LazyVim/compare/v13.8.0...v13.9.0) (2024-12-11)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **luasnip:** add default user snippet location ([#4987](https://github.com/LazyVim/LazyVim/issues/4987)) ([8c79ab6](https://github.com/LazyVim/LazyVim/commit/8c79ab601af19b5370d560aa619567371ac70d86))
|
||||||
|
* **vscode:** add vscode-specific keymaps and sync undo/redo with vscode ([#4983](https://github.com/LazyVim/LazyVim/issues/4983)) ([9ad1c49](https://github.com/LazyVim/LazyVim/commit/9ad1c49b67a5c4330e366cde41ab11b156de03f2))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **autocmds:** remove snacks_win from close_with_q, since they have their own keymaps ([99c361f](https://github.com/LazyVim/LazyVim/commit/99c361f708924ddc63599115580bda537cc7f119))
|
||||||
|
* **blink:** config breaking changes. Fixes [#4990](https://github.com/LazyVim/LazyVim/issues/4990) ([439340b](https://github.com/LazyVim/LazyVim/commit/439340bd8a970aa23d513aea96c93e84b3af42dc))
|
||||||
|
|
||||||
|
## [13.8.0](https://github.com/LazyVim/LazyVim/compare/v13.7.0...v13.8.0) (2024-12-07)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **git:** added toggles for gitsigns.nvim and mini.diff ([2ebba15](https://github.com/LazyVim/LazyVim/commit/2ebba15e1274f5437a418ddacfe9dbf342fd8a18))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **dot:** kitty ft with bash treesitter highlights ([7ef2dfd](https://github.com/LazyVim/LazyVim/commit/7ef2dfd3ba9a3dffaa8c57c1bb5e130b9aa74217))
|
||||||
|
* **keymaps:** toggle name ([b2f7505](https://github.com/LazyVim/LazyVim/commit/b2f750558a3737879f8151e741e7a3988886e37f))
|
||||||
|
* **mini.diff:** toggle ([3f4b1ff](https://github.com/LazyVim/LazyVim/commit/3f4b1ff00364d089e19f4b3c738fd5298243fadb))
|
||||||
|
* **rust:** only use mason.nvim if it is present ([#4963](https://github.com/LazyVim/LazyVim/issues/4963)) ([5ddad99](https://github.com/LazyVim/LazyVim/commit/5ddad99bac203e87e6f78f3ab7567a49b0d1d8a6))
|
||||||
|
|
||||||
|
## [13.7.0](https://github.com/LazyVim/LazyVim/compare/v13.6.0...v13.7.0) (2024-12-05)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **blink:** enabled treesitter highlighting ([0a9447c](https://github.com/LazyVim/LazyVim/commit/0a9447c1b1776c2d8d7b7d495538ddfab7c6cd08))
|
||||||
|
* **extras.ai:** blink.cmp integration and kind overrides for menu drawing ([#4942](https://github.com/LazyVim/LazyVim/issues/4942)) ([f841ecf](https://github.com/LazyVim/LazyVim/commit/f841ecf6bdde98a0983e44171b1ad8513e159e29))
|
||||||
|
* **rust:** add bacon-ls and improve debugging ([#3212](https://github.com/LazyVim/LazyVim/issues/3212)) ([ea794ff](https://github.com/LazyVim/LazyVim/commit/ea794ffd94adeb2b1d2870ed97dbd3f000d911b3))
|
||||||
|
* **snacks:** silence copy url keymap ([#4939](https://github.com/LazyVim/LazyVim/issues/4939)) ([03e203b](https://github.com/LazyVim/LazyVim/commit/03e203bfbe1e5de38cfc0082e5d1b720cab83c0e))
|
||||||
|
* **toggle:** added leader-A to toggle tabline. Closes [#4951](https://github.com/LazyVim/LazyVim/issues/4951) ([8232651](https://github.com/LazyVim/LazyVim/commit/8232651c4a4a80da34f8b6c1742b04144ae4b959))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **blink:** update config for latest changes ([#4953](https://github.com/LazyVim/LazyVim/issues/4953)) ([090ca75](https://github.com/LazyVim/LazyVim/commit/090ca75d3b326280a67e727ef77e15920a90e3c9))
|
||||||
|
* **copilot:** CopilotChat.nvim has moved to main ([#4931](https://github.com/LazyVim/LazyVim/issues/4931)) ([0d6026a](https://github.com/LazyVim/LazyVim/commit/0d6026a3e8a255cf825ad293de101bc1e1a667eb))
|
||||||
|
* **extras.treesitter-context:** change event back to `LazyFile` ([#4940](https://github.com/LazyVim/LazyVim/issues/4940)) ([83017ff](https://github.com/LazyVim/LazyVim/commit/83017ff28afa8b8ddf9254564d8b4a9c96ec3f7d))
|
||||||
|
* **supermaven:** blink.cmp integration ([#4941](https://github.com/LazyVim/LazyVim/issues/4941)) ([d714711](https://github.com/LazyVim/LazyVim/commit/d71471151b8906155e048ea3d3fe2fa7d651990e))
|
||||||
|
* **tex:** specify filetype for <localleader>l ([#4905](https://github.com/LazyVim/LazyVim/issues/4905)) ([12e3752](https://github.com/LazyVim/LazyVim/commit/12e37529e718b926e7513d0397e32771aeb6e049))
|
||||||
|
* **ui:** actually disable mini-indentscope on snacks_dashboard ([#4947](https://github.com/LazyVim/LazyVim/issues/4947)) ([bfe29fb](https://github.com/LazyVim/LazyVim/commit/bfe29fb01330d2bfdfe14582133907217f4b8192))
|
||||||
|
* **ui:** disable mini.indentscope on `ft=snacks_dashboard` ([#4928](https://github.com/LazyVim/LazyVim/issues/4928)) ([4bf3a39](https://github.com/LazyVim/LazyVim/commit/4bf3a392234f4c4421af644683d95d8aab945382))
|
||||||
|
* **ui:** properly clear maximize state on exit. See [#4934](https://github.com/LazyVim/LazyVim/issues/4934) ([9ec253b](https://github.com/LazyVim/LazyVim/commit/9ec253b9b6bf9673f610035d741a345d6be7a44f))
|
||||||
|
|
||||||
|
## [13.6.0](https://github.com/LazyVim/LazyVim/compare/v13.5.3...v13.6.0) (2024-12-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **colorscheme:** enable catppuccin snacks integration by default ([#4882](https://github.com/LazyVim/LazyVim/issues/4882)) ([5659786](https://github.com/LazyVim/LazyVim/commit/5659786893ead10782e2b603c0754d83a0ae78d6))
|
||||||
|
* **extras:** added extra for `smear-cursor.nvim` ([40dba86](https://github.com/LazyVim/LazyVim/commit/40dba869254309865fcdabbc6d8c6b8e187c2444))
|
||||||
|
* **lang:** add maxInlayHintLength for vtsls to resolve inlay hint to… ([#4902](https://github.com/LazyVim/LazyVim/issues/4902)) ([1847e3f](https://github.com/LazyVim/LazyVim/commit/1847e3fb25cb29a9bc1c662cabe6984509733595))
|
||||||
|
* **smear-cursor:** enable `cursor_color = "none"`, to show trail using color of target text fg color ([275c786](https://github.com/LazyVim/LazyVim/commit/275c78665e0534dfb62de34fc1a47e2f0f87acdb))
|
||||||
|
* **snacks:** add keymap to copy url from gitbrowse ([#4870](https://github.com/LazyVim/LazyVim/issues/4870)) ([cdf3f1f](https://github.com/LazyVim/LazyVim/commit/cdf3f1f2bdc4e57de506a9d7c55fa7e0131be692))
|
||||||
|
* **snacks:** added leader-. to toggle a scratch buffer. Uses `count` for new scratch buffers ([6d42f10](https://github.com/LazyVim/LazyVim/commit/6d42f1084d14025d67accbbcbbe9686de505ed96))
|
||||||
|
* **snacks:** added leader-n to show notification history ([be0cb96](https://github.com/LazyVim/LazyVim/commit/be0cb9622dd47a5f62fbb32ac6f485a33a253119))
|
||||||
|
* **snacks:** added leader-S to select a previous scratch buffer ([e05379b](https://github.com/LazyVim/LazyVim/commit/e05379babc99b43e6c97743ba4800449c9c78f60))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **blink:** fixed luasnip completions for blink ([7bb954f](https://github.com/LazyVim/LazyVim/commit/7bb954fd1d096dc68217611e696fc02dbca7cf50))
|
||||||
|
* **blink:** icons ([2263b94](https://github.com/LazyVim/LazyVim/commit/2263b94439a14c133358d1abe4c0d7eef914105e))
|
||||||
|
* **blink:** make sure blink.compat is setup correctly when used in extras ([91a3c66](https://github.com/LazyVim/LazyVim/commit/91a3c663a7ab6c9ce782e1ff0fd6bc9315f2a670))
|
||||||
|
* **blink:** updated to config to reflect breaking changes ([efcba66](https://github.com/LazyVim/LazyVim/commit/efcba66a2262b2c956a4203f522026f03af9c903))
|
||||||
|
* **dial:** add and/or augend to python ft ([#4875](https://github.com/LazyVim/LazyVim/issues/4875)) ([ecfaed3](https://github.com/LazyVim/LazyVim/commit/ecfaed3cc1cbe3013f1201594adde2ea0022c455))
|
||||||
|
* **java:** give java a default nvim-dap config ([#4261](https://github.com/LazyVim/LazyVim/issues/4261)) ([c9102bc](https://github.com/LazyVim/LazyVim/commit/c9102bc35185284ddce28eb216fd125fa0e0fa8b))
|
||||||
|
* **java:** minisurround jdtls keybind conflict ([#4886](https://github.com/LazyVim/LazyVim/issues/4886)) ([30fac42](https://github.com/LazyVim/LazyVim/commit/30fac4206a393b05736199873bac87ecdfacd2a0))
|
||||||
|
* **lazydev:** use luals' bundled luv library ([eb525c6](https://github.com/LazyVim/LazyVim/commit/eb525c680d0423f5addb12e10f87ce5b81fc0d9e))
|
||||||
|
* **lsp:** don't leak keymaps from LSP server configs ([#4849](https://github.com/LazyVim/LazyVim/issues/4849)) ([85e4118](https://github.com/LazyVim/LazyVim/commit/85e41180654f6cd6c7975442b3a4877b4b4fd475))
|
||||||
|
* **mini.animate:** disable when in Neovide ([66459f9](https://github.com/LazyVim/LazyVim/commit/66459f9361316fc4f723c8ac12f4fdc44f195b12))
|
||||||
|
* **octo:** upstream changed mappings to `localleader` ([#4850](https://github.com/LazyVim/LazyVim/issues/4850)) ([c979225](https://github.com/LazyVim/LazyVim/commit/c979225c372f04c3ba4b2f74c3b9c102ddd5f364))
|
||||||
|
* **snacks:** remove lazygit requirement for git browse/blame keymaps ([#4869](https://github.com/LazyVim/LazyVim/issues/4869)) ([2c37492](https://github.com/LazyVim/LazyVim/commit/2c37492461bf6af09a3e940f8b3ea0a123608bfd))
|
||||||
|
* **sql:** fix autocomplete, it was using the wrong plugin name on the `LazyVim.has` check ([#4900](https://github.com/LazyVim/LazyVim/issues/4900)) ([ed10d3c](https://github.com/LazyVim/LazyVim/commit/ed10d3cf19dfb99d38bda0e09be3296571113670))
|
||||||
|
* **sql:** only use cmp if it is available ([#4891](https://github.com/LazyVim/LazyVim/issues/4891)) ([9eccb5d](https://github.com/LazyVim/LazyVim/commit/9eccb5d2defef4c1fe63719528b20bb210e1ef0c))
|
||||||
|
* **ui:** disable indent-blankline on `ft=snacks_dashboard` ([#4895](https://github.com/LazyVim/LazyVim/issues/4895)) ([c022759](https://github.com/LazyVim/LazyVim/commit/c02275919e8238f2a333bedb4eca8d138b4ea567))
|
||||||
|
|
||||||
|
## [13.5.3](https://github.com/LazyVim/LazyVim/compare/v13.5.2...v13.5.3) (2024-11-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **copilot:** remove tmp nightly fix ([30f556d](https://github.com/LazyVim/LazyVim/commit/30f556d17aaf7ac74f0553faebed2cf298b65820))
|
||||||
|
* **dial:** make sure defaults are part of every group. Fixes [#4868](https://github.com/LazyVim/LazyVim/issues/4868) ([2108028](https://github.com/LazyVim/LazyVim/commit/2108028cde19184bf8ea1a00065b5a099b1928e1))
|
||||||
|
|
||||||
|
## [13.5.2](https://github.com/LazyVim/LazyVim/compare/v13.5.1...v13.5.2) (2024-11-19)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **keymaps:** `gitbrowse` also in Visual mode ([#4818](https://github.com/LazyVim/LazyVim/issues/4818)) ([86dc548](https://github.com/LazyVim/LazyVim/commit/86dc548ff9564a37524c2f9259eeb8603a70d5d5))
|
||||||
|
|
||||||
|
## [13.5.1](https://github.com/LazyVim/LazyVim/compare/v13.5.0...v13.5.1) (2024-11-19)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **copilot:** work-around to get copilot working again on nightly ([5961528](https://github.com/LazyVim/LazyVim/commit/59615281f80f68fb91a9e428835c8164a6a6f99f))
|
||||||
|
* **extras:** add blink.cmp integration for SQL extra ([#4833](https://github.com/LazyVim/LazyVim/issues/4833)) ([0bb1da6](https://github.com/LazyVim/LazyVim/commit/0bb1da6d57a32495ed4159f8933d074674066d20))
|
||||||
|
* **snacks:** alignment of header ([4df9392](https://github.com/LazyVim/LazyVim/commit/4df9392cb8c597193411b668d49a3882941e816b))
|
||||||
|
* **snacks:** cleaner way to adjust keys preset ([9c31004](https://github.com/LazyVim/LazyVim/commit/9c310043657fc11db0946ca4a328f29941b72b02))
|
||||||
|
* **snacks:** make sure early notifications show up in noice ([b873f9a](https://github.com/LazyVim/LazyVim/commit/b873f9a7e7ca77f329b40b17741ee244520a1306))
|
||||||
|
|
||||||
|
## [13.5.0](https://github.com/LazyVim/LazyVim/compare/v13.4.0...v13.5.0) (2024-11-18)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **copilot-chat:** remove call to nvim-cmp integration ([#4822](https://github.com/LazyVim/LazyVim/issues/4822)) ([af95531](https://github.com/LazyVim/LazyVim/commit/af9553135da3c42ff83824db0f9dfaaa9ad5973f))
|
||||||
|
* **snacks:** use `snacks.dashboard` as the default dashboard. moved `dashboard-nvim` to extras ([#4832](https://github.com/LazyVim/LazyVim/issues/4832)) ([a07db1a](https://github.com/LazyVim/LazyVim/commit/a07db1a72334bf6550683d5f9132d806febed1cd))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **lualine:** dont show statusline on snacks_dashboard ([33557ae](https://github.com/LazyVim/LazyVim/commit/33557ae68b76954df0288603f39b3f0181bada52))
|
||||||
|
* **tabnine:** dont call CmpTabnineHub in build. Fixes [#4828](https://github.com/LazyVim/LazyVim/issues/4828) ([6dcf5d7](https://github.com/LazyVim/LazyVim/commit/6dcf5d7159d13a21d3148779b5b80048573fcdf1))
|
||||||
|
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* **ui:** never show folds on dashboards ([0352f94](https://github.com/LazyVim/LazyVim/commit/0352f944c34a3aa8a949102a2fe2ded7a1da3cd0))
|
||||||
|
|
||||||
|
## [13.4.0](https://github.com/LazyVim/LazyVim/compare/v13.3.1...v13.4.0) (2024-11-16)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **blink:** auto-enable catppuccin integration ([#4799](https://github.com/LazyVim/LazyVim/issues/4799)) ([ffce089](https://github.com/LazyVim/LazyVim/commit/ffce089a9f1268ff73c7de7c4f45e1a366dc4d34))
|
||||||
|
* **copilot-chat:** remove deprecated options ([#4802](https://github.com/LazyVim/LazyVim/issues/4802)) ([7a1414b](https://github.com/LazyVim/LazyVim/commit/7a1414b5e5950bde34b9bdc0dbc3dd20109f2ac9))
|
||||||
|
* **dial:** support vue filetype ([#4785](https://github.com/LazyVim/LazyVim/issues/4785)) ([8235126](https://github.com/LazyVim/LazyVim/commit/8235126a321eaae093f319398ffec5949f1ab8be))
|
||||||
|
* **extras:** add biome formatter ([#4448](https://github.com/LazyVim/LazyVim/issues/4448)) ([b8407f4](https://github.com/LazyVim/LazyVim/commit/b8407f4b128891c3bdf35a2c403ba23d1e01f3ff))
|
||||||
|
* **vscode:** automatically enable the vscode extra when running in vscode ([1c5a330](https://github.com/LazyVim/LazyVim/commit/1c5a330b6be8007088d84361fee5d2b08771598c))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **terminal:** set shellcmdflags for powershell to recommended values. Closes [#4805](https://github.com/LazyVim/LazyVim/issues/4805) ([1db2af2](https://github.com/LazyVim/LazyVim/commit/1db2af267eeb9046550ac29bd543f3b3021cdd7b))
|
||||||
|
|
||||||
|
## [13.3.1](https://github.com/LazyVim/LazyVim/compare/v13.3.0...v13.3.1) (2024-11-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **copilot:** don't enable blink when using copilot when blink is not installed. Fixes [#4795](https://github.com/LazyVim/LazyVim/issues/4795) ([07a0468](https://github.com/LazyVim/LazyVim/commit/07a046867dc3407b30801e539ab026fb7c180e7b))
|
||||||
|
|
||||||
|
## [13.3.0](https://github.com/LazyVim/LazyVim/compare/v13.2.0...v13.3.0) (2024-11-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **copilot:** added support for blink.cmp source ([a7eca05](https://github.com/LazyVim/LazyVim/commit/a7eca056096486b20ce37b20979c0d712e49fe76))
|
||||||
|
* **extras:** add supermaven ([#3491](https://github.com/LazyVim/LazyVim/issues/3491)) ([c1e8e3c](https://github.com/LazyVim/LazyVim/commit/c1e8e3c80d1d9d44e3795022b3f7d2703abccec6))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **dial.nvim:** added boolean and logical toggles to default group. Fixes [#4515](https://github.com/LazyVim/LazyVim/issues/4515) ([5e485d3](https://github.com/LazyVim/LazyVim/commit/5e485d39b4cc5aca1aedae4d441fb2bfb3bfbf67))
|
||||||
|
* **fzf:** decouple `defaults` from `opts` to easy switch profiles ([#4190](https://github.com/LazyVim/LazyVim/issues/4190)) ([0819f93](https://github.com/LazyVim/LazyVim/commit/0819f9396e94a4188522b6739ade3d6024d2b8a7))
|
||||||
|
* **lsp:** wrap signature_help ([#4791](https://github.com/LazyVim/LazyVim/issues/4791)) ([deb9fd8](https://github.com/LazyVim/LazyVim/commit/deb9fd85b150e50053e127f94f3df6273a9f5faf))
|
||||||
|
* **lualine:** dynamically fetch the color used in lualine ([#4788](https://github.com/LazyVim/LazyVim/issues/4788)) ([e50b435](https://github.com/LazyVim/LazyVim/commit/e50b43544f1261d140bc391a9a1de6e3923b490d))
|
||||||
|
* **lualine:** normalize paths before calculating pretty path. Fixes [#4763](https://github.com/LazyVim/LazyVim/issues/4763) ([ea266e7](https://github.com/LazyVim/LazyVim/commit/ea266e73265e32183acbec0bd39f8108e213770f))
|
||||||
|
* **snacks:** explicitely enable snakcs plugins ([c0b623c](https://github.com/LazyVim/LazyVim/commit/c0b623c332b42b3d75e78e06fa1912417bfca71f))
|
||||||
|
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* **treesitter:** better foldtext and foldexpr ([1d7b9a1](https://github.com/LazyVim/LazyVim/commit/1d7b9a1a61596a61019d5d84be9ed679d90c4a38))
|
||||||
|
|
||||||
|
## [13.2.0](https://github.com/LazyVim/LazyVim/compare/v13.1.0...v13.2.0) (2024-11-11)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **ai:** better completion/suggestions of AI engines ([#4752](https://github.com/LazyVim/LazyVim/issues/4752)) ([fbf881f](https://github.com/LazyVim/LazyVim/commit/fbf881f80b8f0fb2d9e4bc69d04f66323b25c4b9))
|
||||||
|
* **ai:** move ai related extras from `coding` to `ai` ([#4751](https://github.com/LazyVim/LazyVim/issues/4751)) ([86904d2](https://github.com/LazyVim/LazyVim/commit/86904d2fb1ef406386b2dad43f42756e09b28182))
|
||||||
|
* **keymaps:** leader-bo to close other buffers ([24665fc](https://github.com/LazyVim/LazyVim/commit/24665fc73651970e5a1e20a63d6031bd99b97637))
|
||||||
|
* **rest:** add more keymaps to util.rest ([#4467](https://github.com/LazyVim/LazyVim/issues/4467)) ([c22db72](https://github.com/LazyVim/LazyVim/commit/c22db724351bc7a05c56046c48d23a2be8efe71b))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **extras:** fix alpha-nvim non-string keycodes ([#4735](https://github.com/LazyVim/LazyVim/issues/4735)) ([9c9e650](https://github.com/LazyVim/LazyVim/commit/9c9e650530dcd211afd5a8b7f5e3e33e44abd11b))
|
||||||
|
* **snacks:** allow overriding `statuscolumn` through `options.lua` ([17a1b84](https://github.com/LazyVim/LazyVim/commit/17a1b846f08db62e3a93c76426db4017ad3cc2eb))
|
||||||
|
* **vscode:** added snacks.nvim to allowed plugins for vscode. Fixes [#4757](https://github.com/LazyVim/LazyVim/issues/4757) ([06071dd](https://github.com/LazyVim/LazyVim/commit/06071dd452baf1e9b8b5aab140553c4f51fa522e))
|
||||||
|
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* **ui:** only enable treesitter folds if the buffer has treesitter highlighting ([b9dae57](https://github.com/LazyVim/LazyVim/commit/b9dae579612ccf1cd749150ff1603ff6dffc2610))
|
||||||
|
|
||||||
|
## [13.1.0](https://github.com/LazyVim/LazyVim/compare/v13.0.0...v13.1.0) (2024-11-09)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **terraform:** add formatter for packer files ([#4591](https://github.com/LazyVim/LazyVim/issues/4591)) ([4876d11](https://github.com/LazyVim/LazyVim/commit/4876d1137d374af6f39661e402926220517ae4ab))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **extras:** lazy-load telescope-terraform plugins ([#4667](https://github.com/LazyVim/LazyVim/issues/4667)) ([94b4219](https://github.com/LazyVim/LazyVim/commit/94b42193272569f8005587069733f3ba0610bc9b))
|
||||||
|
* **options:** make sure spelling works in regular text files ([548fddd](https://github.com/LazyVim/LazyVim/commit/548fddd1d5db65a80b11500e32cfe86e69bc8777))
|
||||||
|
* **snacks:** noice now honors `Snacks.config.notifier.enabled = false` ([220148f](https://github.com/LazyVim/LazyVim/commit/220148f47f175229232eee31982577fbdd637663))
|
||||||
|
|
||||||
## [13.0.0](https://github.com/LazyVim/LazyVim/compare/v12.44.1...v13.0.0) (2024-11-08)
|
## [13.0.0](https://github.com/LazyVim/LazyVim/compare/v12.44.1...v13.0.0) (2024-11-08)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
95
NEWS.md
95
NEWS.md
|
|
@ -1,7 +1,87 @@
|
||||||
# What's new?
|
# What's new?
|
||||||
|
|
||||||
|
## 15.x
|
||||||
|
|
||||||
|
**Neovim** `>= 0.11.2` includes a lot of changes to the underlying LSP implementation.
|
||||||
|
|
||||||
|
Going forward, **LazyVim** requires **Neovim** `>= 0.11.2`, and drops support for older versions.
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
|
||||||
|
- removed compatibility code for Neovim `< 0.11.2`
|
||||||
|
- configure **LSP** with the native `vim.lsp.config`
|
||||||
|
- migrated **mason.nvim** and **mason-lspconfig.nvim** to `v2.x`
|
||||||
|
- migrated to [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter/tree/main) **main** branch
|
||||||
|
- with the new version, the `tree-sitter` cli is **required** to install parsers
|
||||||
|
- best to run `:checkhealth nvim-treesitter` after updating
|
||||||
|
- replace `nvim-treesitter` incremental selection with `flash.nvim`, since it is no longer supported
|
||||||
|
- enabled [blink.cmp](https://github.com/saghen/blink.cmp) **cmdline** completions
|
||||||
|
- use **LSP** based folding when available (disable with `nvim-lspconfig.folds.enabled = false`)
|
||||||
|
|
||||||
|
## 14.x
|
||||||
|
|
||||||
|
Big new release with a lot of changes and improvements!
|
||||||
|
Two new plugins have been added, and a lot of plugins have been replaced.
|
||||||
|
With these changes, default **LazyVim** is now just `34` plugins.
|
||||||
|
|
||||||
|
### Added Plugins
|
||||||
|
|
||||||
|
- [fzf-lua](https://github.com/ibhagwan/fzf-lua) as a replacement for [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim)
|
||||||
|
- to use **telescope.nvim** instead, enable the `editor.telescope` extra
|
||||||
|
- [blink.cmp](https://github.com/saghen/blink.cmp) as a replacement for [nvim-cmp](https://github.com/hrsh7th/nvim-cmp)
|
||||||
|
- to use **nvim-cmp** instead, enable the `coding.nvim-cmp` extra
|
||||||
|
|
||||||
|
### Removed Plugins
|
||||||
|
|
||||||
|
- [dressing.nvim](https://github.com/stevearc/dressing.nvim) (replaced with [fzf-lua](https://github.com/ibhagwan/fzf-lua) and [snacks.input](https://github.com/folke/snacks.nvim))
|
||||||
|
- [telescope-fzf-native.nvim](https://github.com/nvim-telescope/telescope-fzf-native.nvim) (replaced with [fzf-lua](https://github.com/ibhagwan/fzf-lua))
|
||||||
|
- [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) (replaced with [fzf-lua](https://github.com/ibhagwan/fzf-lua))
|
||||||
|
- [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim) (replaced with [snacks.indent](https://github.com/Folke/snacks.nvim))
|
||||||
|
- to use **indent-blankline.nvim** instead, enable the `indent-blankline` extra
|
||||||
|
- [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) (replaced with [blink](https://github.com/Saghen/blink.cmp))
|
||||||
|
- [nvim-snippets](https://github.com/hrsh7th/vim-vsnip) (replaced with [blink](https://github.com/Saghen/blink.cmp))
|
||||||
|
- [cmp-buffer](https://github.com/hrsh7th/cmp-buffer) (replaced with [blink](https://github.com/Saghen/blink.cmp))
|
||||||
|
- [cmp-nvim-lsp](https://github.com/hrsh7th/cmp-nvim-lsp) (replaced with [blink](https://github.com/Saghen/blink.cmp))
|
||||||
|
- [cmp-path](https://github.com/hrsh7th/cmp-path) (replaced with [blink](https://github.com/Saghen/blink.cmp))
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
|
||||||
|
- added [`snacks.input`](https://github.com/folke/snacks.nvim/blob/main/docs/input.md)
|
||||||
|
- added [`snacks.scroll`](https://github.com/folke/snacks.nvim/blob/main/docs/scroll.md)
|
||||||
|
- added [`snacks.indent`](https://github.com/folke/snacks.nvim/blob/main/docs/indent.md)
|
||||||
|
- added [`snacks.scope`](https://github.com/folke/snacks.nvim/blob/main/docs/scope.md)
|
||||||
|
- added [`snacks.dim`](https://github.com/folke/snacks.nvim/blob/main/docs/dim.md)
|
||||||
|
- added [`snacks.zen`](https://github.com/folke/snacks.nvim/blob/main/docs/zen.md)
|
||||||
|
- changed default [`which-key`](https://github.com/folke/which-key.nvim) preset to `helix`
|
||||||
|
- drop `LazyVim.ui.fg` in favor of [`Snacks.util.color`](https://github.com/folke/snacks.nvim/blob/main/docs/util.md)
|
||||||
|
|
||||||
|
To disable **all animations**, add the following to your `options.lua`:
|
||||||
|
|
||||||
|
```lua
|
||||||
|
vim.g.snacks_animate = false
|
||||||
|
```
|
||||||
|
|
||||||
|
### Keymaps
|
||||||
|
|
||||||
|
- `<leader>uz` to toggle [zen mode](https://github.com/folke/snacks.nvim/blob/main/docs/zen.md)
|
||||||
|
- `<leader>uZ` & `<leader>wm` to toggle [zoom mode](https://github.com/folke/snacks.nvim/blob/main/docs/zen.md)
|
||||||
|
- `<leader>uD` to toggle [dimming](https://github.com/folke/snacks.nvim/blob/main/docs/dim.md)
|
||||||
|
- `<leader>ua` to toggle [animations](https://github.com/folke/snacks.nvim/blob/main/docs/animate.md)
|
||||||
|
- `<leader>uS` to toggle [scroll](https://github.com/folke/snacks.nvim/blob/main/docs/scroll.md)
|
||||||
|
- `<leader>ug` to toggle [indent guides](https://github.com/folke/snacks.nvim/blob/main/docs/indent.md)
|
||||||
|
- [`snacks.profiler`](https://github.com/folke/snacks.nvim/blob/main/docs/profiler.md) keymaps under `<leader>dp`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 13.x
|
## 13.x
|
||||||
|
|
||||||
|
- **LazyVim** now uses `Snacks.dashboard` as the default dashboard.
|
||||||
|
Check the [docs](https://github.com/folke/snacks.nvim/blob/main/docs/dashboard.md),
|
||||||
|
for more information and examples.
|
||||||
|
|
||||||
|
- A new [dashboard-nvim](https://github.com/nvimdev/dashboard-nvim) extra
|
||||||
|
is available for those who prefer the old dashboard.
|
||||||
|
|
||||||
- Big new release with a lot of changes and improvements!
|
- Big new release with a lot of changes and improvements!
|
||||||
|
|
||||||
- The biggest change is the move of a bunch of core features to
|
- The biggest change is the move of a bunch of core features to
|
||||||
|
|
@ -14,6 +94,8 @@
|
||||||
- `Snacks.terminal` is similar to `lazyterm`, but has more features
|
- `Snacks.terminal` is similar to `lazyterm`, but has more features
|
||||||
and creates bottom splits by default (similar to the `edgy` integrating)
|
and creates bottom splits by default (similar to the `edgy` integrating)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 12.x
|
## 12.x
|
||||||
|
|
||||||
- **Markdown Extra**: [headlines.nvim](https://github.com/lukas-reineke/headlines.nvim) has been removed in favor of [markdown.nvim](https://github.com/MeanderingProgrammer/markdown.nvim)
|
- **Markdown Extra**: [headlines.nvim](https://github.com/lukas-reineke/headlines.nvim) has been removed in favor of [markdown.nvim](https://github.com/MeanderingProgrammer/markdown.nvim)
|
||||||
|
|
@ -41,10 +123,11 @@
|
||||||
- moved `neoconf.nvim` to extras. Project specific LSP settings
|
- moved `neoconf.nvim` to extras. Project specific LSP settings
|
||||||
can be done with a `.lazy.lua` file instead.
|
can be done with a `.lazy.lua` file instead.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 11.x
|
## 11.x
|
||||||
|
|
||||||
- **Keymaps:**
|
- **Keymaps:**
|
||||||
|
|
||||||
- `<leader>gB` to open the current repo in the browser
|
- `<leader>gB` to open the current repo in the browser
|
||||||
- `gco` and `gcO` to add a comment below or above the current line
|
- `gco` and `gcO` to add a comment below or above the current line
|
||||||
- `<leader>wm` to toggle window maximize
|
- `<leader>wm` to toggle window maximize
|
||||||
|
|
@ -57,7 +140,6 @@
|
||||||
It's a great plugin that enhances the native text objects.
|
It's a great plugin that enhances the native text objects.
|
||||||
|
|
||||||
- `:LazyExtras` now has multiple new sections:
|
- `:LazyExtras` now has multiple new sections:
|
||||||
|
|
||||||
- **Enabled**: extras that are currently enabled
|
- **Enabled**: extras that are currently enabled
|
||||||
- **Recommended Languages**: language extras recommended for the current buffer / directory
|
- **Recommended Languages**: language extras recommended for the current buffer / directory
|
||||||
- **Recommended Plugins**: extras that are recommended for most users
|
- **Recommended Plugins**: extras that are recommended for most users
|
||||||
|
|
@ -95,11 +177,12 @@ Additionally, some core plugins have been moved to extras.
|
||||||
```
|
```
|
||||||
|
|
||||||
- plugins moved to extras:
|
- plugins moved to extras:
|
||||||
|
|
||||||
- `mini.surround`
|
- `mini.surround`
|
||||||
- `mini.indentscope` scopes are now also highlighted with `indent-blankline`
|
- `mini.indentscope` scopes are now also highlighted with `indent-blankline`
|
||||||
- `nvim-treesitter-context`
|
- `nvim-treesitter-context`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 10.x
|
## 10.x
|
||||||
|
|
||||||
- added new extra for [mini.diff](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-diff.md)
|
- added new extra for [mini.diff](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-diff.md)
|
||||||
|
|
@ -111,7 +194,6 @@ Additionally, some core plugins have been moved to extras.
|
||||||
You can find the updated docs [here](https://github.com/folke/trouble.nvim/tree/dev)
|
You can find the updated docs [here](https://github.com/folke/trouble.nvim/tree/dev)
|
||||||
|
|
||||||
- The **lazygit** integration now configures:
|
- The **lazygit** integration now configures:
|
||||||
|
|
||||||
- the theme based on the colorscheme
|
- the theme based on the colorscheme
|
||||||
- nerd font icons (v3)
|
- nerd font icons (v3)
|
||||||
- editor preset is set to `nvim-remote` for better interop with Neovim
|
- editor preset is set to `nvim-remote` for better interop with Neovim
|
||||||
|
|
@ -152,9 +234,7 @@ Additionally, some core plugins have been moved to extras.
|
||||||
- New `:LazyExtras` command for managing **LazyVim** extras
|
- New `:LazyExtras` command for managing **LazyVim** extras
|
||||||
|
|
||||||
- Improved **formatting**:
|
- Improved **formatting**:
|
||||||
|
|
||||||
- **LazyVim** can now work with multiple formatters. Types:
|
- **LazyVim** can now work with multiple formatters. Types:
|
||||||
|
|
||||||
- **primary**: only one primary formatter can be active at a time.
|
- **primary**: only one primary formatter can be active at a time.
|
||||||
_(conform, none-ls, LSP)_
|
_(conform, none-ls, LSP)_
|
||||||
- **secondary**: multiple secondary formatters can be active _(eslint, ...)_
|
- **secondary**: multiple secondary formatters can be active _(eslint, ...)_
|
||||||
|
|
@ -173,18 +253,15 @@ Additionally, some core plugins have been moved to extras.
|
||||||
```
|
```
|
||||||
|
|
||||||
- `none-ls.nvim` is no longer installed by default
|
- `none-ls.nvim` is no longer installed by default
|
||||||
|
|
||||||
- `conform.nvim` is now the default formatter
|
- `conform.nvim` is now the default formatter
|
||||||
- `nvim-lint` is now the default linter
|
- `nvim-lint` is now the default linter
|
||||||
- If you want to keep using `none-ls.nvim`,
|
- If you want to keep using `none-ls.nvim`,
|
||||||
you can enable the **lsp.none-ls** extra
|
you can enable the **lsp.none-ls** extra
|
||||||
|
|
||||||
- `dashboard.nvim` is the new default dashboard plugin
|
- `dashboard.nvim` is the new default dashboard plugin
|
||||||
|
|
||||||
- If you want to keep using `alpha.nvim`, you can enable the **ui.alpha** extra
|
- If you want to keep using `alpha.nvim`, you can enable the **ui.alpha** extra
|
||||||
|
|
||||||
- Improved **root detection**:
|
- Improved **root detection**:
|
||||||
|
|
||||||
- New `:LazyRoot` command that shows info about the root dir detection
|
- New `:LazyRoot` command that shows info about the root dir detection
|
||||||
- Configurable with `vim.g.root_spec`
|
- Configurable with `vim.g.root_spec`
|
||||||
|
|
||||||
|
|
|
||||||
51
README-CN.md
51
README-CN.md
|
|
@ -36,9 +36,9 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
LazyVim 是由 [💤 lazy.nvim](https://github.com/folke/lazy.nvim) 驱动的一套 Neovim 配置,可以轻松自定义和扩展您的配置。
|
LazyVim 是一个基于 [💤 lazy.nvim](https://github.com/folke/lazy.nvim) 的 Neovim 配置方案,让定制和扩展变得简单直观。
|
||||||
不必在从头开始或使用预制发行版之间做选择,
|
您不必再在“从零配置”和“使用预制发行版”之间做选择,LazyVim
|
||||||
LazyVim 提供了两全其美的方式 - 根据需要调整配置的灵活性,以及默认预配置的便利性。
|
提供了一个两全其美的方式——既可以享受默认配置带来的便利,又能根据个人需求来灵活调整各项设置。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
@ -46,28 +46,28 @@ LazyVim 提供了两全其美的方式 - 根据需要调整配置的灵活性,
|
||||||
|
|
||||||
## ✨ 特性
|
## ✨ 特性
|
||||||
|
|
||||||
- 🔥 将你的 Neovim 变成一个成熟的 IDE
|
- 🔥 将你的 Neovim 打造为一个功能完备的 IDE
|
||||||
- 💤 使用 [lazy.nvim](https://github.com/folke/lazy.nvim) 轻松自定义和扩展您的配置
|
- 💤 使用 [lazy.nvim](https://github.com/folke/lazy.nvim) 轻松自定义和扩展您的设置
|
||||||
- 🚀 快如闪电
|
- 🚀 快如闪电
|
||||||
- 🧹 选项、自动命令和键盘映射的合理预设
|
- 🧹 选项、自动命令和键盘映射的合理预设
|
||||||
- 📦 预配置了大量插件,随时可用
|
- 📦 内置大量精心优化的预配置插件,开箱即用
|
||||||
|
|
||||||
## ⚡️ 要求
|
## ⚡️ 环境要求
|
||||||
|
|
||||||
- Neovim >= **0.9.0** (需要用 **LuaJIT** 构建)
|
- Neovim >= **0.11.2** (需要用 **LuaJIT** 构建)
|
||||||
- Git >= **2.19.0** (用于部分克隆支持)
|
- Git >= **2.19.0** (用于部分克隆支持)
|
||||||
- 一个 [Nerd Font](https://www.nerdfonts.com/) 字体 **_(可选)_**
|
- 一个 [Nerd Font](https://www.nerdfonts.com/) 字体 **_(可选)_**
|
||||||
- 一个用于 `nvim-treesitter` 的 **C** 编译器。看 [这里](https://github.com/nvim-treesitter/nvim-treesitter#requirements)
|
- 一个用于 `nvim-treesitter` 的 **C** 编译器。看 [这里](https://github.com/nvim-treesitter/nvim-treesitter#requirements)
|
||||||
|
|
||||||
## 🚀 入门
|
## 🚀 开始使用
|
||||||
|
|
||||||
您可以在 [此处](https://github.com/LazyVim/starter) 找到 **LazyVim** 的入门模板
|
您可以在 [此处](https://github.com/LazyVim/starter) 找到 **LazyVim** 的初始模板
|
||||||
|
|
||||||
<details><summary>在 Docker 中尝试</summary>
|
<details><summary>在 Docker 中尝鲜</summary>
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker run -w /root -it --rm alpine:edge sh -uelic '
|
docker run -w /root -it --rm alpine:edge sh -uelic '
|
||||||
apk add git lazygit neovim ripgrep alpine-sdk --update
|
apk add git lazygit fzf curl neovim ripgrep alpine-sdk --update
|
||||||
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
||||||
cd ~/.config/nvim
|
cd ~/.config/nvim
|
||||||
nvim
|
nvim
|
||||||
|
|
@ -91,7 +91,7 @@ docker run -w /root -it --rm alpine:edge sh -uelic '
|
||||||
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
||||||
```
|
```
|
||||||
|
|
||||||
- 删除 `.git` 文件夹,以便稍后将其添加到您自己的存储库
|
- 删除 `.git` 文件夹,以便稍后将其添加到您自己的仓库
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
rm -rf ~/.config/nvim/.git
|
rm -rf ~/.config/nvim/.git
|
||||||
|
|
@ -109,22 +109,23 @@ docker run -w /root -it --rm alpine:edge sh -uelic '
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
[@elijahmanor](https://github.com/elijahmanor) 制作了一段很棒的视频,其中包含入门演练。
|
[@elijahmanor](https://github.com/elijahmanor) 制作了一个很棒的视频,可以带领你快速入门。
|
||||||
|
|
||||||
[](https://www.youtube.com/watch?v=N93cTbtLCIM)
|
[](https://www.youtube.com/watch?v=N93cTbtLCIM)
|
||||||
|
|
||||||
[@dusty-phillips](https://github.com/dusty-phillips) 正在编写一本名为
|
[@dusty-phillips](https://github.com/dusty-phillips) 为 LazyVim 编写了一本全面的书籍
|
||||||
[LazyVim for Ambitious Developers](https://lazyvim-ambitious-devs.phillips.codes)
|
[《LazyVim for Ambitious Developers》](https://lazyvim-ambitious-devs.phillips.codes)
|
||||||
的书,该书可在线免费获得。
|
,可在线上免费阅读。
|
||||||
|
|
||||||
## 📂 文件结构
|
## 📂 文件结构
|
||||||
|
|
||||||
config 下的文件会在适当的时候自动加载,所以你不需要手动引入这些文件。
|
config 下的文件会在适当的时候被自动加载,所以你不需要手动引入这些文件。
|
||||||
**LazyVim** 带有一组默认配置文件,这些文件将在您的配置**之前**加载。
|
|
||||||
看[这里](https://github.com/LazyVim/LazyVim/tree/main/lua/lazyvim/config)
|
|
||||||
|
|
||||||
您可以在 `lua/plugins/` 下添加自定义插件配置(specs)。
|
**LazyVim** 带有一组默认配置文件,这些文件会在您的配置**之前**被加载。
|
||||||
[lazy.nvim](https://github.com/folke/lazy.nvim) 会自动加载这些文件。
|
请看[这里](https://github.com/LazyVim/LazyVim/tree/main/lua/lazyvim/config)
|
||||||
|
|
||||||
|
您可以在 `lua/plugins/` 下添加自定义插件配置。
|
||||||
|
[lazy.nvim](https://github.com/folke/lazy.nvim) 会自动加载此目录中的全部文件。
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
~/.config/nvim
|
~/.config/nvim
|
||||||
|
|
@ -141,6 +142,6 @@ config 下的文件会在适当的时候自动加载,所以你不需要手动
|
||||||
└── init.lua
|
└── init.lua
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
## ⚙️ Configuration
|
## ⚙️ 设置
|
||||||
|
|
||||||
参考[文档](https://lazyvim.github.io/)
|
请参阅[官方文档](https://lazyvim.github.io/)
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ und die Einfachheit von einem vorgefertigten Setup.
|
||||||
|
|
||||||
## ⚡️ Vorraussetzungen
|
## ⚡️ Vorraussetzungen
|
||||||
|
|
||||||
- Neovim >= **0.8.0** (gebraucht um mit **LuaJIT** zu bauen)
|
- Neovim >= **0.11.2** (gebraucht um mit **LuaJIT** zu bauen)
|
||||||
- Git >= **2.19.0** (um Teil-Klone zu unterstützen)
|
- Git >= **2.19.0** (um Teil-Klone zu unterstützen)
|
||||||
- eine [Nerd Font](https://www.nerdfonts.com/) **_(optional)_**
|
- eine [Nerd Font](https://www.nerdfonts.com/) **_(optional)_**
|
||||||
|
|
||||||
|
|
@ -68,7 +68,7 @@ Sie können eine Startvorlage für **LazyVim** [hier](https://github.com/LazyVim
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker run -w /root -it --rm alpine:edge sh -uelic '
|
docker run -w /root -it --rm alpine:edge sh -uelic '
|
||||||
apk add git lazygit neovim ripgrep alpine-sdk --update
|
apk add git lazygit fzf curl neovim ripgrep alpine-sdk --update
|
||||||
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
||||||
cd ~/.config/nvim
|
cd ~/.config/nvim
|
||||||
nvim
|
nvim
|
||||||
|
|
|
||||||
145
README-ES.md
Normal file
145
README-ES.md
Normal file
|
|
@ -0,0 +1,145 @@
|
||||||
|
<div align="center">
|
||||||
|
<img src="https://user-images.githubusercontent.com/292349/213446185-2db63fd5-8c84-459c-9f04-e286382d6e80.png">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<h4 align="center">
|
||||||
|
<a href="https://lazyvim.github.io/installation">Instalar</a>
|
||||||
|
·
|
||||||
|
<a href="https://lazyvim.github.io/configuration">Configurar</a>
|
||||||
|
·
|
||||||
|
<a href="https://lazyvim.github.io">Documentación</a>
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
<div align="center"><p>
|
||||||
|
<a href="https://github.com/LazyVim/LazyVim/releases/latest">
|
||||||
|
<img alt="Última versión" src="https://img.shields.io/github/v/release/LazyVim/LazyVim?style=for-the-badge&logo=starship&color=C9CBFF&logoColor=D9E0EE&labelColor=302D41&include_prerelease&sort=semver" />
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/LazyVim/LazyVim/pulse">
|
||||||
|
<img alt="Último commit" src="https://img.shields.io/github/last-commit/LazyVim/LazyVim?style=for-the-badge&logo=starship&color=8bd5ca&logoColor=D9E0EE&labelColor=302D41"/>
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/LazyVim/LazyVim/blob/main/LICENSE">
|
||||||
|
<img alt="Licencia" src="https://img.shields.io/github/license/LazyVim/LazyVim?style=for-the-badge&logo=starship&color=ee999f&logoColor=D9E0EE&labelColor=302D41" />
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/LazyVim/LazyVim/stargazers">
|
||||||
|
<img alt="Estrellas" src="https://img.shields.io/github/stars/LazyVim/LazyVim?style=for-the-badge&logo=starship&color=c69ff5&logoColor=D9E0EE&labelColor=302D41" />
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/LazyVim/LazyVim/issues">
|
||||||
|
<img alt="Problemas" src="https://img.shields.io/github/issues/LazyVim/LazyVim?style=for-the-badge&logo=bilibili&color=F5E0DC&logoColor=D9E0EE&labelColor=302D41" />
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/LazyVim/LazyVim">
|
||||||
|
<img alt="Tamaño del repositorio" src="https://img.shields.io/github/repo-size/LazyVim/LazyVim?color=%23DDB6F2&label=SIZE&logo=codesandbox&style=for-the-badge&logoColor=D9E0EE&labelColor=302D41" />
|
||||||
|
</a>
|
||||||
|
<a href="https://twitter.com/intent/follow?screen_name=folke">
|
||||||
|
<img alt="seguir en Twitter" src="https://img.shields.io/twitter/follow/folke?style=for-the-badge&logo=twitter&color=8aadf3&logoColor=D9E0EE&labelColor=302D41" />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
LazyVim es una configuración de Neovim impulsada por [💤 lazy.nvim](https://github.com/folke/lazy.nvim) que facilita la personalización y extensión de tu configuración. En lugar de tener que elegir entre comenzar desde cero o usar una distribución predefinida, LazyVim ofrece lo mejor de ambos mundos: la flexibilidad para ajustar tu configuración según sea necesario, junto con la conveniencia de una configuración preconfigurada.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## ✨ Características
|
||||||
|
|
||||||
|
- 🔥 Convierte tu Neovim en un IDE completo
|
||||||
|
- 💤 Personaliza y extiende fácilmente tu configuración con [lazy.nvim](https://github.com/folke/lazy.nvim)
|
||||||
|
- 🚀 Extremadamente rápido
|
||||||
|
- 🧹 Ajustes predeterminados sensatos para opciones, autocmds y combinaciones de teclas
|
||||||
|
- 📦 Viene con una gran cantidad de plugins preconfigurados y listos para usar
|
||||||
|
|
||||||
|
## ⚡️ Requisitos
|
||||||
|
|
||||||
|
- Neovim >= **0.11.2** (debe ser compilado con **LuaJIT**)
|
||||||
|
- Git >= **2.19.0** (para soporte de clones parciales)
|
||||||
|
- una [Fuente Nerd](https://www.nerdfonts.com/) **_(opcional)_**
|
||||||
|
- un compilador **C** para `nvim-treesitter`. Consulta [aquí](https://github.com/nvim-treesitter/nvim-treesitter#requirements)
|
||||||
|
|
||||||
|
## 🚀 Empezando
|
||||||
|
|
||||||
|
Puedes encontrar una plantilla de inicio para **LazyVim** [aquí](https://github.com/LazyVim/starter)
|
||||||
|
|
||||||
|
<details><summary>Probarlo con Docker</summary>
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker run -w /root -it --rm alpine:edge sh -uelic '
|
||||||
|
apk add git lazygit fzf curl neovim ripgrep alpine-sdk --update
|
||||||
|
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
||||||
|
cd ~/.config/nvim
|
||||||
|
nvim
|
||||||
|
'
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details><summary>Instalar el <a href="https://github.com/LazyVim/starter">LazyVim Starter</a></summary>
|
||||||
|
|
||||||
|
- Haz una copia de seguridad de tus archivos actuales de Neovim:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
mv ~/.config/nvim ~/.config/nvim.bak
|
||||||
|
mv ~/.local/share/nvim ~/.local/share/nvim.bak
|
||||||
|
```
|
||||||
|
|
||||||
|
- Clona el starter
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
||||||
|
```
|
||||||
|
|
||||||
|
- Elimina la carpeta `.git`, para que puedas agregarla a tu propio repositorio más tarde
|
||||||
|
|
||||||
|
```sh
|
||||||
|
rm -rf ~/.config/nvim/.git
|
||||||
|
```
|
||||||
|
|
||||||
|
- ¡Inicia Neovim!
|
||||||
|
|
||||||
|
```sh
|
||||||
|
nvim
|
||||||
|
```
|
||||||
|
|
||||||
|
Consulta los comentarios en los archivos sobre cómo personalizar **LazyVim**.
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Hay un excelente video creado por [@elijahmanor](https://github.com/elijahmanor) con una guía para empezar.
|
||||||
|
|
||||||
|
[](https://www.youtube.com/watch?v=N93cTbtLCIM)
|
||||||
|
|
||||||
|
[@dusty-phillips](https://github.com/dusty-phillips) escribió un libro completo llamado
|
||||||
|
[LazyVim para Desarrolladores Ambiciosos](https://lazyvim-ambitious-devs.phillips.codes)
|
||||||
|
disponible de forma gratuita en línea.
|
||||||
|
|
||||||
|
## 📂 Estructura de Archivos
|
||||||
|
|
||||||
|
Los archivos dentro de la configuración se cargarán automáticamente en el momento adecuado,
|
||||||
|
por lo que no necesitas requerir esos archivos manualmente.
|
||||||
|
**LazyVim** viene con un conjunto de archivos de configuración predeterminados que se cargarán
|
||||||
|
**_antes_** que los tuyos. Consulta [aquí](https://github.com/LazyVim/LazyVim/tree/main/lua/lazyvim/config)
|
||||||
|
|
||||||
|
Puedes agregar tus especificaciones de plugins personalizadas en `lua/plugins/`. Todos los archivos allí
|
||||||
|
serán cargados automáticamente por [lazy.nvim](https://github.com/folke/lazy.nvim)
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
~/.config/nvim
|
||||||
|
├── lua
|
||||||
|
│ ├── config
|
||||||
|
│ │ ├── autocmds.lua
|
||||||
|
│ │ ├── keymaps.lua
|
||||||
|
│ │ ├── lazy.lua
|
||||||
|
│ │ └── options.lua
|
||||||
|
│ └── plugins
|
||||||
|
│ ├── spec1.lua
|
||||||
|
│ ├── **
|
||||||
|
│ └── spec2.lua
|
||||||
|
└── init.lua
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
## ⚙️ Configuración
|
||||||
|
|
||||||
|
Consulta la [documentación](https://lazyvim.github.io)
|
||||||
150
README-IT.md
Normal file
150
README-IT.md
Normal file
|
|
@ -0,0 +1,150 @@
|
||||||
|
<div align="center">
|
||||||
|
<img src="https://user-images.githubusercontent.com/292349/213446185-2db63fd5-8c84-459c-9f04-e286382d6e80.png">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<h4 align="center">
|
||||||
|
<a href="https://lazyvim.github.io/installation">Installazione</a>
|
||||||
|
·
|
||||||
|
<a href="https://lazyvim.github.io/configuration">Configurazione</a>
|
||||||
|
·
|
||||||
|
<a href="https://lazyvim.github.io">Documentazione</a>
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
<div align="center"><p>
|
||||||
|
<a href="https://github.com/LazyVim/LazyVim/releases/latest">
|
||||||
|
<img alt="Latest release" src="https://img.shields.io/github/v/release/LazyVim/LazyVim?style=for-the-badge&logo=starship&color=C9CBFF&logoColor=D9E0EE&labelColor=302D41&include_prerelease&sort=semver" />
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/LazyVim/LazyVim/pulse">
|
||||||
|
<img alt="Last commit" src="https://img.shields.io/github/last-commit/LazyVim/LazyVim?style=for-the-badge&logo=starship&color=8bd5ca&logoColor=D9E0EE&labelColor=302D41"/>
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/LazyVim/LazyVim/blob/main/LICENSE">
|
||||||
|
<img alt="License" src="https://img.shields.io/github/license/LazyVim/LazyVim?style=for-the-badge&logo=starship&color=ee999f&logoColor=D9E0EE&labelColor=302D41" />
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/LazyVim/LazyVim/stargazers">
|
||||||
|
<img alt="Stars" src="https://img.shields.io/github/stars/LazyVim/LazyVim?style=for-the-badge&logo=starship&color=c69ff5&logoColor=D9E0EE&labelColor=302D41" />
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/LazyVim/LazyVim/issues">
|
||||||
|
<img alt="Issues" src="https://img.shields.io/github/issues/LazyVim/LazyVim?style=for-the-badge&logo=bilibili&color=F5E0DC&logoColor=D9E0EE&labelColor=302D41" />
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/LazyVim/LazyVim">
|
||||||
|
<img alt="Repo Size" src="https://img.shields.io/github/repo-size/LazyVim/LazyVim?color=%23DDB6F2&label=SIZE&logo=codesandbox&style=for-the-badge&logoColor=D9E0EE&labelColor=302D41" />
|
||||||
|
</a>
|
||||||
|
<a href="https://twitter.com/intent/follow?screen_name=folke">
|
||||||
|
<img alt="follow on Twitter" src="https://img.shields.io/twitter/follow/folke?style=for-the-badge&logo=twitter&color=8aadf3&logoColor=D9E0EE&labelColor=302D41" />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
LazyVim è una configurazione di Neovim basata su [💤 lazy.nvim](https://github.com/folke/lazy.nvim)
|
||||||
|
che rende semplice personalizzare ed estendere la tua configurazione.
|
||||||
|
Piuttosto che dover scegliere tra partire da zero o utilizzare una
|
||||||
|
distribuzione preconfigurata, LazyVim offre il meglio di entrambi i mondi:
|
||||||
|
la flessibilità di modificare la tua configurazione come necessario,
|
||||||
|
insieme alla comodità di un setup preconfigurato.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## ✨ Caratteristiche
|
||||||
|
|
||||||
|
- 🔥 Trasforma il tuo Neovim in un IDE completo
|
||||||
|
- 💤 Personalizza ed estendi facilmente la tua configurazione con [lazy.nvim](https://github.com/folke/lazy.nvim)
|
||||||
|
- 🚀 Estremamente veloce
|
||||||
|
- 🧹 Impostazioni di default ottimizzate per opzioni, AutoCmd e scorciatoie da tastiera
|
||||||
|
- 📦 Distribuito con una vasta gamma di plugin preconfigurati e pronti all'uso
|
||||||
|
|
||||||
|
## ⚡️ Requisiti
|
||||||
|
|
||||||
|
- Neovim >= **0.11.2** (deve essere compilato con **LuaJIT**)
|
||||||
|
- Git >= **2.19.0** (per supportare cloni parziali)
|
||||||
|
- a [Nerd Font](https://www.nerdfonts.com/) **_(opzionale)_**
|
||||||
|
- un compilatore **C** per `nvim-treesitter`. Leggi [qui](https://github.com/nvim-treesitter/nvim-treesitter#requirements)
|
||||||
|
|
||||||
|
## 🚀 Per iniziare
|
||||||
|
|
||||||
|
Puoi trovare un template per **LazyVim** [qui](https://github.com/LazyVim/starter)
|
||||||
|
|
||||||
|
<details><summary>Provalo con Docker</summary>
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker run -w /root -it --rm alpine:edge sh -uelic '
|
||||||
|
apk add git lazygit fzf curl neovim ripgrep alpine-sdk --update
|
||||||
|
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
||||||
|
cd ~/.config/nvim
|
||||||
|
nvim
|
||||||
|
'
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details><summary>Installa il <a href="https://github.com/LazyVim/starter">LazyVim Starter</a></summary>
|
||||||
|
|
||||||
|
- Fai un backup dei tuoi file di Neovim attuali:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
mv ~/.config/nvim ~/.config/nvim.bak
|
||||||
|
mv ~/.local/share/nvim ~/.local/share/nvim.bak
|
||||||
|
```
|
||||||
|
|
||||||
|
- Clona lo Starter
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
||||||
|
```
|
||||||
|
|
||||||
|
- Rimuovi la cartella `.git`, così puoi aggiungerla al tuo repo in seguito
|
||||||
|
|
||||||
|
```sh
|
||||||
|
rm -rf ~/.config/nvim/.git
|
||||||
|
```
|
||||||
|
|
||||||
|
- Avvia Neovim!
|
||||||
|
|
||||||
|
```sh
|
||||||
|
nvim
|
||||||
|
```
|
||||||
|
|
||||||
|
Consulta i commenti nei file su come personalizzare **LazyVim**.
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Qui un video creato da [@elijahmanor](https://github.com/elijahmanor) con una guida per iniziare.
|
||||||
|
|
||||||
|
[](https://www.youtube.com/watch?v=N93cTbtLCIM)
|
||||||
|
|
||||||
|
[@dusty-phillips](https://github.com/dusty-phillips) ha scritto un libro comprensivo chiamato
|
||||||
|
[LazyVim per Sviluppatori Ambiziosi](https://lazyvim-ambitious-devs.phillips.codes)
|
||||||
|
che è disponibile gratuitamente online.
|
||||||
|
|
||||||
|
## 📂 Struttura dei file
|
||||||
|
|
||||||
|
I file presenti nella configurazione verranno caricati automaticamente al momento
|
||||||
|
più opportuno, quindi non è necessario richiamare manualmente quei file.
|
||||||
|
**LazyVim** ha un set di configurazioni predefinite che verranno caricate
|
||||||
|
prima delle tue. Vedi [qui](https://github.com/LazyVim/LazyVim/tree/main/lua/lazyvim/config)
|
||||||
|
|
||||||
|
Puoi aggiungere i tuoi plugin personalizzati sotto `lua/plugins/`. Tutti
|
||||||
|
i file presenti verranno automaticamente caricati da [lazy.nvim](https://github.com/folke/lazy.nvim)
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
~/.config/nvim
|
||||||
|
├── lua
|
||||||
|
│ ├── config
|
||||||
|
│ │ ├── autocmds.lua
|
||||||
|
│ │ ├── keymaps.lua
|
||||||
|
│ │ ├── lazy.lua
|
||||||
|
│ │ └── options.lua
|
||||||
|
│ └── plugins
|
||||||
|
│ ├── spec1.lua
|
||||||
|
│ ├── **
|
||||||
|
│ └── spec2.lua
|
||||||
|
└── init.lua
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
## ⚙️ Configurazione
|
||||||
|
|
||||||
|
Consulta la [documentazione](https://lazyvim.github.io)
|
||||||
|
|
@ -54,7 +54,7 @@ LazyVimは、ゼロから始めるか、あらかじめ作成されたディス
|
||||||
|
|
||||||
## ⚡️ 必要要件
|
## ⚡️ 必要要件
|
||||||
|
|
||||||
- Neovim >= **0.9.0** (**LuaJIT**でビルドされている必要があります)
|
- Neovim >= **0.11.2** (**LuaJIT**でビルドされている必要があります)
|
||||||
- Git >= **2.19.0** (部分的なcloneサポートのため)
|
- Git >= **2.19.0** (部分的なcloneサポートのため)
|
||||||
- [Nerd Font](https://www.nerdfonts.com/) **_(任意)_**
|
- [Nerd Font](https://www.nerdfonts.com/) **_(任意)_**
|
||||||
- `nvim-treesitter`用の**C**コンパイラ。詳細は[こちら](https://github.com/nvim-treesitter/nvim-treesitter#requirements)
|
- `nvim-treesitter`用の**C**コンパイラ。詳細は[こちら](https://github.com/nvim-treesitter/nvim-treesitter#requirements)
|
||||||
|
|
@ -67,7 +67,7 @@ LazyVimは、ゼロから始めるか、あらかじめ作成されたディス
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker run -w /root -it --rm alpine:edge sh -uelic '
|
docker run -w /root -it --rm alpine:edge sh -uelic '
|
||||||
apk add git lazygit neovim ripgrep alpine-sdk --update
|
apk add git lazygit fzf curl neovim ripgrep alpine-sdk --update
|
||||||
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
||||||
cd ~/.config/nvim
|
cd ~/.config/nvim
|
||||||
nvim
|
nvim
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ LazyVim은 [💤 lazy.nvim](https://github.com/folke/lazy.nvim)를 기반으로
|
||||||
|
|
||||||
## ⚡️ 요구사항
|
## ⚡️ 요구사항
|
||||||
|
|
||||||
- **0.9.0**이상의 Neovim (LuaJIT과 함께 개발이 되어져있어야함니다.)
|
- **0.11.2**이상의 Neovim (LuaJIT과 함께 개발이 되어져있어야함니다.)
|
||||||
- **2.19.0**이상의 Git (이것은 부분적인 클론기능을 지원하기 위함입니다.)
|
- **2.19.0**이상의 Git (이것은 부분적인 클론기능을 지원하기 위함입니다.)
|
||||||
- [Nerd Font](https://www.nerdfonts.com/) **_(옵션)_**
|
- [Nerd Font](https://www.nerdfonts.com/) **_(옵션)_**
|
||||||
- `nvim-treesitter`를 위한 **C** 컴파일러. [이 문서](https://github.com/nvim-treesitter/nvim-treesitter#requirements)를 확인해주시기바랍니다.
|
- `nvim-treesitter`를 위한 **C** 컴파일러. [이 문서](https://github.com/nvim-treesitter/nvim-treesitter#requirements)를 확인해주시기바랍니다.
|
||||||
|
|
@ -65,7 +65,7 @@ LazyVim은 [💤 lazy.nvim](https://github.com/folke/lazy.nvim)를 기반으로
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker run -w /root -it --rm alpine:edge sh -uelic '
|
docker run -w /root -it --rm alpine:edge sh -uelic '
|
||||||
apk add git lazygit neovim ripgrep alpine-sdk --update
|
apk add git lazygit fzf curl neovim ripgrep alpine-sdk --update
|
||||||
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
||||||
cd ~/.config/nvim
|
cd ~/.config/nvim
|
||||||
nvim
|
nvim
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ como necessário, junto com a conveniência de um setup pré-configurado.
|
||||||
|
|
||||||
## ⚡️ Requesitos
|
## ⚡️ Requesitos
|
||||||
|
|
||||||
- Neovim >= **0.9.0** (preciso fazer build com **LuaJIT**)
|
- Neovim >= **0.11.2** (preciso fazer build com **LuaJIT**)
|
||||||
- Git >= **2.19.0** (para suporte parcial de clones)
|
- Git >= **2.19.0** (para suporte parcial de clones)
|
||||||
- uma [Nerd Font](https://www.nerdfonts.com/) **_(opcional)_**
|
- uma [Nerd Font](https://www.nerdfonts.com/) **_(opcional)_**
|
||||||
- um compilador de **C** para `nvim-treesitter`. Mais informações [aqui](https://github.com/nvim-treesitter/nvim-treesitter#requirements)
|
- um compilador de **C** para `nvim-treesitter`. Mais informações [aqui](https://github.com/nvim-treesitter/nvim-treesitter#requirements)
|
||||||
|
|
@ -70,7 +70,7 @@ Podes encontrar uma template **LazyVim** starter para começar, [aqui](https://g
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker run -w /root -it --rm alpine:edge sh -uelic '
|
docker run -w /root -it --rm alpine:edge sh -uelic '
|
||||||
apk add git lazygit neovim ripgrep alpine-sdk --update
|
apk add git lazygit fzf curl neovim ripgrep alpine-sdk --update
|
||||||
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
||||||
cd ~/.config/nvim
|
cd ~/.config/nvim
|
||||||
nvim
|
nvim
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ to tweak your config as needed, along with the convenience of a pre-configured s
|
||||||
|
|
||||||
## ⚡️ Requirements
|
## ⚡️ Requirements
|
||||||
|
|
||||||
- Neovim >= **0.9.0** (needs to be built with **LuaJIT**)
|
- Neovim >= **0.11.2** (needs to be built with **LuaJIT**)
|
||||||
- Git >= **2.19.0** (for partial clones support)
|
- Git >= **2.19.0** (for partial clones support)
|
||||||
- a [Nerd Font](https://www.nerdfonts.com/) **_(optional)_**
|
- a [Nerd Font](https://www.nerdfonts.com/) **_(optional)_**
|
||||||
- a **C** compiler for `nvim-treesitter`. See [here](https://github.com/nvim-treesitter/nvim-treesitter#requirements)
|
- a **C** compiler for `nvim-treesitter`. See [here](https://github.com/nvim-treesitter/nvim-treesitter#requirements)
|
||||||
|
|
@ -69,7 +69,7 @@ You can find a starter template for **LazyVim** [here](https://github.com/LazyVi
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker run -w /root -it --rm alpine:edge sh -uelic '
|
docker run -w /root -it --rm alpine:edge sh -uelic '
|
||||||
apk add git lazygit neovim ripgrep alpine-sdk --update
|
apk add git lazygit fzf curl neovim ripgrep alpine-sdk --update
|
||||||
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
||||||
cd ~/.config/nvim
|
cd ~/.config/nvim
|
||||||
nvim
|
nvim
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
*LazyVim.txt* For Neovim Last change: 2024 November 08
|
*LazyVim.txt* For Neovim Last change: 2025 October 11
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
Table of Contents *LazyVim-table-of-contents*
|
Table of Contents *LazyVim-table-of-contents*
|
||||||
|
|
@ -53,7 +53,7 @@ FEATURES *LazyVim-features*
|
||||||
|
|
||||||
REQUIREMENTS *LazyVim-requirements*
|
REQUIREMENTS *LazyVim-requirements*
|
||||||
|
|
||||||
- Neovim >= **0.9.0** (needs to be built with **LuaJIT**)
|
- Neovim >= **0.11.2** (needs to be built with **LuaJIT**)
|
||||||
- Git >= **2.19.0** (for partial clones support)
|
- Git >= **2.19.0** (for partial clones support)
|
||||||
- a Nerd Font <https://www.nerdfonts.com/> **(optional)**
|
- a Nerd Font <https://www.nerdfonts.com/> **(optional)**
|
||||||
- a **C** compiler for `nvim-treesitter`. See here <https://github.com/nvim-treesitter/nvim-treesitter#requirements>
|
- a **C** compiler for `nvim-treesitter`. See here <https://github.com/nvim-treesitter/nvim-treesitter#requirements>
|
||||||
|
|
@ -68,7 +68,7 @@ Try it with Docker ~
|
||||||
|
|
||||||
>sh
|
>sh
|
||||||
docker run -w /root -it --rm alpine:edge sh -uelic '
|
docker run -w /root -it --rm alpine:edge sh -uelic '
|
||||||
apk add git lazygit neovim ripgrep alpine-sdk --update
|
apk add git lazygit fzf curl neovim ripgrep alpine-sdk --update
|
||||||
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
||||||
cd ~/.config/nvim
|
cd ~/.config/nvim
|
||||||
nvim
|
nvim
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,6 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||||
"neotest-summary",
|
"neotest-summary",
|
||||||
"notify",
|
"notify",
|
||||||
"qf",
|
"qf",
|
||||||
"snacks_win",
|
|
||||||
"spectre_panel",
|
"spectre_panel",
|
||||||
"startuptime",
|
"startuptime",
|
||||||
"tsplayground",
|
"tsplayground",
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util")
|
||||||
---@class LazyVimConfig: LazyVimOptions
|
---@class LazyVimConfig: LazyVimOptions
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.version = "13.0.0" -- x-release-please-version
|
M.version = "15.7.1" -- x-release-please-version
|
||||||
LazyVim.config = M
|
LazyVim.config = M
|
||||||
|
|
||||||
---@class LazyVimOptions
|
---@class LazyVimOptions
|
||||||
|
|
@ -85,9 +85,10 @@ local defaults = {
|
||||||
Package = " ",
|
Package = " ",
|
||||||
Property = " ",
|
Property = " ",
|
||||||
Reference = " ",
|
Reference = " ",
|
||||||
Snippet = " ",
|
Snippet = " ",
|
||||||
String = " ",
|
String = " ",
|
||||||
Struct = " ",
|
Struct = " ",
|
||||||
|
Supermaven = " ",
|
||||||
TabNine = " ",
|
TabNine = " ",
|
||||||
Text = " ",
|
Text = " ",
|
||||||
TypeParameter = " ",
|
TypeParameter = " ",
|
||||||
|
|
@ -135,16 +136,19 @@ local defaults = {
|
||||||
}
|
}
|
||||||
|
|
||||||
M.json = {
|
M.json = {
|
||||||
version = 6,
|
version = 8,
|
||||||
|
loaded = false,
|
||||||
path = vim.g.lazyvim_json or vim.fn.stdpath("config") .. "/lazyvim.json",
|
path = vim.g.lazyvim_json or vim.fn.stdpath("config") .. "/lazyvim.json",
|
||||||
data = {
|
data = {
|
||||||
version = nil, ---@type string?
|
version = nil, ---@type number?
|
||||||
|
install_version = nil, ---@type number?
|
||||||
news = {}, ---@type table<string, string>
|
news = {}, ---@type table<string, string>
|
||||||
extras = {}, ---@type string[]
|
extras = {}, ---@type string[]
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
function M.json.load()
|
function M.json.load()
|
||||||
|
M.json.loaded = true
|
||||||
local f = io.open(M.json.path, "r")
|
local f = io.open(M.json.path, "r")
|
||||||
if f then
|
if f then
|
||||||
local data = f:read("*a")
|
local data = f:read("*a")
|
||||||
|
|
@ -156,6 +160,8 @@ function M.json.load()
|
||||||
LazyVim.json.migrate()
|
LazyVim.json.migrate()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
M.json.data.install_version = M.json.version
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -205,6 +211,37 @@ function M.setup(opts)
|
||||||
"desc",
|
"desc",
|
||||||
"vscode",
|
"vscode",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if vim.g.lazyvim_check_order == false then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Check lazy.nvim import order
|
||||||
|
local imports = require("lazy.core.config").spec.modules
|
||||||
|
local function find(pat, last)
|
||||||
|
for i = last and #imports or 1, last and 1 or #imports, last and -1 or 1 do
|
||||||
|
if imports[i]:find(pat) then
|
||||||
|
return i
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local lazyvim_plugins = find("^lazyvim%.plugins$")
|
||||||
|
local extras = find("^lazyvim%.plugins%.extras%.", true) or lazyvim_plugins
|
||||||
|
local plugins = find("^plugins$") or math.huge
|
||||||
|
if lazyvim_plugins ~= 1 or extras > plugins then
|
||||||
|
local msg = {
|
||||||
|
"The order of your `lazy.nvim` imports is incorrect:",
|
||||||
|
"- `lazyvim.plugins` should be first",
|
||||||
|
"- followed by any `lazyvim.plugins.extras`",
|
||||||
|
"- and finally your own `plugins`",
|
||||||
|
"",
|
||||||
|
"If you think you know what you're doing, you can disable this check with:",
|
||||||
|
"```lua",
|
||||||
|
"vim.g.lazyvim_check_order = false",
|
||||||
|
"```",
|
||||||
|
}
|
||||||
|
vim.notify(table.concat(msg, "\n"), "warn", { title = "LazyVim" })
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -267,6 +304,8 @@ function M.load(name)
|
||||||
end
|
end
|
||||||
|
|
||||||
M.did_init = false
|
M.did_init = false
|
||||||
|
M._options = {} ---@type vim.wo|vim.bo
|
||||||
|
|
||||||
function M.init()
|
function M.init()
|
||||||
if M.did_init then
|
if M.did_init then
|
||||||
return
|
return
|
||||||
|
|
@ -289,8 +328,14 @@ function M.init()
|
||||||
-- this is needed to make sure options will be correctly applied
|
-- this is needed to make sure options will be correctly applied
|
||||||
-- after installing missing plugins
|
-- after installing missing plugins
|
||||||
M.load("options")
|
M.load("options")
|
||||||
|
|
||||||
|
-- save some options to track defaults
|
||||||
|
M._options.indentexpr = vim.o.indentexpr
|
||||||
|
M._options.foldmethod = vim.o.foldmethod
|
||||||
|
M._options.foldexpr = vim.o.foldexpr
|
||||||
|
|
||||||
-- defer built-in clipboard handling: "xsel" and "pbcopy" can be slow
|
-- defer built-in clipboard handling: "xsel" and "pbcopy" can be slow
|
||||||
lazy_clipboard = vim.opt.clipboard
|
lazy_clipboard = vim.opt.clipboard:get()
|
||||||
vim.opt.clipboard = ""
|
vim.opt.clipboard = ""
|
||||||
|
|
||||||
if vim.g.deprecation_warnings == false then
|
if vim.g.deprecation_warnings == false then
|
||||||
|
|
@ -301,6 +346,69 @@ function M.init()
|
||||||
M.json.load()
|
M.json.load()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---@alias LazyVimDefault {name: string, extra: string, enabled?: boolean, origin?: "global" | "default" | "extra" }
|
||||||
|
|
||||||
|
local default_extras ---@type table<string, LazyVimDefault>
|
||||||
|
function M.get_defaults()
|
||||||
|
if default_extras then
|
||||||
|
return default_extras
|
||||||
|
end
|
||||||
|
---@type table<string, LazyVimDefault[]>
|
||||||
|
local checks = {
|
||||||
|
picker = {
|
||||||
|
{ name = "snacks", extra = "editor.snacks_picker" },
|
||||||
|
{ name = "fzf", extra = "editor.fzf" },
|
||||||
|
{ name = "telescope", extra = "editor.telescope" },
|
||||||
|
},
|
||||||
|
cmp = {
|
||||||
|
{ name = "blink.cmp", extra = "coding.blink" },
|
||||||
|
{ name = "nvim-cmp", extra = "coding.nvim-cmp" },
|
||||||
|
},
|
||||||
|
explorer = {
|
||||||
|
{ name = "snacks", extra = "editor.snacks_explorer" },
|
||||||
|
{ name = "neo-tree", extra = "editor.neo-tree" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- existing installs keep their defaults
|
||||||
|
if (LazyVim.config.json.data.install_version or 7) < 8 then
|
||||||
|
table.insert(checks.picker, 1, table.remove(checks.picker, 2))
|
||||||
|
table.insert(checks.explorer, 1, table.remove(checks.explorer, 2))
|
||||||
|
end
|
||||||
|
|
||||||
|
default_extras = {}
|
||||||
|
for name, check in pairs(checks) do
|
||||||
|
local valid = {} ---@type string[]
|
||||||
|
for _, extra in ipairs(check) do
|
||||||
|
if extra.enabled ~= false then
|
||||||
|
valid[#valid + 1] = extra.name
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local origin = "default"
|
||||||
|
local use = vim.g["lazyvim_" .. name]
|
||||||
|
use = vim.tbl_contains(valid, use or "auto") and use or nil
|
||||||
|
origin = use and "global" or origin
|
||||||
|
for _, extra in ipairs(use and {} or check) do
|
||||||
|
if extra.enabled ~= false and LazyVim.has_extra(extra.extra) then
|
||||||
|
use = extra.name
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
origin = use and "extra" or origin
|
||||||
|
use = use or valid[1]
|
||||||
|
for _, extra in ipairs(check) do
|
||||||
|
local import = "lazyvim.plugins.extras." .. extra.extra
|
||||||
|
extra = vim.deepcopy(extra)
|
||||||
|
extra.enabled = extra.name == use
|
||||||
|
if extra.enabled then
|
||||||
|
extra.origin = origin
|
||||||
|
end
|
||||||
|
default_extras[import] = extra
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return default_extras
|
||||||
|
end
|
||||||
|
|
||||||
setmetatable(M, {
|
setmetatable(M, {
|
||||||
__index = function(_, key)
|
__index = function(_, key)
|
||||||
if options == nil then
|
if options == nil then
|
||||||
|
|
|
||||||
|
|
@ -40,10 +40,17 @@ map("n", "<leader>`", "<cmd>e #<cr>", { desc = "Switch to Other Buffer" })
|
||||||
map("n", "<leader>bd", function()
|
map("n", "<leader>bd", function()
|
||||||
Snacks.bufdelete()
|
Snacks.bufdelete()
|
||||||
end, { desc = "Delete Buffer" })
|
end, { desc = "Delete Buffer" })
|
||||||
|
map("n", "<leader>bo", function()
|
||||||
|
Snacks.bufdelete.other()
|
||||||
|
end, { desc = "Delete Other Buffers" })
|
||||||
map("n", "<leader>bD", "<cmd>:bd<cr>", { desc = "Delete Buffer and Window" })
|
map("n", "<leader>bD", "<cmd>:bd<cr>", { desc = "Delete Buffer and Window" })
|
||||||
|
|
||||||
-- Clear search with <esc>
|
-- Clear search and stop snippet on escape
|
||||||
map({ "i", "n" }, "<esc>", "<cmd>noh<cr><esc>", { desc = "Escape and Clear hlsearch" })
|
map({ "i", "n", "s" }, "<esc>", function()
|
||||||
|
vim.cmd("noh")
|
||||||
|
LazyVim.cmp.actions.snippet_stop()
|
||||||
|
return "<esc>"
|
||||||
|
end, { expr = true, desc = "Escape and Clear hlsearch" })
|
||||||
|
|
||||||
-- Clear search, diff update and redraw
|
-- Clear search, diff update and redraw
|
||||||
-- taken from runtime/lua/_editor.lua
|
-- taken from runtime/lua/_editor.lua
|
||||||
|
|
@ -87,8 +94,21 @@ map("n", "<leader>l", "<cmd>Lazy<cr>", { desc = "Lazy" })
|
||||||
-- new file
|
-- new file
|
||||||
map("n", "<leader>fn", "<cmd>enew<cr>", { desc = "New File" })
|
map("n", "<leader>fn", "<cmd>enew<cr>", { desc = "New File" })
|
||||||
|
|
||||||
map("n", "<leader>xl", "<cmd>lopen<cr>", { desc = "Location List" })
|
-- location list
|
||||||
map("n", "<leader>xq", "<cmd>copen<cr>", { desc = "Quickfix List" })
|
map("n", "<leader>xl", function()
|
||||||
|
local success, err = pcall(vim.fn.getloclist(0, { winid = 0 }).winid ~= 0 and vim.cmd.lclose or vim.cmd.lopen)
|
||||||
|
if not success and err then
|
||||||
|
vim.notify(err, vim.log.levels.ERROR)
|
||||||
|
end
|
||||||
|
end, { desc = "Location List" })
|
||||||
|
|
||||||
|
-- quickfix list
|
||||||
|
map("n", "<leader>xq", function()
|
||||||
|
local success, err = pcall(vim.fn.getqflist({ winid = 0 }).winid ~= 0 and vim.cmd.cclose or vim.cmd.copen)
|
||||||
|
if not success and err then
|
||||||
|
vim.notify(err, vim.log.levels.ERROR)
|
||||||
|
end
|
||||||
|
end, { desc = "Quickfix List" })
|
||||||
|
|
||||||
map("n", "[q", vim.cmd.cprev, { desc = "Previous Quickfix" })
|
map("n", "[q", vim.cmd.cprev, { desc = "Previous Quickfix" })
|
||||||
map("n", "]q", vim.cmd.cnext, { desc = "Next Quickfix" })
|
map("n", "]q", vim.cmd.cnext, { desc = "Next Quickfix" })
|
||||||
|
|
@ -100,10 +120,12 @@ end, { desc = "Format" })
|
||||||
|
|
||||||
-- diagnostic
|
-- diagnostic
|
||||||
local diagnostic_goto = function(next, severity)
|
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()
|
return function()
|
||||||
go({ severity = severity })
|
vim.diagnostic.jump({
|
||||||
|
count = (next and 1 or -1) * vim.v.count1,
|
||||||
|
severity = severity and vim.diagnostic.severity[severity] or nil,
|
||||||
|
float = true,
|
||||||
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
map("n", "<leader>cd", vim.diagnostic.open_float, { desc = "Line Diagnostics" })
|
map("n", "<leader>cd", vim.diagnostic.open_float, { desc = "Line Diagnostics" })
|
||||||
|
|
@ -119,14 +141,22 @@ map("n", "[w", diagnostic_goto(false, "WARN"), { desc = "Prev Warning" })
|
||||||
-- toggle options
|
-- toggle options
|
||||||
LazyVim.format.snacks_toggle():map("<leader>uf")
|
LazyVim.format.snacks_toggle():map("<leader>uf")
|
||||||
LazyVim.format.snacks_toggle(true):map("<leader>uF")
|
LazyVim.format.snacks_toggle(true):map("<leader>uF")
|
||||||
Snacks.toggle.option("spell", { name = "Spelling"}):map("<leader>us")
|
Snacks.toggle.option("spell", { name = "Spelling" }):map("<leader>us")
|
||||||
Snacks.toggle.option("wrap", {name = "Wrap"}):map("<leader>uw")
|
Snacks.toggle.option("wrap", { name = "Wrap" }):map("<leader>uw")
|
||||||
Snacks.toggle.option("relativenumber", { name = "Relative Number"}):map("<leader>uL")
|
Snacks.toggle.option("relativenumber", { name = "Relative Number" }):map("<leader>uL")
|
||||||
Snacks.toggle.diagnostics():map("<leader>ud")
|
Snacks.toggle.diagnostics():map("<leader>ud")
|
||||||
Snacks.toggle.line_number():map("<leader>ul")
|
Snacks.toggle.line_number():map("<leader>ul")
|
||||||
Snacks.toggle.option("conceallevel", {off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2}):map("<leader>uc")
|
Snacks.toggle.option("conceallevel", { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2, name = "Conceal Level" }):map("<leader>uc")
|
||||||
|
Snacks.toggle.option("showtabline", { off = 0, on = vim.o.showtabline > 0 and vim.o.showtabline or 2, name = "Tabline" }):map("<leader>uA")
|
||||||
Snacks.toggle.treesitter():map("<leader>uT")
|
Snacks.toggle.treesitter():map("<leader>uT")
|
||||||
Snacks.toggle.option("background", { off = "light", on = "dark" , name = "Dark Background"}):map("<leader>ub")
|
Snacks.toggle.option("background", { off = "light", on = "dark" , name = "Dark Background" }):map("<leader>ub")
|
||||||
|
Snacks.toggle.dim():map("<leader>uD")
|
||||||
|
Snacks.toggle.animate():map("<leader>ua")
|
||||||
|
Snacks.toggle.indent():map("<leader>ug")
|
||||||
|
Snacks.toggle.scroll():map("<leader>uS")
|
||||||
|
Snacks.toggle.profiler():map("<leader>dpp")
|
||||||
|
Snacks.toggle.profiler_highlights():map("<leader>dph")
|
||||||
|
|
||||||
if vim.lsp.inlay_hint then
|
if vim.lsp.inlay_hint then
|
||||||
Snacks.toggle.inlay_hints():map("<leader>uh")
|
Snacks.toggle.inlay_hints():map("<leader>uh")
|
||||||
end
|
end
|
||||||
|
|
@ -135,19 +165,23 @@ end
|
||||||
if vim.fn.executable("lazygit") == 1 then
|
if vim.fn.executable("lazygit") == 1 then
|
||||||
map("n", "<leader>gg", function() Snacks.lazygit( { cwd = LazyVim.root.git() }) end, { desc = "Lazygit (Root Dir)" })
|
map("n", "<leader>gg", function() Snacks.lazygit( { cwd = LazyVim.root.git() }) end, { desc = "Lazygit (Root Dir)" })
|
||||||
map("n", "<leader>gG", function() Snacks.lazygit() end, { desc = "Lazygit (cwd)" })
|
map("n", "<leader>gG", function() Snacks.lazygit() end, { desc = "Lazygit (cwd)" })
|
||||||
map("n", "<leader>gb", function() Snacks.git.blame_line() end, { desc = "Git Blame Line" })
|
|
||||||
map("n", "<leader>gB", function() Snacks.gitbrowse() end, { desc = "Git Browse" })
|
|
||||||
map("n", "<leader>gf", function() Snacks.lazygit.log_file() end, { desc = "Lazygit Current File History" })
|
|
||||||
map("n", "<leader>gl", function() Snacks.lazygit.log({ cwd = LazyVim.root.git() }) end, { desc = "Lazygit Log" })
|
|
||||||
map("n", "<leader>gL", function() Snacks.lazygit.log() end, { desc = "Lazygit Log (cwd)" })
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
map("n", "<leader>gL", function() Snacks.picker.git_log() end, { desc = "Git Log (cwd)" })
|
||||||
|
map("n", "<leader>gb", function() Snacks.picker.git_log_line() end, { desc = "Git Blame Line" })
|
||||||
|
map("n", "<leader>gf", function() Snacks.picker.git_log_file() end, { desc = "Git Current File History" })
|
||||||
|
map("n", "<leader>gl", function() Snacks.picker.git_log({ cwd = LazyVim.root.git() }) end, { desc = "Git Log" })
|
||||||
|
map({ "n", "x" }, "<leader>gB", function() Snacks.gitbrowse() end, { desc = "Git Browse (open)" })
|
||||||
|
map({"n", "x" }, "<leader>gY", function()
|
||||||
|
Snacks.gitbrowse({ open = function(url) vim.fn.setreg("+", url) end, notify = false })
|
||||||
|
end, { desc = "Git Browse (copy)" })
|
||||||
|
|
||||||
-- quit
|
-- quit
|
||||||
map("n", "<leader>qq", "<cmd>qa<cr>", { desc = "Quit All" })
|
map("n", "<leader>qq", "<cmd>qa<cr>", { desc = "Quit All" })
|
||||||
|
|
||||||
-- highlights under cursor
|
-- highlights under cursor
|
||||||
map("n", "<leader>ui", vim.show_pos, { desc = "Inspect Pos" })
|
map("n", "<leader>ui", vim.show_pos, { desc = "Inspect Pos" })
|
||||||
map("n", "<leader>uI", "<cmd>InspectTree<cr>", { desc = "Inspect Tree" })
|
map("n", "<leader>uI", function() vim.treesitter.inspect_tree() vim.api.nvim_input("I") end, { desc = "Inspect Tree" })
|
||||||
|
|
||||||
-- LazyVim Changelog
|
-- LazyVim Changelog
|
||||||
map("n", "<leader>L", function() LazyVim.news.changelog() end, { desc = "LazyVim Changelog" })
|
map("n", "<leader>L", function() LazyVim.news.changelog() end, { desc = "LazyVim Changelog" })
|
||||||
|
|
@ -155,19 +189,15 @@ map("n", "<leader>L", function() LazyVim.news.changelog() end, { desc = "LazyVim
|
||||||
-- floating terminal
|
-- floating terminal
|
||||||
map("n", "<leader>fT", function() Snacks.terminal() end, { desc = "Terminal (cwd)" })
|
map("n", "<leader>fT", function() Snacks.terminal() end, { desc = "Terminal (cwd)" })
|
||||||
map("n", "<leader>ft", function() Snacks.terminal(nil, { cwd = LazyVim.root() }) end, { desc = "Terminal (Root Dir)" })
|
map("n", "<leader>ft", function() Snacks.terminal(nil, { cwd = LazyVim.root() }) end, { desc = "Terminal (Root Dir)" })
|
||||||
map("n", "<c-/>", function() Snacks.terminal(nil, { cwd = LazyVim.root() }) end, { desc = "Terminal (Root Dir)" })
|
map({"n","t"}, "<c-/>",function() Snacks.terminal(nil, { cwd = LazyVim.root() }) end, { desc = "Terminal (Root Dir)" })
|
||||||
map("n", "<c-_>", function() Snacks.terminal(nil, { cwd = LazyVim.root() }) end, { desc = "which_key_ignore" })
|
map({"n","t"}, "<c-_>",function() Snacks.terminal(nil, { cwd = LazyVim.root() }) end, { desc = "which_key_ignore" })
|
||||||
|
|
||||||
-- Terminal Mappings
|
|
||||||
map("t", "<C-/>", "<cmd>close<cr>", { desc = "Hide Terminal" })
|
|
||||||
map("t", "<c-_>", "<cmd>close<cr>", { desc = "which_key_ignore" })
|
|
||||||
|
|
||||||
-- windows
|
-- windows
|
||||||
map("n", "<leader>w", "<c-w>", { desc = "Windows", remap = true })
|
|
||||||
map("n", "<leader>-", "<C-W>s", { desc = "Split Window Below", remap = true })
|
map("n", "<leader>-", "<C-W>s", { desc = "Split Window Below", remap = true })
|
||||||
map("n", "<leader>|", "<C-W>v", { desc = "Split Window Right", remap = true })
|
map("n", "<leader>|", "<C-W>v", { desc = "Split Window Right", remap = true })
|
||||||
map("n", "<leader>wd", "<C-W>c", { desc = "Delete Window", remap = true })
|
map("n", "<leader>wd", "<C-W>c", { desc = "Delete Window", remap = true })
|
||||||
LazyVim.ui.maximize():map("<leader>wm")
|
Snacks.toggle.zoom():map("<leader>wm"):map("<leader>uZ")
|
||||||
|
Snacks.toggle.zen():map("<leader>uz")
|
||||||
|
|
||||||
-- tabs
|
-- tabs
|
||||||
map("n", "<leader><tab>l", "<cmd>tablast<cr>", { desc = "Last Tab" })
|
map("n", "<leader><tab>l", "<cmd>tablast<cr>", { desc = "Last Tab" })
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,26 @@ vim.g.maplocalleader = "\\"
|
||||||
-- LazyVim auto format
|
-- LazyVim auto format
|
||||||
vim.g.autoformat = true
|
vim.g.autoformat = true
|
||||||
|
|
||||||
|
-- Snacks animations
|
||||||
|
-- Set to `false` to globally disable all snacks animations
|
||||||
|
vim.g.snacks_animate = true
|
||||||
|
|
||||||
-- LazyVim picker to use.
|
-- LazyVim picker to use.
|
||||||
-- Can be one of: telescope, fzf
|
-- Can be one of: telescope, fzf
|
||||||
-- Leave it to "auto" to automatically use the picker
|
-- Leave it to "auto" to automatically use the picker
|
||||||
-- enabled with `:LazyExtras`
|
-- enabled with `:LazyExtras`
|
||||||
vim.g.lazyvim_picker = "auto"
|
vim.g.lazyvim_picker = "auto"
|
||||||
|
|
||||||
|
-- LazyVim completion engine to use.
|
||||||
|
-- Can be one of: nvim-cmp, blink.cmp
|
||||||
|
-- Leave it to "auto" to automatically use the completion engine
|
||||||
|
-- enabled with `:LazyExtras`
|
||||||
|
vim.g.lazyvim_cmp = "auto"
|
||||||
|
|
||||||
|
-- if the completion engine supports the AI source,
|
||||||
|
-- use that instead of inline suggestions
|
||||||
|
vim.g.ai_cmp = true
|
||||||
|
|
||||||
-- LazyVim root dir detection
|
-- LazyVim root dir detection
|
||||||
-- Each entry can be:
|
-- Each entry can be:
|
||||||
-- * the name of a detector function like `lsp` or `cwd`
|
-- * the name of a detector function like `lsp` or `cwd`
|
||||||
|
|
@ -39,7 +53,7 @@ local opt = vim.opt
|
||||||
|
|
||||||
opt.autowrite = true -- Enable auto write
|
opt.autowrite = true -- Enable auto write
|
||||||
-- only set clipboard if not in ssh, to make sure the OSC 52
|
-- only set clipboard if not in ssh, to make sure the OSC 52
|
||||||
-- integration works automatically. Requires Neovim >= 0.10.0
|
-- integration works automatically.
|
||||||
opt.clipboard = vim.env.SSH_TTY and "" or "unnamedplus" -- Sync with system clipboard
|
opt.clipboard = vim.env.SSH_TTY and "" or "unnamedplus" -- Sync with system clipboard
|
||||||
opt.completeopt = "menu,menuone,noselect"
|
opt.completeopt = "menu,menuone,noselect"
|
||||||
opt.conceallevel = 2 -- Hide * markup for bold and italic, but not markers with substitutions
|
opt.conceallevel = 2 -- Hide * markup for bold and italic, but not markers with substitutions
|
||||||
|
|
@ -55,7 +69,9 @@ opt.fillchars = {
|
||||||
eob = " ",
|
eob = " ",
|
||||||
}
|
}
|
||||||
opt.foldlevel = 99
|
opt.foldlevel = 99
|
||||||
opt.formatexpr = "v:lua.require'lazyvim.util'.format.formatexpr()"
|
opt.foldmethod = "indent"
|
||||||
|
opt.foldtext = ""
|
||||||
|
opt.formatexpr = "v:lua.LazyVim.format.formatexpr()"
|
||||||
opt.formatoptions = "jcroqlnt" -- tcqj
|
opt.formatoptions = "jcroqlnt" -- tcqj
|
||||||
opt.grepformat = "%f:%l:%c:%m"
|
opt.grepformat = "%f:%l:%c:%m"
|
||||||
opt.grepprg = "rg --vimgrep"
|
opt.grepprg = "rg --vimgrep"
|
||||||
|
|
@ -81,10 +97,12 @@ opt.sidescrolloff = 8 -- Columns of context
|
||||||
opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
|
opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
|
||||||
opt.smartcase = true -- Don't ignore case with capitals
|
opt.smartcase = true -- Don't ignore case with capitals
|
||||||
opt.smartindent = true -- Insert indents automatically
|
opt.smartindent = true -- Insert indents automatically
|
||||||
|
opt.smoothscroll = true
|
||||||
opt.spelllang = { "en" }
|
opt.spelllang = { "en" }
|
||||||
opt.splitbelow = true -- Put new windows below current
|
opt.splitbelow = true -- Put new windows below current
|
||||||
opt.splitkeep = "screen"
|
opt.splitkeep = "screen"
|
||||||
opt.splitright = true -- Put new windows right of current
|
opt.splitright = true -- Put new windows right of current
|
||||||
|
opt.statuscolumn = [[%!v:lua.LazyVim.statuscolumn()]]
|
||||||
opt.tabstop = 2 -- Number of spaces tabs count for
|
opt.tabstop = 2 -- Number of spaces tabs count for
|
||||||
opt.termguicolors = true -- True color support
|
opt.termguicolors = true -- True color support
|
||||||
opt.timeoutlen = vim.g.vscode and 1000 or 300 -- Lower than default (1000) to quickly trigger which-key
|
opt.timeoutlen = vim.g.vscode and 1000 or 300 -- Lower than default (1000) to quickly trigger which-key
|
||||||
|
|
@ -96,15 +114,5 @@ opt.wildmode = "longest:full,full" -- Command-line completion mode
|
||||||
opt.winminwidth = 5 -- Minimum window width
|
opt.winminwidth = 5 -- Minimum window width
|
||||||
opt.wrap = false -- Disable line wrap
|
opt.wrap = false -- Disable line wrap
|
||||||
|
|
||||||
if vim.fn.has("nvim-0.10") == 1 then
|
|
||||||
opt.smoothscroll = true
|
|
||||||
opt.foldexpr = "v:lua.require'lazyvim.util'.ui.foldexpr()"
|
|
||||||
opt.foldmethod = "expr"
|
|
||||||
opt.foldtext = ""
|
|
||||||
else
|
|
||||||
opt.foldmethod = "indent"
|
|
||||||
opt.foldtext = "v:lua.require'lazyvim.util'.ui.foldtext()"
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Fix markdown indentation settings
|
-- Fix markdown indentation settings
|
||||||
vim.g.markdown_recommended_style = 0
|
vim.g.markdown_recommended_style = 0
|
||||||
|
|
|
||||||
|
|
@ -8,16 +8,13 @@ local error = vim.health.error or vim.health.report_error
|
||||||
function M.check()
|
function M.check()
|
||||||
start("LazyVim")
|
start("LazyVim")
|
||||||
|
|
||||||
if vim.fn.has("nvim-0.9.0") == 1 then
|
if vim.fn.has("nvim-0.11.2") == 1 then
|
||||||
ok("Using Neovim >= 0.9.0")
|
ok("Using Neovim >= 0.11.2")
|
||||||
if vim.fn.has("nvim-0.10.0") == 0 then
|
|
||||||
warn("Use Neovim >= 0.10.0 for the best experience")
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
error("Neovim >= 0.9.0 is required")
|
error("Neovim >= 0.11.2 is required")
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, cmd in ipairs({ "git", "rg", { "fd", "fdfind" }, "lazygit" }) do
|
for _, cmd in ipairs({ "git", "rg", { "fd", "fdfind" }, "lazygit", "fzf", "curl" }) do
|
||||||
local name = type(cmd) == "string" and cmd or vim.inspect(cmd)
|
local name = type(cmd) == "string" and cmd or vim.inspect(cmd)
|
||||||
local commands = type(cmd) == "string" and { cmd } or cmd
|
local commands = type(cmd) == "string" and { cmd } or cmd
|
||||||
---@cast commands string[]
|
---@cast commands string[]
|
||||||
|
|
|
||||||
|
|
@ -1,126 +1,9 @@
|
||||||
return {
|
return {
|
||||||
|
-- Auto pairs
|
||||||
-- auto completion
|
-- Automatically inserts a matching closing character
|
||||||
|
-- when you type an opening character like `"`, `[`, or `(`.
|
||||||
{
|
{
|
||||||
"hrsh7th/nvim-cmp",
|
"nvim-mini/mini.pairs",
|
||||||
version = false, -- last release is way too old
|
|
||||||
event = "InsertEnter",
|
|
||||||
dependencies = {
|
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
|
||||||
"hrsh7th/cmp-buffer",
|
|
||||||
"hrsh7th/cmp-path",
|
|
||||||
},
|
|
||||||
-- Not all LSP servers add brackets when completing a function.
|
|
||||||
-- To better deal with this, LazyVim adds a custom option to cmp,
|
|
||||||
-- that you can configure. For example:
|
|
||||||
--
|
|
||||||
-- ```lua
|
|
||||||
-- opts = {
|
|
||||||
-- auto_brackets = { "python" }
|
|
||||||
-- }
|
|
||||||
-- ```
|
|
||||||
opts = function()
|
|
||||||
vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true })
|
|
||||||
local cmp = require("cmp")
|
|
||||||
local defaults = require("cmp.config.default")()
|
|
||||||
local auto_select = true
|
|
||||||
return {
|
|
||||||
auto_brackets = {}, -- configure any filetype to auto add brackets
|
|
||||||
completion = {
|
|
||||||
completeopt = "menu,menuone,noinsert" .. (auto_select and "" or ",noselect"),
|
|
||||||
},
|
|
||||||
preselect = auto_select and cmp.PreselectMode.Item or cmp.PreselectMode.None,
|
|
||||||
mapping = cmp.mapping.preset.insert({
|
|
||||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
|
||||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
|
||||||
["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
|
|
||||||
["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
|
|
||||||
["<C-Space>"] = cmp.mapping.complete(),
|
|
||||||
["<CR>"] = LazyVim.cmp.confirm({ select = auto_select }),
|
|
||||||
["<C-y>"] = LazyVim.cmp.confirm({ select = true }),
|
|
||||||
["<S-CR>"] = LazyVim.cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
|
||||||
["<C-CR>"] = function(fallback)
|
|
||||||
cmp.abort()
|
|
||||||
fallback()
|
|
||||||
end,
|
|
||||||
}),
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = "nvim_lsp" },
|
|
||||||
{ name = "path" },
|
|
||||||
}, {
|
|
||||||
{ name = "buffer" },
|
|
||||||
}),
|
|
||||||
formatting = {
|
|
||||||
format = function(entry, item)
|
|
||||||
local icons = LazyVim.config.icons.kinds
|
|
||||||
if icons[item.kind] then
|
|
||||||
item.kind = icons[item.kind] .. item.kind
|
|
||||||
end
|
|
||||||
|
|
||||||
local widths = {
|
|
||||||
abbr = vim.g.cmp_widths and vim.g.cmp_widths.abbr or 40,
|
|
||||||
menu = vim.g.cmp_widths and vim.g.cmp_widths.menu or 30,
|
|
||||||
}
|
|
||||||
|
|
||||||
for key, width in pairs(widths) do
|
|
||||||
if item[key] and vim.fn.strdisplaywidth(item[key]) > width then
|
|
||||||
item[key] = vim.fn.strcharpart(item[key], 0, width - 1) .. "…"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return item
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
experimental = {
|
|
||||||
ghost_text = {
|
|
||||||
hl_group = "CmpGhostText",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
sorting = defaults.sorting,
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
main = "lazyvim.util.cmp",
|
|
||||||
},
|
|
||||||
|
|
||||||
-- snippets
|
|
||||||
{
|
|
||||||
"nvim-cmp",
|
|
||||||
optional = true,
|
|
||||||
dependencies = {
|
|
||||||
{
|
|
||||||
"garymjr/nvim-snippets",
|
|
||||||
opts = {
|
|
||||||
friendly_snippets = true,
|
|
||||||
},
|
|
||||||
dependencies = { "rafamadriz/friendly-snippets" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
opts = function(_, opts)
|
|
||||||
opts.snippet = {
|
|
||||||
expand = function(item)
|
|
||||||
return LazyVim.cmp.expand(item.body)
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
if LazyVim.has("nvim-snippets") then
|
|
||||||
table.insert(opts.sources, { name = "snippets" })
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
init = function()
|
|
||||||
-- Neovim enabled snippet navigation mappings by default in v0.11
|
|
||||||
if vim.fn.has("nvim-0.11") == 0 then
|
|
||||||
vim.keymap.set({ "i", "s" }, "<Tab>", function()
|
|
||||||
return vim.snippet.active({ direction = 1 }) and "<cmd>lua vim.snippet.jump(1)<cr>" or "<Tab>"
|
|
||||||
end, { expr = true, silent = true })
|
|
||||||
vim.keymap.set({ "i", "s" }, "<S-Tab>", function()
|
|
||||||
return vim.snippet.active({ direction = -1 }) and "<cmd>lua vim.snippet.jump(-1)<cr>" or "<S-Tab>"
|
|
||||||
end, { expr = true, silent = true })
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- auto pairs
|
|
||||||
{
|
|
||||||
"echasnovski/mini.pairs",
|
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = {
|
opts = {
|
||||||
modes = { insert = true, command = true, terminal = false },
|
modes = { insert = true, command = true, terminal = false },
|
||||||
|
|
@ -139,16 +22,20 @@ return {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- comments
|
-- Improves comment syntax, lets Neovim handle multiple
|
||||||
|
-- types of comments for a single language, and relaxes rules
|
||||||
|
-- for uncommenting.
|
||||||
{
|
{
|
||||||
"folke/ts-comments.nvim",
|
"folke/ts-comments.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = {},
|
opts = {},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Better text-objects
|
-- Extends the a & i text objects, this adds the ability to select
|
||||||
|
-- arguments, function calls, text within quotes and brackets, and to
|
||||||
|
-- repeat those selections to select an outer text object.
|
||||||
{
|
{
|
||||||
"echasnovski/mini.ai",
|
"nvim-mini/mini.ai",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = function()
|
opts = function()
|
||||||
local ai = require("mini.ai")
|
local ai = require("mini.ai")
|
||||||
|
|
@ -167,7 +54,6 @@ return {
|
||||||
{ "%u[%l%d]+%f[^%l%d]", "%f[%S][%l%d]+%f[^%l%d]", "%f[%P][%l%d]+%f[^%l%d]", "^[%l%d]+%f[^%l%d]" },
|
{ "%u[%l%d]+%f[^%l%d]", "%f[%S][%l%d]+%f[^%l%d]", "%f[%P][%l%d]+%f[^%l%d]", "^[%l%d]+%f[^%l%d]" },
|
||||||
"^().*()$",
|
"^().*()$",
|
||||||
},
|
},
|
||||||
i = LazyVim.mini.ai_indent, -- indent
|
|
||||||
g = LazyVim.mini.ai_buffer, -- buffer
|
g = LazyVim.mini.ai_buffer, -- buffer
|
||||||
u = ai.gen_spec.function_call(), -- u for "Usage"
|
u = ai.gen_spec.function_call(), -- u for "Usage"
|
||||||
U = ai.gen_spec.function_call({ name_pattern = "[%w_]" }), -- without dot in function name
|
U = ai.gen_spec.function_call({ name_pattern = "[%w_]" }), -- without dot in function name
|
||||||
|
|
@ -184,27 +70,19 @@ return {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- Configures LuaLS to support auto-completion and type checking
|
||||||
|
-- while editing your Neovim configuration.
|
||||||
{
|
{
|
||||||
"folke/lazydev.nvim",
|
"folke/lazydev.nvim",
|
||||||
ft = "lua",
|
ft = "lua",
|
||||||
cmd = "LazyDev",
|
cmd = "LazyDev",
|
||||||
opts = {
|
opts = {
|
||||||
library = {
|
library = {
|
||||||
{ path = "luvit-meta/library", words = { "vim%.uv" } },
|
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
||||||
{ path = "LazyVim", words = { "LazyVim" } },
|
{ path = "LazyVim", words = { "LazyVim" } },
|
||||||
{ path = "snacks.nvim", words = { "Snacks" } },
|
{ path = "snacks.nvim", words = { "Snacks" } },
|
||||||
{ path = "lazy.nvim", words = { "LazyVim" } },
|
{ path = "lazy.nvim", words = { "LazyVim" } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- Manage libuv types with lazy. Plugin will never be loaded
|
|
||||||
{ "Bilal2453/luvit-meta", lazy = true },
|
|
||||||
-- Add lazydev source to cmp
|
|
||||||
{
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
optional = true,
|
|
||||||
opts = function(_, opts)
|
|
||||||
table.insert(opts.sources, { name = "lazydev", group_index = 0 })
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,12 +13,21 @@ return {
|
||||||
lazy = true,
|
lazy = true,
|
||||||
name = "catppuccin",
|
name = "catppuccin",
|
||||||
opts = {
|
opts = {
|
||||||
|
lsp_styles = {
|
||||||
|
underlines = {
|
||||||
|
errors = { "undercurl" },
|
||||||
|
hints = { "undercurl" },
|
||||||
|
warnings = { "undercurl" },
|
||||||
|
information = { "undercurl" },
|
||||||
|
},
|
||||||
|
},
|
||||||
integrations = {
|
integrations = {
|
||||||
aerial = true,
|
aerial = true,
|
||||||
alpha = true,
|
alpha = true,
|
||||||
cmp = true,
|
cmp = true,
|
||||||
dashboard = true,
|
dashboard = true,
|
||||||
flash = true,
|
flash = true,
|
||||||
|
fzf = true,
|
||||||
grug_far = true,
|
grug_far = true,
|
||||||
gitsigns = true,
|
gitsigns = true,
|
||||||
headlines = true,
|
headlines = true,
|
||||||
|
|
@ -27,25 +36,14 @@ return {
|
||||||
leap = true,
|
leap = true,
|
||||||
lsp_trouble = true,
|
lsp_trouble = true,
|
||||||
mason = true,
|
mason = true,
|
||||||
markdown = true,
|
|
||||||
mini = true,
|
mini = true,
|
||||||
native_lsp = {
|
|
||||||
enabled = true,
|
|
||||||
underlines = {
|
|
||||||
errors = { "undercurl" },
|
|
||||||
hints = { "undercurl" },
|
|
||||||
warnings = { "undercurl" },
|
|
||||||
information = { "undercurl" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
navic = { enabled = true, custom_bg = "lualine" },
|
navic = { enabled = true, custom_bg = "lualine" },
|
||||||
neotest = true,
|
neotest = true,
|
||||||
neotree = true,
|
neotree = true,
|
||||||
noice = true,
|
noice = true,
|
||||||
notify = true,
|
notify = true,
|
||||||
semantic_tokens = true,
|
snacks = true,
|
||||||
telescope = true,
|
telescope = true,
|
||||||
treesitter = true,
|
|
||||||
treesitter_context = true,
|
treesitter_context = true,
|
||||||
which_key = true,
|
which_key = true,
|
||||||
},
|
},
|
||||||
|
|
@ -56,7 +54,7 @@ return {
|
||||||
optional = true,
|
optional = true,
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
if (vim.g.colors_name or ""):find("catppuccin") then
|
if (vim.g.colors_name or ""):find("catppuccin") then
|
||||||
opts.highlights = require("catppuccin.groups.integrations.bufferline").get()
|
opts.highlights = require("catppuccin.special.bufferline").get_theme()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
-- Compatibility with Neovim 0.9
|
|
||||||
return {
|
|
||||||
-- Use LuaSnip instead of native snippets
|
|
||||||
{ "garymjr/nvim-snippets", enabled = false },
|
|
||||||
{ import = "lazyvim.plugins.extras.coding.luasnip" },
|
|
||||||
|
|
||||||
-- Use mini.comment instead of ts-comments
|
|
||||||
{ "folke/ts-comments.nvim", enabled = false },
|
|
||||||
{ import = "lazyvim.plugins.extras.coding.mini-comment" },
|
|
||||||
|
|
||||||
-- Use neodev-types with lazydev
|
|
||||||
{ "folke/neodev.nvim", config = function() end },
|
|
||||||
{
|
|
||||||
"folke/lazydev.nvim",
|
|
||||||
opts = function(_, opts)
|
|
||||||
opts.library = opts.library or {}
|
|
||||||
table.insert(opts.library, { "neodev.nvim/types/stable" })
|
|
||||||
end,
|
|
||||||
config = function(_, opts)
|
|
||||||
-- force lazydev to load on Neovim 0.9
|
|
||||||
require("lazydev.config").have_0_10 = true
|
|
||||||
require("lazydev").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
dependencies = {},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- dummy import to save core imports
|
|
||||||
{
|
|
||||||
import = "foobar",
|
|
||||||
enabled = function()
|
|
||||||
LazyVim.plugin.save_core()
|
|
||||||
return false
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,136 +1,10 @@
|
||||||
return {
|
return {
|
||||||
|
|
||||||
-- file explorer
|
|
||||||
{
|
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
|
||||||
cmd = "Neotree",
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>fe",
|
|
||||||
function()
|
|
||||||
require("neo-tree.command").execute({ toggle = true, dir = LazyVim.root() })
|
|
||||||
end,
|
|
||||||
desc = "Explorer NeoTree (Root Dir)",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>fE",
|
|
||||||
function()
|
|
||||||
require("neo-tree.command").execute({ toggle = true, dir = vim.uv.cwd() })
|
|
||||||
end,
|
|
||||||
desc = "Explorer NeoTree (cwd)",
|
|
||||||
},
|
|
||||||
{ "<leader>e", "<leader>fe", desc = "Explorer NeoTree (Root Dir)", remap = true },
|
|
||||||
{ "<leader>E", "<leader>fE", desc = "Explorer NeoTree (cwd)", remap = true },
|
|
||||||
{
|
|
||||||
"<leader>ge",
|
|
||||||
function()
|
|
||||||
require("neo-tree.command").execute({ source = "git_status", toggle = true })
|
|
||||||
end,
|
|
||||||
desc = "Git Explorer",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>be",
|
|
||||||
function()
|
|
||||||
require("neo-tree.command").execute({ source = "buffers", toggle = true })
|
|
||||||
end,
|
|
||||||
desc = "Buffer Explorer",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
deactivate = function()
|
|
||||||
vim.cmd([[Neotree close]])
|
|
||||||
end,
|
|
||||||
init = function()
|
|
||||||
-- FIX: use `autocmd` for lazy-loading neo-tree instead of directly requiring it,
|
|
||||||
-- because `cwd` is not set up properly.
|
|
||||||
vim.api.nvim_create_autocmd("BufEnter", {
|
|
||||||
group = vim.api.nvim_create_augroup("Neotree_start_directory", { clear = true }),
|
|
||||||
desc = "Start Neo-tree with directory",
|
|
||||||
once = true,
|
|
||||||
callback = function()
|
|
||||||
if package.loaded["neo-tree"] then
|
|
||||||
return
|
|
||||||
else
|
|
||||||
local stats = vim.uv.fs_stat(vim.fn.argv(0))
|
|
||||||
if stats and stats.type == "directory" then
|
|
||||||
require("neo-tree")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
opts = {
|
|
||||||
sources = { "filesystem", "buffers", "git_status" },
|
|
||||||
open_files_do_not_replace_types = { "terminal", "Trouble", "trouble", "qf", "Outline" },
|
|
||||||
filesystem = {
|
|
||||||
bind_to_cwd = false,
|
|
||||||
follow_current_file = { enabled = true },
|
|
||||||
use_libuv_file_watcher = true,
|
|
||||||
},
|
|
||||||
window = {
|
|
||||||
mappings = {
|
|
||||||
["l"] = "open",
|
|
||||||
["h"] = "close_node",
|
|
||||||
["<space>"] = "none",
|
|
||||||
["Y"] = {
|
|
||||||
function(state)
|
|
||||||
local node = state.tree:get_node()
|
|
||||||
local path = node:get_id()
|
|
||||||
vim.fn.setreg("+", path, "c")
|
|
||||||
end,
|
|
||||||
desc = "Copy Path to Clipboard",
|
|
||||||
},
|
|
||||||
["O"] = {
|
|
||||||
function(state)
|
|
||||||
require("lazy.util").open(state.tree:get_node().path, { system = true })
|
|
||||||
end,
|
|
||||||
desc = "Open with System Application",
|
|
||||||
},
|
|
||||||
["P"] = { "toggle_preview", config = { use_float = false } },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
default_component_configs = {
|
|
||||||
indent = {
|
|
||||||
with_expanders = true, -- if nil and file nesting is enabled, will enable expanders
|
|
||||||
expander_collapsed = "",
|
|
||||||
expander_expanded = "",
|
|
||||||
expander_highlight = "NeoTreeExpander",
|
|
||||||
},
|
|
||||||
git_status = {
|
|
||||||
symbols = {
|
|
||||||
unstaged = "",
|
|
||||||
staged = "",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
config = function(_, opts)
|
|
||||||
local function on_move(data)
|
|
||||||
Snacks.rename.on_rename_file(data.source, data.destination)
|
|
||||||
end
|
|
||||||
|
|
||||||
local events = require("neo-tree.events")
|
|
||||||
opts.event_handlers = opts.event_handlers or {}
|
|
||||||
vim.list_extend(opts.event_handlers, {
|
|
||||||
{ event = events.FILE_MOVED, handler = on_move },
|
|
||||||
{ event = events.FILE_RENAMED, handler = on_move },
|
|
||||||
})
|
|
||||||
require("neo-tree").setup(opts)
|
|
||||||
vim.api.nvim_create_autocmd("TermClose", {
|
|
||||||
pattern = "*lazygit",
|
|
||||||
callback = function()
|
|
||||||
if package.loaded["neo-tree.sources.git_status"] then
|
|
||||||
require("neo-tree.sources.git_status").refresh()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- search/replace in multiple files
|
-- search/replace in multiple files
|
||||||
{
|
{
|
||||||
"MagicDuck/grug-far.nvim",
|
"MagicDuck/grug-far.nvim",
|
||||||
opts = { headerMaxWidth = 80 },
|
opts = { headerMaxWidth = 80 },
|
||||||
cmd = "GrugFar",
|
cmd = { "GrugFar", "GrugFarWithin" },
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
"<leader>sr",
|
"<leader>sr",
|
||||||
|
|
@ -166,6 +40,16 @@ return {
|
||||||
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
||||||
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
||||||
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
||||||
|
-- Simulate nvim-treesitter incremental selection
|
||||||
|
{ "<c-space>", mode = { "n", "o", "x" },
|
||||||
|
function()
|
||||||
|
require("flash").treesitter({
|
||||||
|
actions = {
|
||||||
|
["<c-space>"] = "next",
|
||||||
|
["<BS>"] = "prev"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end, desc = "Treesitter Incremental Selection" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -176,19 +60,22 @@ return {
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts_extend = { "spec" },
|
opts_extend = { "spec" },
|
||||||
opts = {
|
opts = {
|
||||||
|
preset = "helix",
|
||||||
defaults = {},
|
defaults = {},
|
||||||
spec = {
|
spec = {
|
||||||
{
|
{
|
||||||
mode = { "n", "v" },
|
mode = { "n", "v" },
|
||||||
{ "<leader><tab>", group = "tabs" },
|
{ "<leader><tab>", group = "tabs" },
|
||||||
{ "<leader>c", group = "code" },
|
{ "<leader>c", group = "code" },
|
||||||
|
{ "<leader>d", group = "debug" },
|
||||||
|
{ "<leader>dp", group = "profiler" },
|
||||||
{ "<leader>f", group = "file/find" },
|
{ "<leader>f", group = "file/find" },
|
||||||
{ "<leader>g", group = "git" },
|
{ "<leader>g", group = "git" },
|
||||||
{ "<leader>gh", group = "hunks" },
|
{ "<leader>gh", group = "hunks" },
|
||||||
{ "<leader>q", group = "quit/session" },
|
{ "<leader>q", group = "quit/session" },
|
||||||
{ "<leader>s", group = "search" },
|
{ "<leader>s", group = "search" },
|
||||||
{ "<leader>u", group = "ui", icon = { icon = " ", color = "cyan" } },
|
{ "<leader>u", group = "ui" },
|
||||||
{ "<leader>x", group = "diagnostics/quickfix", icon = { icon = " ", color = "green" } },
|
{ "<leader>x", group = "diagnostics/quickfix" },
|
||||||
{ "[", group = "prev" },
|
{ "[", group = "prev" },
|
||||||
{ "]", group = "next" },
|
{ "]", group = "next" },
|
||||||
{ "g", group = "goto" },
|
{ "g", group = "goto" },
|
||||||
|
|
@ -266,7 +153,7 @@ return {
|
||||||
local gs = package.loaded.gitsigns
|
local gs = package.loaded.gitsigns
|
||||||
|
|
||||||
local function map(mode, l, r, desc)
|
local function map(mode, l, r, desc)
|
||||||
vim.keymap.set(mode, l, r, { buffer = buffer, desc = desc })
|
vim.keymap.set(mode, l, r, { buffer = buffer, desc = desc, silent = true })
|
||||||
end
|
end
|
||||||
|
|
||||||
-- stylua: ignore start
|
-- stylua: ignore start
|
||||||
|
|
@ -300,6 +187,20 @@ return {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"gitsigns.nvim",
|
||||||
|
opts = function()
|
||||||
|
Snacks.toggle({
|
||||||
|
name = "Git Signs",
|
||||||
|
get = function()
|
||||||
|
return require("gitsigns.config").config.signcolumn
|
||||||
|
end,
|
||||||
|
set = function(state)
|
||||||
|
require("gitsigns").toggle_signs(state)
|
||||||
|
end,
|
||||||
|
}):map("<leader>uG")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
-- better diagnostics list and others
|
-- better diagnostics list and others
|
||||||
{
|
{
|
||||||
|
|
@ -367,17 +268,4 @@ return {
|
||||||
{ "<leader>sT", "<cmd>TodoTelescope keywords=TODO,FIX,FIXME<cr>", desc = "Todo/Fix/Fixme" },
|
{ "<leader>sT", "<cmd>TodoTelescope keywords=TODO,FIX,FIXME<cr>", desc = "Todo/Fix/Fixme" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
|
||||||
import = "lazyvim.plugins.extras.editor.fzf",
|
|
||||||
enabled = function()
|
|
||||||
return LazyVim.pick.want() == "fzf"
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
import = "lazyvim.plugins.extras.editor.telescope",
|
|
||||||
enabled = function()
|
|
||||||
return LazyVim.pick.want() == "telescope"
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
76
lua/lazyvim/plugins/extras/ai/codeium.lua
Normal file
76
lua/lazyvim/plugins/extras/ai/codeium.lua
Normal file
|
|
@ -0,0 +1,76 @@
|
||||||
|
return {
|
||||||
|
|
||||||
|
-- codeium
|
||||||
|
{
|
||||||
|
"Exafunction/codeium.nvim",
|
||||||
|
cmd = "Codeium",
|
||||||
|
event = "InsertEnter",
|
||||||
|
build = ":Codeium Auth",
|
||||||
|
opts = {
|
||||||
|
enable_cmp_source = vim.g.ai_cmp,
|
||||||
|
virtual_text = {
|
||||||
|
enabled = not vim.g.ai_cmp,
|
||||||
|
key_bindings = {
|
||||||
|
accept = false, -- handled by nvim-cmp / blink.cmp
|
||||||
|
next = "<M-]>",
|
||||||
|
prev = "<M-[>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- add ai_accept action
|
||||||
|
{
|
||||||
|
"Exafunction/codeium.nvim",
|
||||||
|
opts = function()
|
||||||
|
LazyVim.cmp.actions.ai_accept = function()
|
||||||
|
if require("codeium.virtual_text").get_current_completion_item() then
|
||||||
|
LazyVim.create_undo()
|
||||||
|
vim.api.nvim_input(require("codeium.virtual_text").accept())
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- codeium cmp source
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
optional = true,
|
||||||
|
dependencies = { "codeium.nvim" },
|
||||||
|
opts = function(_, opts)
|
||||||
|
table.insert(opts.sources, 1, {
|
||||||
|
name = "codeium",
|
||||||
|
group_index = 1,
|
||||||
|
priority = 100,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
optional = true,
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = function(_, opts)
|
||||||
|
table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.cmp_source("codeium"))
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
vim.g.ai_cmp and {
|
||||||
|
"saghen/blink.cmp",
|
||||||
|
optional = true,
|
||||||
|
dependencies = { "codeium.nvim", "saghen/blink.compat" },
|
||||||
|
opts = {
|
||||||
|
sources = {
|
||||||
|
compat = { "codeium" },
|
||||||
|
providers = {
|
||||||
|
codeium = {
|
||||||
|
kind = "Codeium",
|
||||||
|
score_offset = 100,
|
||||||
|
async = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
} or nil,
|
||||||
|
}
|
||||||
|
|
@ -1,39 +1,18 @@
|
||||||
local M = {}
|
|
||||||
|
|
||||||
---@param kind string
|
|
||||||
function M.pick(kind)
|
|
||||||
return function()
|
|
||||||
local actions = require("CopilotChat.actions")
|
|
||||||
local items = actions[kind .. "_actions"]()
|
|
||||||
if not items then
|
|
||||||
LazyVim.warn("No " .. kind .. " found on the current line")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local ok = pcall(require, "fzf-lua")
|
|
||||||
require("CopilotChat.integrations." .. (ok and "fzflua" or "telescope")).pick(items)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"CopilotC-Nvim/CopilotChat.nvim",
|
"CopilotC-Nvim/CopilotChat.nvim",
|
||||||
branch = "canary",
|
branch = "main",
|
||||||
cmd = "CopilotChat",
|
cmd = "CopilotChat",
|
||||||
opts = function()
|
opts = function()
|
||||||
local user = vim.env.USER or "User"
|
local user = vim.env.USER or "User"
|
||||||
user = user:sub(1, 1):upper() .. user:sub(2)
|
user = user:sub(1, 1):upper() .. user:sub(2)
|
||||||
return {
|
return {
|
||||||
auto_insert_mode = true,
|
auto_insert_mode = true,
|
||||||
show_help = true,
|
|
||||||
question_header = " " .. user .. " ",
|
question_header = " " .. user .. " ",
|
||||||
answer_header = " Copilot ",
|
answer_header = " Copilot ",
|
||||||
window = {
|
window = {
|
||||||
width = 0.4,
|
width = 0.4,
|
||||||
},
|
},
|
||||||
selection = function(source)
|
|
||||||
local select = require("CopilotChat.select")
|
|
||||||
return select.visual(source) or select.buffer(source)
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
keys = {
|
keys = {
|
||||||
|
|
@ -58,24 +37,28 @@ return {
|
||||||
{
|
{
|
||||||
"<leader>aq",
|
"<leader>aq",
|
||||||
function()
|
function()
|
||||||
local input = vim.fn.input("Quick Chat: ")
|
vim.ui.input({
|
||||||
if input ~= "" then
|
prompt = "Quick Chat: ",
|
||||||
require("CopilotChat").ask(input)
|
}, function(input)
|
||||||
end
|
if input ~= "" then
|
||||||
|
require("CopilotChat").ask(input)
|
||||||
|
end
|
||||||
|
end)
|
||||||
end,
|
end,
|
||||||
desc = "Quick Chat (CopilotChat)",
|
desc = "Quick Chat (CopilotChat)",
|
||||||
mode = { "n", "v" },
|
mode = { "n", "v" },
|
||||||
},
|
},
|
||||||
-- Show help actions with telescope
|
{
|
||||||
{ "<leader>ad", M.pick("help"), desc = "Diagnostic Help (CopilotChat)", mode = { "n", "v" } },
|
"<leader>ap",
|
||||||
-- Show prompts actions with telescope
|
function()
|
||||||
{ "<leader>ap", M.pick("prompt"), desc = "Prompt Actions (CopilotChat)", mode = { "n", "v" } },
|
require("CopilotChat").select_prompt()
|
||||||
|
end,
|
||||||
|
desc = "Prompt Actions (CopilotChat)",
|
||||||
|
mode = { "n", "v" },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
local chat = require("CopilotChat")
|
local chat = require("CopilotChat")
|
||||||
if pcall(require, "cmp") then
|
|
||||||
require("CopilotChat.integrations.cmp").setup()
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("BufEnter", {
|
vim.api.nvim_create_autocmd("BufEnter", {
|
||||||
pattern = "copilot-chat",
|
pattern = "copilot-chat",
|
||||||
|
|
@ -102,4 +85,24 @@ return {
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- Blink integration
|
||||||
|
{
|
||||||
|
"saghen/blink.cmp",
|
||||||
|
optional = true,
|
||||||
|
---@module 'blink.cmp'
|
||||||
|
---@type blink.cmp.Config
|
||||||
|
opts = {
|
||||||
|
sources = {
|
||||||
|
providers = {
|
||||||
|
path = {
|
||||||
|
-- Path sources triggered by "/" interfere with CopilotChat commands
|
||||||
|
enabled = function()
|
||||||
|
return vim.bo.filetype ~= "copilot-chat"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
95
lua/lazyvim/plugins/extras/ai/copilot-native.lua
Normal file
95
lua/lazyvim/plugins/extras/ai/copilot-native.lua
Normal file
|
|
@ -0,0 +1,95 @@
|
||||||
|
---@diagnostic disable: missing-fields
|
||||||
|
if lazyvim_docs then
|
||||||
|
-- Native inline completions don't support being shown as regular completions
|
||||||
|
vim.g.ai_cmp = false
|
||||||
|
end
|
||||||
|
|
||||||
|
if LazyVim.has_extra("ai.copilot-native") then
|
||||||
|
if not vim.lsp.inline_completion then
|
||||||
|
LazyVim.error("You need Neovim >= 0.12 to use the `ai.copilot-native` extra.")
|
||||||
|
return {}
|
||||||
|
end
|
||||||
|
if LazyVim.has_extra("ai.copilot") then
|
||||||
|
LazyVim.error("Please disable the `ai.copilot` extra if you want to use `ai.copilot-native`")
|
||||||
|
return {}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.g.ai_cmp = false
|
||||||
|
local status = {} ---@type table<number, "ok" | "error" | "pending">
|
||||||
|
|
||||||
|
return {
|
||||||
|
desc = "Native Copilot LSP integration. Requires Neovim >= 0.12",
|
||||||
|
-- copilot-language-server
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
opts = {
|
||||||
|
servers = {
|
||||||
|
copilot = {
|
||||||
|
-- stylua: ignore
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<M-]>",
|
||||||
|
function() vim.lsp.inline_completion.select({ count = 1 }) end,
|
||||||
|
desc = "Next Copilot Suggestion",
|
||||||
|
mode = { "i", "n" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<M-[>",
|
||||||
|
function() vim.lsp.inline_completion.select({ count = -1 }) end,
|
||||||
|
desc = "Prev Copilot Suggestion",
|
||||||
|
mode = { "i", "n" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
setup = {
|
||||||
|
copilot = function()
|
||||||
|
vim.schedule(function()
|
||||||
|
vim.lsp.inline_completion.enable()
|
||||||
|
end)
|
||||||
|
-- Accept inline suggestions or next edits
|
||||||
|
LazyVim.cmp.actions.ai_accept = function()
|
||||||
|
return vim.lsp.inline_completion.get()
|
||||||
|
end
|
||||||
|
|
||||||
|
if not LazyVim.has_extra("ai.sidekick") then
|
||||||
|
vim.lsp.config("copilot", {
|
||||||
|
handlers = {
|
||||||
|
didChangeStatus = function(err, res, ctx)
|
||||||
|
if err then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
status[ctx.client_id] = res.kind ~= "Normal" and "error" or res.busy and "pending" or "ok"
|
||||||
|
if res.status == "Error" then
|
||||||
|
LazyVim.error("Please use `:LspCopilotSignIn` to sign in to Copilot")
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- lualine
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
optional = true,
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = function(_, opts)
|
||||||
|
if LazyVim.has_extra("ai.sidekick") then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
table.insert(
|
||||||
|
opts.sections.lualine_x,
|
||||||
|
2,
|
||||||
|
LazyVim.lualine.status(LazyVim.config.icons.kinds.Copilot, function()
|
||||||
|
local clients = vim.lsp.get_clients({ name = "copilot", bufnr = 0 })
|
||||||
|
return #clients > 0 and status[clients[1].id] or nil
|
||||||
|
end)
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
129
lua/lazyvim/plugins/extras/ai/copilot.lua
Normal file
129
lua/lazyvim/plugins/extras/ai/copilot.lua
Normal file
|
|
@ -0,0 +1,129 @@
|
||||||
|
return {
|
||||||
|
recommended = true,
|
||||||
|
-- copilot
|
||||||
|
{
|
||||||
|
"zbirenbaum/copilot.lua",
|
||||||
|
cmd = "Copilot",
|
||||||
|
build = ":Copilot auth",
|
||||||
|
event = "BufReadPost",
|
||||||
|
opts = {
|
||||||
|
suggestion = {
|
||||||
|
enabled = not vim.g.ai_cmp,
|
||||||
|
auto_trigger = true,
|
||||||
|
hide_during_completion = vim.g.ai_cmp,
|
||||||
|
keymap = {
|
||||||
|
accept = false, -- handled by nvim-cmp / blink.cmp
|
||||||
|
next = "<M-]>",
|
||||||
|
prev = "<M-[>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
panel = { enabled = false },
|
||||||
|
filetypes = {
|
||||||
|
markdown = true,
|
||||||
|
help = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- copilot-language-server
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
opts = {
|
||||||
|
servers = {
|
||||||
|
-- copilot.lua only works with its own copilot lsp server
|
||||||
|
copilot = { enabled = false },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- add ai_accept action
|
||||||
|
{
|
||||||
|
"zbirenbaum/copilot.lua",
|
||||||
|
opts = function()
|
||||||
|
LazyVim.cmp.actions.ai_accept = function()
|
||||||
|
if require("copilot.suggestion").is_visible() then
|
||||||
|
LazyVim.create_undo()
|
||||||
|
require("copilot.suggestion").accept()
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- lualine
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
optional = true,
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = function(_, opts)
|
||||||
|
table.insert(
|
||||||
|
opts.sections.lualine_x,
|
||||||
|
2,
|
||||||
|
LazyVim.lualine.status(LazyVim.config.icons.kinds.Copilot, function()
|
||||||
|
local clients = package.loaded["copilot"] and vim.lsp.get_clients({ name = "copilot", bufnr = 0 }) or {}
|
||||||
|
if #clients > 0 then
|
||||||
|
local status = require("copilot.status").data.status
|
||||||
|
return (status == "InProgress" and "pending") or (status == "Warning" and "error") or "ok"
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
vim.g.ai_cmp
|
||||||
|
and {
|
||||||
|
-- copilot cmp source
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
optional = true,
|
||||||
|
dependencies = { -- this will only be evaluated if nvim-cmp is enabled
|
||||||
|
{
|
||||||
|
"zbirenbaum/copilot-cmp",
|
||||||
|
opts = {},
|
||||||
|
config = function(_, opts)
|
||||||
|
local copilot_cmp = require("copilot_cmp")
|
||||||
|
copilot_cmp.setup(opts)
|
||||||
|
-- attach cmp source whenever copilot attaches
|
||||||
|
-- fixes lazy-loading issues with the copilot cmp source
|
||||||
|
LazyVim.lsp.on_attach(function()
|
||||||
|
copilot_cmp._on_insert_enter({})
|
||||||
|
end, "copilot")
|
||||||
|
end,
|
||||||
|
specs = {
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
optional = true,
|
||||||
|
---@param opts cmp.ConfigSchema
|
||||||
|
opts = function(_, opts)
|
||||||
|
table.insert(opts.sources, 1, {
|
||||||
|
name = "copilot",
|
||||||
|
group_index = 1,
|
||||||
|
priority = 100,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"saghen/blink.cmp",
|
||||||
|
optional = true,
|
||||||
|
dependencies = { "fang2hou/blink-copilot" },
|
||||||
|
opts = {
|
||||||
|
sources = {
|
||||||
|
default = { "copilot" },
|
||||||
|
providers = {
|
||||||
|
copilot = {
|
||||||
|
name = "copilot",
|
||||||
|
module = "blink-copilot",
|
||||||
|
score_offset = 100,
|
||||||
|
async = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
or nil,
|
||||||
|
}
|
||||||
109
lua/lazyvim/plugins/extras/ai/sidekick.lua
Normal file
109
lua/lazyvim/plugins/extras/ai/sidekick.lua
Normal file
|
|
@ -0,0 +1,109 @@
|
||||||
|
return {
|
||||||
|
desc = "Next edit suggestions with the Copilot LSP server",
|
||||||
|
|
||||||
|
-- copilot-language-server
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
opts = function(_, opts)
|
||||||
|
local sk = LazyVim.opts("sidekick.nvim") ---@type sidekick.Config|{}
|
||||||
|
if vim.tbl_get(sk, "nes", "enabled") ~= false then
|
||||||
|
opts.servers = opts.servers or {}
|
||||||
|
opts.servers.copilot = opts.servers.copilot or {}
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- lualine
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
optional = true,
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = function(_, opts)
|
||||||
|
local icons = {
|
||||||
|
Error = { " ", "DiagnosticError" },
|
||||||
|
Inactive = { " ", "MsgArea" },
|
||||||
|
Warning = { " ", "DiagnosticWarn" },
|
||||||
|
Normal = { LazyVim.config.icons.kinds.Copilot, "Special" },
|
||||||
|
}
|
||||||
|
table.insert(opts.sections.lualine_x, 2, {
|
||||||
|
function()
|
||||||
|
local status = require("sidekick.status").get()
|
||||||
|
return status and vim.tbl_get(icons, status.kind, 1)
|
||||||
|
end,
|
||||||
|
cond = function()
|
||||||
|
return require("sidekick.status").get() ~= nil
|
||||||
|
end,
|
||||||
|
color = function()
|
||||||
|
local status = require("sidekick.status").get()
|
||||||
|
local hl = status and (status.busy and "DiagnosticWarn" or vim.tbl_get(icons, status.kind, 2))
|
||||||
|
return { fg = Snacks.util.color(hl) }
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"folke/sidekick.nvim",
|
||||||
|
opts = function()
|
||||||
|
-- Accept inline suggestions or next edits
|
||||||
|
LazyVim.cmp.actions.ai_nes = function()
|
||||||
|
local Nes = require("sidekick.nes")
|
||||||
|
if Nes.have() and (Nes.jump() or Nes.apply()) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
-- stylua: ignore
|
||||||
|
keys = {
|
||||||
|
-- nes is also useful in normal mode
|
||||||
|
{ "<tab>", LazyVim.cmp.map({ "ai_nes" }, "<tab>"), mode = { "n" }, expr = true },
|
||||||
|
{ "<leader>a", "", desc = "+ai", mode = { "n", "v" } },
|
||||||
|
{
|
||||||
|
"<c-.>",
|
||||||
|
function() require("sidekick.cli").toggle() end,
|
||||||
|
desc = "Sidekick Toggle",
|
||||||
|
mode = { "n", "t", "i", "x" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>aa",
|
||||||
|
function() require("sidekick.cli").toggle() end,
|
||||||
|
desc = "Sidekick Toggle CLI",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>as",
|
||||||
|
function() require("sidekick.cli").select() end,
|
||||||
|
-- Or to select only installed tools:
|
||||||
|
-- require("sidekick.cli").select({ filter = { installed = true } })
|
||||||
|
desc = "Select CLI",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>ad",
|
||||||
|
function() require("sidekick.cli").close() end,
|
||||||
|
desc = "Detach a CLI Session",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>at",
|
||||||
|
function() require("sidekick.cli").send({ msg = "{this}" }) end,
|
||||||
|
mode = { "x", "n" },
|
||||||
|
desc = "Send This",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>af",
|
||||||
|
function() require("sidekick.cli").send({ msg = "{file}" }) end,
|
||||||
|
desc = "Send File",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>av",
|
||||||
|
function() require("sidekick.cli").send({ msg = "{selection}" }) end,
|
||||||
|
mode = { "x" },
|
||||||
|
desc = "Send Visual Selection",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>ap",
|
||||||
|
function() require("sidekick.cli").prompt() end,
|
||||||
|
mode = { "n", "x" },
|
||||||
|
desc = "Sidekick Select Prompt",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
97
lua/lazyvim/plugins/extras/ai/supermaven.lua
Normal file
97
lua/lazyvim/plugins/extras/ai/supermaven.lua
Normal file
|
|
@ -0,0 +1,97 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"supermaven-inc/supermaven-nvim",
|
||||||
|
event = "InsertEnter",
|
||||||
|
cmd = {
|
||||||
|
"SupermavenUseFree",
|
||||||
|
"SupermavenUsePro",
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
keymaps = {
|
||||||
|
accept_suggestion = nil, -- handled by nvim-cmp / blink.cmp
|
||||||
|
},
|
||||||
|
disable_inline_completion = vim.g.ai_cmp,
|
||||||
|
ignore_filetypes = { "bigfile", "snacks_input", "snacks_notif" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- add ai_accept action
|
||||||
|
{
|
||||||
|
"supermaven-inc/supermaven-nvim",
|
||||||
|
opts = function()
|
||||||
|
require("supermaven-nvim.completion_preview").suggestion_group = "SupermavenSuggestion"
|
||||||
|
LazyVim.cmp.actions.ai_accept = function()
|
||||||
|
local suggestion = require("supermaven-nvim.completion_preview")
|
||||||
|
if suggestion.has_suggestion() then
|
||||||
|
LazyVim.create_undo()
|
||||||
|
vim.schedule(function()
|
||||||
|
suggestion.on_accept_suggestion()
|
||||||
|
end)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- cmp integration
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
optional = true,
|
||||||
|
dependencies = { "supermaven-nvim" },
|
||||||
|
opts = function(_, opts)
|
||||||
|
if vim.g.ai_cmp then
|
||||||
|
table.insert(opts.sources, 1, {
|
||||||
|
name = "supermaven",
|
||||||
|
group_index = 1,
|
||||||
|
priority = 100,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
vim.g.ai_cmp and {
|
||||||
|
"saghen/blink.cmp",
|
||||||
|
optional = true,
|
||||||
|
dependencies = { "supermaven-nvim", "saghen/blink.compat" },
|
||||||
|
opts = {
|
||||||
|
sources = {
|
||||||
|
compat = { "supermaven" },
|
||||||
|
providers = {
|
||||||
|
supermaven = {
|
||||||
|
kind = "Supermaven",
|
||||||
|
score_offset = 100,
|
||||||
|
async = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
} or nil,
|
||||||
|
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
optional = true,
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = function(_, opts)
|
||||||
|
table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.cmp_source("supermaven"))
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"folke/noice.nvim",
|
||||||
|
optional = true,
|
||||||
|
opts = function(_, opts)
|
||||||
|
vim.list_extend(opts.routes, {
|
||||||
|
{
|
||||||
|
filter = {
|
||||||
|
event = "msg_show",
|
||||||
|
any = {
|
||||||
|
{ find = "Starting Supermaven" },
|
||||||
|
{ find = "Supermaven Free Tier" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
skip = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -1,26 +1,22 @@
|
||||||
return {
|
return {
|
||||||
-- Tabnine cmp source
|
-- Tabnine cmp source
|
||||||
{
|
{
|
||||||
"nvim-cmp",
|
"tzachar/cmp-tabnine",
|
||||||
optional = true,
|
build = LazyVim.is_win() and "pwsh -noni .\\install.ps1" or "./install.sh",
|
||||||
dependencies = {
|
opts = {
|
||||||
{
|
max_lines = 1000,
|
||||||
"tzachar/cmp-tabnine",
|
max_num_results = 3,
|
||||||
build = {
|
sort = true,
|
||||||
LazyVim.is_win() and "pwsh -noni .\\install.ps1" or "./install.sh",
|
|
||||||
":CmpTabnineHub",
|
|
||||||
},
|
|
||||||
dependencies = "hrsh7th/nvim-cmp",
|
|
||||||
opts = {
|
|
||||||
max_lines = 1000,
|
|
||||||
max_num_results = 3,
|
|
||||||
sort = true,
|
|
||||||
},
|
|
||||||
config = function(_, opts)
|
|
||||||
require("cmp_tabnine.config"):setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
require("cmp_tabnine.config"):setup(opts)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
optional = true,
|
||||||
|
dependencies = { "tzachar/cmp-tabnine" },
|
||||||
---@param opts cmp.ConfigSchema
|
---@param opts cmp.ConfigSchema
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
table.insert(opts.sources, 1, {
|
table.insert(opts.sources, 1, {
|
||||||
|
|
@ -37,6 +33,25 @@ return {
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"saghen/blink.cmp",
|
||||||
|
optional = true,
|
||||||
|
dependencies = { "tzachar/cmp-tabnine", "saghen/blink.compat" },
|
||||||
|
opts = {
|
||||||
|
sources = {
|
||||||
|
compat = { "cmp_tabnine" },
|
||||||
|
providers = {
|
||||||
|
cmp_tabnine = {
|
||||||
|
kind = "TabNine",
|
||||||
|
score_offset = 100,
|
||||||
|
async = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
-- Show TabNine status in lualine
|
-- Show TabNine status in lualine
|
||||||
{
|
{
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
|
|
@ -1,67 +1,184 @@
|
||||||
|
---@diagnostic disable: missing-fields
|
||||||
|
if lazyvim_docs then
|
||||||
|
-- set to `true` to follow the main branch
|
||||||
|
-- you need to have a working rust toolchain to build the plugin
|
||||||
|
-- in this case.
|
||||||
|
vim.g.lazyvim_blink_main = false
|
||||||
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
|
optional = true,
|
||||||
enabled = false,
|
enabled = false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"saghen/blink.cmp",
|
"saghen/blink.cmp",
|
||||||
version = "*",
|
version = not vim.g.lazyvim_blink_main and "*",
|
||||||
opts_extend = { "sources.completion.enabled_providers" },
|
build = vim.g.lazyvim_blink_main and "cargo build --release",
|
||||||
|
opts_extend = {
|
||||||
|
"sources.completion.enabled_providers",
|
||||||
|
"sources.compat",
|
||||||
|
"sources.default",
|
||||||
|
},
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"rafamadriz/friendly-snippets",
|
"rafamadriz/friendly-snippets",
|
||||||
-- add blink.compat to dependencies
|
-- add blink.compat to dependencies
|
||||||
-- { "saghen/blink.compat", opts = {} },
|
{
|
||||||
|
"saghen/blink.compat",
|
||||||
|
optional = true, -- make optional so it's only enabled if any extras need it
|
||||||
|
opts = {},
|
||||||
|
version = not vim.g.lazyvim_blink_main and "*",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
event = "InsertEnter",
|
event = { "InsertEnter", "CmdlineEnter" },
|
||||||
|
|
||||||
---@module 'blink.cmp'
|
---@module 'blink.cmp'
|
||||||
---@type blink.cmp.Config
|
---@type blink.cmp.Config
|
||||||
opts = {
|
opts = {
|
||||||
highlight = {
|
snippets = {
|
||||||
|
expand = function(snippet, _)
|
||||||
|
return LazyVim.cmp.expand(snippet)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
appearance = {
|
||||||
-- sets the fallback highlight groups to nvim-cmp's highlight groups
|
-- sets the fallback highlight groups to nvim-cmp's highlight groups
|
||||||
-- useful for when your theme doesn't support blink.cmp
|
-- useful for when your theme doesn't support blink.cmp
|
||||||
-- will be removed in a future release, assuming themes add support
|
-- will be removed in a future release, assuming themes add support
|
||||||
use_nvim_cmp_as_default = false,
|
use_nvim_cmp_as_default = false,
|
||||||
|
-- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
|
||||||
|
-- adjusts spacing to ensure icons are aligned
|
||||||
|
nerd_font_variant = "mono",
|
||||||
},
|
},
|
||||||
-- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
|
|
||||||
-- adjusts spacing to ensure icons are aligned
|
completion = {
|
||||||
nerd_font_variant = "mono",
|
accept = {
|
||||||
windows = {
|
-- experimental auto-brackets support
|
||||||
autocomplete = {
|
auto_brackets = {
|
||||||
-- draw = "reversed",
|
enabled = true,
|
||||||
winblend = vim.o.pumblend,
|
},
|
||||||
|
},
|
||||||
|
menu = {
|
||||||
|
draw = {
|
||||||
|
treesitter = { "lsp" },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
documentation = {
|
documentation = {
|
||||||
auto_show = true,
|
auto_show = true,
|
||||||
|
auto_show_delay_ms = 200,
|
||||||
},
|
},
|
||||||
ghost_text = {
|
ghost_text = {
|
||||||
enabled = true,
|
enabled = vim.g.ai_cmp,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- experimental auto-brackets support
|
|
||||||
accept = { auto_brackets = { enabled = true } },
|
|
||||||
|
|
||||||
-- experimental signature help support
|
-- experimental signature help support
|
||||||
-- trigger = { signature_help = { enabled = true } }
|
-- signature = { enabled = true },
|
||||||
|
|
||||||
sources = {
|
sources = {
|
||||||
|
-- adding any nvim-cmp sources here will enable them
|
||||||
|
-- with blink.compat
|
||||||
|
compat = {},
|
||||||
|
default = { "lsp", "path", "snippets", "buffer" },
|
||||||
|
},
|
||||||
|
|
||||||
|
cmdline = {
|
||||||
|
enabled = true,
|
||||||
|
keymap = {
|
||||||
|
preset = "cmdline",
|
||||||
|
["<Right>"] = false,
|
||||||
|
["<Left>"] = false,
|
||||||
|
},
|
||||||
completion = {
|
completion = {
|
||||||
-- remember to enable your providers here
|
list = { selection = { preselect = false } },
|
||||||
enabled_providers = { "lsp", "path", "snippets", "buffer" },
|
menu = {
|
||||||
|
auto_show = function(ctx)
|
||||||
|
return vim.fn.getcmdtype() == ":"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
ghost_text = { enabled = true },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
keymap = {
|
keymap = {
|
||||||
preset = "enter",
|
preset = "enter",
|
||||||
|
["<C-y>"] = { "select_and_accept" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
---@param opts blink.cmp.Config | { sources: { compat: string[] } }
|
||||||
|
config = function(_, opts)
|
||||||
|
-- setup compat sources
|
||||||
|
local enabled = opts.sources.default
|
||||||
|
for _, source in ipairs(opts.sources.compat or {}) do
|
||||||
|
opts.sources.providers[source] = vim.tbl_deep_extend(
|
||||||
|
"force",
|
||||||
|
{ name = source, module = "blink.compat.source" },
|
||||||
|
opts.sources.providers[source] or {}
|
||||||
|
)
|
||||||
|
if type(enabled) == "table" and not vim.tbl_contains(enabled, source) then
|
||||||
|
table.insert(enabled, source)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- add ai_accept to <Tab> key
|
||||||
|
if not opts.keymap["<Tab>"] then
|
||||||
|
if opts.keymap.preset == "super-tab" then -- super-tab
|
||||||
|
opts.keymap["<Tab>"] = {
|
||||||
|
require("blink.cmp.keymap.presets").get("super-tab")["<Tab>"][1],
|
||||||
|
LazyVim.cmp.map({ "snippet_forward", "ai_nes", "ai_accept" }),
|
||||||
|
"fallback",
|
||||||
|
}
|
||||||
|
else -- other presets
|
||||||
|
opts.keymap["<Tab>"] = {
|
||||||
|
LazyVim.cmp.map({ "snippet_forward", "ai_nes", "ai_accept" }),
|
||||||
|
"fallback",
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Unset custom prop to pass blink.cmp validation
|
||||||
|
opts.sources.compat = nil
|
||||||
|
|
||||||
|
-- check if we need to override symbol kinds
|
||||||
|
for _, provider in pairs(opts.sources.providers or {}) do
|
||||||
|
---@cast provider blink.cmp.SourceProviderConfig|{kind?:string}
|
||||||
|
if provider.kind then
|
||||||
|
local CompletionItemKind = require("blink.cmp.types").CompletionItemKind
|
||||||
|
local kind_idx = #CompletionItemKind + 1
|
||||||
|
|
||||||
|
CompletionItemKind[kind_idx] = provider.kind
|
||||||
|
---@diagnostic disable-next-line: no-unknown
|
||||||
|
CompletionItemKind[provider.kind] = kind_idx
|
||||||
|
|
||||||
|
---@type fun(ctx: blink.cmp.Context, items: blink.cmp.CompletionItem[]): blink.cmp.CompletionItem[]
|
||||||
|
local transform_items = provider.transform_items
|
||||||
|
---@param ctx blink.cmp.Context
|
||||||
|
---@param items blink.cmp.CompletionItem[]
|
||||||
|
provider.transform_items = function(ctx, items)
|
||||||
|
items = transform_items and transform_items(ctx, items) or items
|
||||||
|
for _, item in ipairs(items) do
|
||||||
|
item.kind = kind_idx or item.kind
|
||||||
|
item.kind_icon = LazyVim.config.icons.kinds[item.kind_name] or item.kind_icon or nil
|
||||||
|
end
|
||||||
|
return items
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Unset custom prop to pass blink.cmp validation
|
||||||
|
provider.kind = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
require("blink.cmp").setup(opts)
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- add icons
|
-- add icons
|
||||||
{
|
{
|
||||||
"saghen/blink.cmp",
|
"saghen/blink.cmp",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
opts.kind_icons = LazyVim.config.icons.kinds
|
opts.appearance = opts.appearance or {}
|
||||||
|
opts.appearance.kind_icons = vim.tbl_extend("force", opts.appearance.kind_icons or {}, LazyVim.config.icons.kinds)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -70,21 +187,25 @@ return {
|
||||||
"saghen/blink.cmp",
|
"saghen/blink.cmp",
|
||||||
opts = {
|
opts = {
|
||||||
sources = {
|
sources = {
|
||||||
completion = {
|
per_filetype = {
|
||||||
-- add lazydev to your completion providers
|
lua = { inherit_defaults = true, "lazydev" },
|
||||||
enabled_providers = { "lazydev" },
|
|
||||||
},
|
},
|
||||||
providers = {
|
providers = {
|
||||||
lsp = {
|
|
||||||
-- dont show LuaLS require statements when lazydev has items
|
|
||||||
fallback_for = { "lazydev" },
|
|
||||||
},
|
|
||||||
lazydev = {
|
lazydev = {
|
||||||
name = "LazyDev",
|
name = "LazyDev",
|
||||||
module = "lazydev.integrations.blink",
|
module = "lazydev.integrations.blink",
|
||||||
|
score_offset = 100, -- show at a higher priority than lsp
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
-- catppuccin support
|
||||||
|
{
|
||||||
|
"catppuccin",
|
||||||
|
optional = true,
|
||||||
|
opts = {
|
||||||
|
integrations = { blink_cmp = true },
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
return {
|
|
||||||
|
|
||||||
-- codeium cmp source
|
|
||||||
{
|
|
||||||
"nvim-cmp",
|
|
||||||
dependencies = {
|
|
||||||
-- codeium
|
|
||||||
{
|
|
||||||
"Exafunction/codeium.nvim",
|
|
||||||
cmd = "Codeium",
|
|
||||||
build = ":Codeium Auth",
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
---@param opts cmp.ConfigSchema
|
|
||||||
opts = function(_, opts)
|
|
||||||
table.insert(opts.sources, 1, {
|
|
||||||
name = "codeium",
|
|
||||||
group_index = 1,
|
|
||||||
priority = 100,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"nvim-lualine/lualine.nvim",
|
|
||||||
optional = true,
|
|
||||||
event = "VeryLazy",
|
|
||||||
opts = function(_, opts)
|
|
||||||
table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.cmp_source("codeium"))
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,125 +0,0 @@
|
||||||
return {
|
|
||||||
recommended = true,
|
|
||||||
-- copilot
|
|
||||||
{
|
|
||||||
"zbirenbaum/copilot.lua",
|
|
||||||
cmd = "Copilot",
|
|
||||||
build = ":Copilot auth",
|
|
||||||
opts = {
|
|
||||||
suggestion = { enabled = false },
|
|
||||||
panel = { enabled = false },
|
|
||||||
filetypes = {
|
|
||||||
markdown = true,
|
|
||||||
help = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvim-lualine/lualine.nvim",
|
|
||||||
optional = true,
|
|
||||||
event = "VeryLazy",
|
|
||||||
opts = function(_, opts)
|
|
||||||
local colors = {
|
|
||||||
[""] = LazyVim.ui.fg("Special"),
|
|
||||||
["Normal"] = LazyVim.ui.fg("Special"),
|
|
||||||
["Warning"] = LazyVim.ui.fg("DiagnosticError"),
|
|
||||||
["InProgress"] = LazyVim.ui.fg("DiagnosticWarn"),
|
|
||||||
}
|
|
||||||
table.insert(opts.sections.lualine_x, 2, {
|
|
||||||
function()
|
|
||||||
local icon = LazyVim.config.icons.kinds.Copilot
|
|
||||||
local status = require("copilot.api").status.data
|
|
||||||
return icon .. (status.message or "")
|
|
||||||
end,
|
|
||||||
cond = function()
|
|
||||||
if not package.loaded["copilot"] then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local ok, clients = pcall(LazyVim.lsp.get_clients, { name = "copilot", bufnr = 0 })
|
|
||||||
if not ok then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
return ok and #clients > 0
|
|
||||||
end,
|
|
||||||
color = function()
|
|
||||||
if not package.loaded["copilot"] then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local status = require("copilot.api").status.data
|
|
||||||
return colors[status.status] or colors[""]
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- copilot cmp source
|
|
||||||
{
|
|
||||||
"nvim-cmp",
|
|
||||||
dependencies = {
|
|
||||||
{
|
|
||||||
"zbirenbaum/copilot-cmp",
|
|
||||||
dependencies = "copilot.lua",
|
|
||||||
opts = {},
|
|
||||||
config = function(_, opts)
|
|
||||||
local copilot_cmp = require("copilot_cmp")
|
|
||||||
copilot_cmp.setup(opts)
|
|
||||||
-- attach cmp source whenever copilot attaches
|
|
||||||
-- fixes lazy-loading issues with the copilot cmp source
|
|
||||||
LazyVim.lsp.on_attach(function(client)
|
|
||||||
copilot_cmp._on_insert_enter({})
|
|
||||||
end, "copilot")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
---@param opts cmp.ConfigSchema
|
|
||||||
opts = function(_, opts)
|
|
||||||
table.insert(opts.sources, 1, {
|
|
||||||
name = "copilot",
|
|
||||||
group_index = 1,
|
|
||||||
priority = 100,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"saghen/blink.cmp",
|
|
||||||
optional = true,
|
|
||||||
specs = {
|
|
||||||
{
|
|
||||||
"zbirenbaum/copilot.lua",
|
|
||||||
event = "InsertEnter",
|
|
||||||
opts = {
|
|
||||||
suggestion = {
|
|
||||||
enabled = true,
|
|
||||||
auto_trigger = true,
|
|
||||||
keymap = { accept = false },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
windows = {
|
|
||||||
ghost_text = {
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
keymap = {
|
|
||||||
["<Tab>"] = {
|
|
||||||
function(cmp)
|
|
||||||
if cmp.is_in_snippet() then
|
|
||||||
return cmp.accept()
|
|
||||||
elseif require("copilot.suggestion").is_visible() then
|
|
||||||
LazyVim.create_undo()
|
|
||||||
require("copilot.suggestion").accept()
|
|
||||||
return true
|
|
||||||
else
|
|
||||||
return cmp.select_and_accept()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
"snippet_forward",
|
|
||||||
"fallback",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
return {
|
return {
|
||||||
|
-- disable builtin snippet support
|
||||||
|
{ "garymjr/nvim-snippets", optional = true, enabled = false },
|
||||||
|
|
||||||
|
-- add luasnip
|
||||||
{
|
{
|
||||||
"L3MON4D3/LuaSnip",
|
"L3MON4D3/LuaSnip",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
|
|
@ -10,20 +14,7 @@ return {
|
||||||
"rafamadriz/friendly-snippets",
|
"rafamadriz/friendly-snippets",
|
||||||
config = function()
|
config = function()
|
||||||
require("luasnip.loaders.from_vscode").lazy_load()
|
require("luasnip.loaders.from_vscode").lazy_load()
|
||||||
end,
|
require("luasnip.loaders.from_vscode").lazy_load({ paths = { vim.fn.stdpath("config") .. "/snippets" } })
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvim-cmp",
|
|
||||||
dependencies = {
|
|
||||||
"saadparwaiz1/cmp_luasnip",
|
|
||||||
},
|
|
||||||
opts = function(_, opts)
|
|
||||||
opts.snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
require("luasnip").lsp_expand(args.body)
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
table.insert(opts.sources, { name = "luasnip" })
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -32,23 +23,56 @@ return {
|
||||||
delete_check_events = "TextChanged",
|
delete_check_events = "TextChanged",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- add snippet_forward action
|
||||||
{
|
{
|
||||||
"nvim-cmp",
|
"L3MON4D3/LuaSnip",
|
||||||
|
opts = function()
|
||||||
|
LazyVim.cmp.actions.snippet_forward = function()
|
||||||
|
if require("luasnip").jumpable(1) then
|
||||||
|
vim.schedule(function()
|
||||||
|
require("luasnip").jump(1)
|
||||||
|
end)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
LazyVim.cmp.actions.snippet_stop = function()
|
||||||
|
if require("luasnip").expand_or_jumpable() then -- or just jumpable(1) is fine?
|
||||||
|
require("luasnip").unlink_current()
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- nvim-cmp integration
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
optional = true,
|
||||||
|
dependencies = { "saadparwaiz1/cmp_luasnip" },
|
||||||
|
opts = function(_, opts)
|
||||||
|
opts.snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
require("luasnip").lsp_expand(args.body)
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
table.insert(opts.sources, { name = "luasnip" })
|
||||||
|
end,
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{
|
|
||||||
"<tab>",
|
|
||||||
function()
|
|
||||||
return require("luasnip").jumpable(1) and "<Plug>luasnip-jump-next" or "<tab>"
|
|
||||||
end,
|
|
||||||
expr = true, silent = true, mode = "i",
|
|
||||||
},
|
|
||||||
{ "<tab>", function() require("luasnip").jump(1) end, mode = "s" },
|
{ "<tab>", function() require("luasnip").jump(1) end, mode = "s" },
|
||||||
{ "<s-tab>", function() require("luasnip").jump(-1) end, mode = { "i", "s" } },
|
{ "<s-tab>", function() require("luasnip").jump(-1) end, mode = { "i", "s" } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- blink.cmp integration
|
||||||
{
|
{
|
||||||
"garymjr/nvim-snippets",
|
"saghen/blink.cmp",
|
||||||
enabled = false,
|
optional = true,
|
||||||
|
opts = {
|
||||||
|
snippets = {
|
||||||
|
preset = "luasnip",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"echasnovski/mini.comment",
|
"nvim-mini/mini.comment",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = {
|
opts = {
|
||||||
options = {
|
options = {
|
||||||
|
|
|
||||||
171
lua/lazyvim/plugins/extras/coding/mini-snippets.lua
Normal file
171
lua/lazyvim/plugins/extras/coding/mini-snippets.lua
Normal file
|
|
@ -0,0 +1,171 @@
|
||||||
|
if lazyvim_docs then
|
||||||
|
-- Set to `false` to prevent "non-lsp snippets"" from appearing inside completion windows
|
||||||
|
-- Motivation: Less clutter in completion windows and a more direct usage of snippits
|
||||||
|
vim.g.lazyvim_mini_snippets_in_completion = true
|
||||||
|
|
||||||
|
-- NOTE: Please also read:
|
||||||
|
-- https://github.com/nvim-mini/mini.nvim/blob/main/readmes/mini-snippets.md#expand
|
||||||
|
-- :h MiniSnippets-session
|
||||||
|
|
||||||
|
-- Example override for your own config:
|
||||||
|
--[[
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-mini/mini.snippets",
|
||||||
|
opts = function(_, opts)
|
||||||
|
-- By default, for opts.snippets, the extra for mini.snippets only adds gen_loader.from_lang()
|
||||||
|
-- This provides a sensible quickstart, integrating with friendly-snippets
|
||||||
|
-- and your own language-specific snippets
|
||||||
|
--
|
||||||
|
-- In order to change opts.snippets, replace the entire table inside your own opts
|
||||||
|
|
||||||
|
local snippets, config_path = require("mini.snippets"), vim.fn.stdpath("config")
|
||||||
|
|
||||||
|
opts.snippets = { -- override opts.snippets provided by extra...
|
||||||
|
-- Load custom file with global snippets first (order matters)
|
||||||
|
snippets.gen_loader.from_file(config_path .. "/snippets/global.json"),
|
||||||
|
|
||||||
|
-- Load snippets based on current language by reading files from
|
||||||
|
-- "snippets/" subdirectories from 'runtimepath' directories.
|
||||||
|
snippets.gen_loader.from_lang(), -- this is the default in the extra...
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
--]]
|
||||||
|
end
|
||||||
|
|
||||||
|
local include_in_completion = vim.g.lazyvim_mini_snippets_in_completion == nil
|
||||||
|
or vim.g.lazyvim_mini_snippets_in_completion
|
||||||
|
|
||||||
|
local function expand_from_lsp(snippet)
|
||||||
|
local insert = MiniSnippets.config.expand.insert or MiniSnippets.default_insert
|
||||||
|
insert({ body = snippet })
|
||||||
|
end
|
||||||
|
|
||||||
|
local function jump(direction)
|
||||||
|
local is_active = MiniSnippets.session.get(false) ~= nil
|
||||||
|
if is_active then
|
||||||
|
MiniSnippets.session.jump(direction)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
---@type fun(snippets, insert) | nil
|
||||||
|
local expand_select_override = nil
|
||||||
|
|
||||||
|
return {
|
||||||
|
-- disable builtin snippet support:
|
||||||
|
{ "garymjr/nvim-snippets", optional = true, enabled = false },
|
||||||
|
-- disable luasnip:
|
||||||
|
{ "L3MON4D3/LuaSnip", optional = true, enabled = false },
|
||||||
|
|
||||||
|
-- add mini.snippets
|
||||||
|
desc = "Manage and expand snippets (alternative to Luasnip)",
|
||||||
|
{
|
||||||
|
"nvim-mini/mini.snippets",
|
||||||
|
event = "InsertEnter", -- don't depend on other plugins to load...
|
||||||
|
dependencies = "rafamadriz/friendly-snippets",
|
||||||
|
opts = function()
|
||||||
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
|
LazyVim.cmp.actions.snippet_stop = function() end -- by design, <esc> should not stop the session!
|
||||||
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
|
LazyVim.cmp.actions.snippet_forward = function()
|
||||||
|
return jump("next")
|
||||||
|
end
|
||||||
|
|
||||||
|
local mini_snippets = require("mini.snippets")
|
||||||
|
return {
|
||||||
|
snippets = { mini_snippets.gen_loader.from_lang() },
|
||||||
|
|
||||||
|
-- Following the behavior of vim.snippets,
|
||||||
|
-- the intended usage of <esc> is to be able to temporarily exit into normal mode for quick edits.
|
||||||
|
--
|
||||||
|
-- If you'd rather stop the snippet on <esc>, activate the line below in your own config:
|
||||||
|
-- mappings = { stop = "<esc>" }, -- <c-c> by default, see :h MiniSnippets-session
|
||||||
|
|
||||||
|
expand = {
|
||||||
|
select = function(snippets, insert)
|
||||||
|
-- Close completion window on snippet select - vim.ui.select
|
||||||
|
-- Needed to remove virtual text for fzf-lua and telescope, but not for mini.pick...
|
||||||
|
local select = expand_select_override or MiniSnippets.default_select
|
||||||
|
select(snippets, insert)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- nvim-cmp integration
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
optional = true,
|
||||||
|
dependencies = include_in_completion and { "abeldekat/cmp-mini-snippets" } or nil,
|
||||||
|
opts = function(_, opts)
|
||||||
|
local cmp = require("cmp")
|
||||||
|
local cmp_config = require("cmp.config")
|
||||||
|
|
||||||
|
opts.snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
expand_from_lsp(args.body)
|
||||||
|
cmp.resubscribe({ "TextChangedI", "TextChangedP" })
|
||||||
|
cmp_config.set_onetime({ sources = {} })
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
if include_in_completion then
|
||||||
|
table.insert(opts.sources, { name = "mini_snippets" })
|
||||||
|
else
|
||||||
|
expand_select_override = function(snippets, insert)
|
||||||
|
-- stylua: ignore
|
||||||
|
if cmp.visible() then cmp.close() end
|
||||||
|
MiniSnippets.default_select(snippets, insert)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
-- stylua: ignore
|
||||||
|
-- counterpart to <tab> defined in cmp.mappings
|
||||||
|
keys = include_in_completion and { { "<s-tab>", function() jump("prev") end, mode = "i" } } or nil,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- blink.cmp integration
|
||||||
|
{
|
||||||
|
"saghen/blink.cmp",
|
||||||
|
optional = true,
|
||||||
|
opts = function(_, opts)
|
||||||
|
-- Return early
|
||||||
|
if include_in_completion then
|
||||||
|
opts.snippets = { preset = "mini_snippets" }
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Standalone --
|
||||||
|
local blink = require("blink.cmp")
|
||||||
|
expand_select_override = function(snippets, insert)
|
||||||
|
-- Schedule, otherwise blink's virtual text is not removed on vim.ui.select
|
||||||
|
blink.cancel()
|
||||||
|
vim.schedule(function()
|
||||||
|
MiniSnippets.default_select(snippets, insert)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
--
|
||||||
|
-- Blink performs a require on blink.cmp.sources.snippets.default
|
||||||
|
-- By removing the source, that default engine will not be used
|
||||||
|
opts.sources.default = vim.tbl_filter(function(source)
|
||||||
|
return source ~= "snippets"
|
||||||
|
end, opts.sources.default)
|
||||||
|
opts.snippets = { -- need to repeat blink's preset here
|
||||||
|
expand = function(snippet)
|
||||||
|
expand_from_lsp(snippet)
|
||||||
|
blink.resubscribe()
|
||||||
|
end,
|
||||||
|
active = function()
|
||||||
|
return MiniSnippets.session.get(false) ~= nil
|
||||||
|
end,
|
||||||
|
jump = function(direction)
|
||||||
|
jump(direction == -1 and "prev" or "next")
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -3,8 +3,7 @@
|
||||||
-- to select the text inside, change or modify the surrounding characters,
|
-- to select the text inside, change or modify the surrounding characters,
|
||||||
-- and more.
|
-- and more.
|
||||||
return {
|
return {
|
||||||
"echasnovski/mini.surround",
|
"nvim-mini/mini.surround",
|
||||||
recommended = true,
|
|
||||||
keys = function(_, keys)
|
keys = function(_, keys)
|
||||||
-- Populate the keys based on the user's options
|
-- Populate the keys based on the user's options
|
||||||
local opts = LazyVim.opts("mini.surround")
|
local opts = LazyVim.opts("mini.surround")
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"danymat/neogen",
|
"danymat/neogen",
|
||||||
|
dependencies = LazyVim.has("mini.snippets") and { "mini.snippets" } or {},
|
||||||
cmd = "Neogen",
|
cmd = "Neogen",
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
|
|
@ -17,6 +18,7 @@ return {
|
||||||
|
|
||||||
local map = {
|
local map = {
|
||||||
["LuaSnip"] = "luasnip",
|
["LuaSnip"] = "luasnip",
|
||||||
|
["mini.snippets"] = "mini",
|
||||||
["nvim-snippy"] = "snippy",
|
["nvim-snippy"] = "snippy",
|
||||||
["vim-vsnip"] = "vsnip",
|
["vim-vsnip"] = "vsnip",
|
||||||
}
|
}
|
||||||
|
|
|
||||||
121
lua/lazyvim/plugins/extras/coding/nvim-cmp.lua
Normal file
121
lua/lazyvim/plugins/extras/coding/nvim-cmp.lua
Normal file
|
|
@ -0,0 +1,121 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"saghen/blink.cmp",
|
||||||
|
enabled = false,
|
||||||
|
optional = true,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Setup nvim-cmp
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
version = false, -- last release is way too old
|
||||||
|
event = "InsertEnter",
|
||||||
|
dependencies = {
|
||||||
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
"hrsh7th/cmp-buffer",
|
||||||
|
"hrsh7th/cmp-path",
|
||||||
|
},
|
||||||
|
-- Not all LSP servers add brackets when completing a function.
|
||||||
|
-- To better deal with this, LazyVim adds a custom option to cmp,
|
||||||
|
-- that you can configure. For example:
|
||||||
|
--
|
||||||
|
-- ```lua
|
||||||
|
-- opts = {
|
||||||
|
-- auto_brackets = { "python" }
|
||||||
|
-- }
|
||||||
|
-- ```
|
||||||
|
opts = function()
|
||||||
|
-- Register nvim-cmp lsp capabilities
|
||||||
|
vim.lsp.config("*", { capabilities = require("cmp_nvim_lsp").default_capabilities() })
|
||||||
|
|
||||||
|
vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true })
|
||||||
|
local cmp = require("cmp")
|
||||||
|
local defaults = require("cmp.config.default")()
|
||||||
|
local auto_select = true
|
||||||
|
return {
|
||||||
|
auto_brackets = {}, -- configure any filetype to auto add brackets
|
||||||
|
completion = {
|
||||||
|
completeopt = "menu,menuone,noinsert" .. (auto_select and "" or ",noselect"),
|
||||||
|
},
|
||||||
|
preselect = auto_select and cmp.PreselectMode.Item or cmp.PreselectMode.None,
|
||||||
|
mapping = cmp.mapping.preset.insert({
|
||||||
|
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||||
|
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||||
|
["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||||
|
["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||||
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
|
["<CR>"] = LazyVim.cmp.confirm({ select = auto_select }),
|
||||||
|
["<C-y>"] = LazyVim.cmp.confirm({ select = true }),
|
||||||
|
["<S-CR>"] = LazyVim.cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||||
|
["<C-CR>"] = function(fallback)
|
||||||
|
cmp.abort()
|
||||||
|
fallback()
|
||||||
|
end,
|
||||||
|
["<tab>"] = function(fallback)
|
||||||
|
return LazyVim.cmp.map({ "snippet_forward", "ai_nes", "ai_accept" }, fallback)()
|
||||||
|
end,
|
||||||
|
}),
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = "lazydev" },
|
||||||
|
{ name = "nvim_lsp" },
|
||||||
|
{ name = "path" },
|
||||||
|
}, {
|
||||||
|
{ name = "buffer" },
|
||||||
|
}),
|
||||||
|
formatting = {
|
||||||
|
format = function(entry, item)
|
||||||
|
local icons = LazyVim.config.icons.kinds
|
||||||
|
if icons[item.kind] then
|
||||||
|
item.kind = icons[item.kind] .. item.kind
|
||||||
|
end
|
||||||
|
|
||||||
|
local widths = {
|
||||||
|
abbr = vim.g.cmp_widths and vim.g.cmp_widths.abbr or 40,
|
||||||
|
menu = vim.g.cmp_widths and vim.g.cmp_widths.menu or 30,
|
||||||
|
}
|
||||||
|
|
||||||
|
for key, width in pairs(widths) do
|
||||||
|
if item[key] and vim.fn.strdisplaywidth(item[key]) > width then
|
||||||
|
item[key] = vim.fn.strcharpart(item[key], 0, width - 1) .. "…"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return item
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
experimental = {
|
||||||
|
-- only show ghost text when we show ai completions
|
||||||
|
ghost_text = vim.g.ai_cmp and {
|
||||||
|
hl_group = "CmpGhostText",
|
||||||
|
} or false,
|
||||||
|
},
|
||||||
|
sorting = defaults.sorting,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
main = "lazyvim.util.cmp",
|
||||||
|
},
|
||||||
|
|
||||||
|
-- snippets
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
dependencies = {
|
||||||
|
{
|
||||||
|
"garymjr/nvim-snippets",
|
||||||
|
opts = {
|
||||||
|
friendly_snippets = true,
|
||||||
|
},
|
||||||
|
dependencies = { "rafamadriz/friendly-snippets" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = function(_, opts)
|
||||||
|
opts.snippet = {
|
||||||
|
expand = function(item)
|
||||||
|
return LazyVim.cmp.expand(item.body)
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
if LazyVim.has("nvim-snippets") then
|
||||||
|
table.insert(opts.sources, { name = "snippets" })
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -13,6 +13,8 @@ return {
|
||||||
function()
|
function()
|
||||||
if LazyVim.pick.picker.name == "telescope" then
|
if LazyVim.pick.picker.name == "telescope" then
|
||||||
require("telescope").extensions.yank_history.yank_history({})
|
require("telescope").extensions.yank_history.yank_history({})
|
||||||
|
elseif LazyVim.pick.picker.name == "snacks" then
|
||||||
|
Snacks.picker.yanky()
|
||||||
else
|
else
|
||||||
vim.cmd([[YankyRingHistory]])
|
vim.cmd([[YankyRingHistory]])
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@ return {
|
||||||
|
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>d", "", desc = "+debug", mode = {"n", "v"} },
|
|
||||||
{ "<leader>dB", function() require("dap").set_breakpoint(vim.fn.input('Breakpoint condition: ')) end, desc = "Breakpoint Condition" },
|
{ "<leader>dB", function() require("dap").set_breakpoint(vim.fn.input('Breakpoint condition: ')) end, desc = "Breakpoint Condition" },
|
||||||
{ "<leader>db", function() require("dap").toggle_breakpoint() end, desc = "Toggle Breakpoint" },
|
{ "<leader>db", function() require("dap").toggle_breakpoint() end, desc = "Toggle Breakpoint" },
|
||||||
{ "<leader>dc", function() require("dap").continue() end, desc = "Run/Continue" },
|
{ "<leader>dc", function() require("dap").continue() end, desc = "Run/Continue" },
|
||||||
|
|
@ -46,7 +45,7 @@ return {
|
||||||
{ "<leader>dl", function() require("dap").run_last() end, desc = "Run Last" },
|
{ "<leader>dl", function() require("dap").run_last() end, desc = "Run Last" },
|
||||||
{ "<leader>do", function() require("dap").step_out() end, desc = "Step Out" },
|
{ "<leader>do", function() require("dap").step_out() end, desc = "Step Out" },
|
||||||
{ "<leader>dO", function() require("dap").step_over() end, desc = "Step Over" },
|
{ "<leader>dO", function() require("dap").step_over() end, desc = "Step Over" },
|
||||||
{ "<leader>dp", function() require("dap").pause() end, desc = "Pause" },
|
{ "<leader>dP", function() require("dap").pause() end, desc = "Pause" },
|
||||||
{ "<leader>dr", function() require("dap").repl.toggle() end, desc = "Toggle REPL" },
|
{ "<leader>dr", function() require("dap").repl.toggle() end, desc = "Toggle REPL" },
|
||||||
{ "<leader>ds", function() require("dap").session() end, desc = "Session" },
|
{ "<leader>ds", function() require("dap").session() end, desc = "Session" },
|
||||||
{ "<leader>dt", function() require("dap").terminate() end, desc = "Terminate" },
|
{ "<leader>dt", function() require("dap").terminate() end, desc = "Terminate" },
|
||||||
|
|
|
||||||
|
|
@ -98,39 +98,40 @@ return {
|
||||||
return {
|
return {
|
||||||
dials_by_ft = {
|
dials_by_ft = {
|
||||||
css = "css",
|
css = "css",
|
||||||
|
vue = "vue",
|
||||||
javascript = "typescript",
|
javascript = "typescript",
|
||||||
|
typescript = "typescript",
|
||||||
|
typescriptreact = "typescript",
|
||||||
javascriptreact = "typescript",
|
javascriptreact = "typescript",
|
||||||
json = "json",
|
json = "json",
|
||||||
lua = "lua",
|
lua = "lua",
|
||||||
markdown = "markdown",
|
markdown = "markdown",
|
||||||
python = "python",
|
|
||||||
sass = "css",
|
sass = "css",
|
||||||
scss = "css",
|
scss = "css",
|
||||||
typescript = "typescript",
|
python = "python",
|
||||||
typescriptreact = "typescript",
|
|
||||||
yaml = "yaml",
|
|
||||||
},
|
},
|
||||||
groups = {
|
groups = {
|
||||||
default = {
|
default = {
|
||||||
augend.integer.alias.decimal, -- nonnegative decimal number (0, 1, 2, 3, ...)
|
augend.integer.alias.decimal, -- nonnegative decimal number (0, 1, 2, 3, ...)
|
||||||
|
augend.integer.alias.decimal_int, -- nonnegative and negative decimal number
|
||||||
augend.integer.alias.hex, -- nonnegative hex number (0x01, 0x1a1f, etc.)
|
augend.integer.alias.hex, -- nonnegative hex number (0x01, 0x1a1f, etc.)
|
||||||
augend.date.alias["%Y/%m/%d"], -- date (2022/02/19, etc.)
|
augend.date.alias["%Y/%m/%d"], -- date (2022/02/19, etc.)
|
||||||
ordinal_numbers,
|
ordinal_numbers,
|
||||||
weekdays,
|
weekdays,
|
||||||
months,
|
months,
|
||||||
},
|
capitalized_boolean,
|
||||||
typescript = {
|
|
||||||
augend.integer.alias.decimal_int, -- nonnegative and negative decimal number
|
|
||||||
augend.constant.alias.bool, -- boolean value (true <-> false)
|
augend.constant.alias.bool, -- boolean value (true <-> false)
|
||||||
logical_alias,
|
logical_alias,
|
||||||
|
},
|
||||||
|
vue = {
|
||||||
|
augend.constant.new({ elements = { "let", "const" } }),
|
||||||
|
augend.hexcolor.new({ case = "lower" }),
|
||||||
|
augend.hexcolor.new({ case = "upper" }),
|
||||||
|
},
|
||||||
|
typescript = {
|
||||||
augend.constant.new({ elements = { "let", "const" } }),
|
augend.constant.new({ elements = { "let", "const" } }),
|
||||||
},
|
},
|
||||||
yaml = {
|
|
||||||
augend.integer.alias.decimal_int, -- nonnegative and negative decimal number
|
|
||||||
augend.constant.alias.bool, -- boolean value (true <-> false)
|
|
||||||
},
|
|
||||||
css = {
|
css = {
|
||||||
augend.integer.alias.decimal_int, -- nonnegative and negative decimal number
|
|
||||||
augend.hexcolor.new({
|
augend.hexcolor.new({
|
||||||
case = "lower",
|
case = "lower",
|
||||||
}),
|
}),
|
||||||
|
|
@ -139,15 +140,17 @@ return {
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
markdown = {
|
markdown = {
|
||||||
|
augend.constant.new({
|
||||||
|
elements = { "[ ]", "[x]" },
|
||||||
|
word = false,
|
||||||
|
cyclic = true,
|
||||||
|
}),
|
||||||
augend.misc.alias.markdown_header,
|
augend.misc.alias.markdown_header,
|
||||||
},
|
},
|
||||||
json = {
|
json = {
|
||||||
augend.integer.alias.decimal_int, -- nonnegative and negative decimal number
|
|
||||||
augend.semver.alias.semver, -- versioning (v1.1.2)
|
augend.semver.alias.semver, -- versioning (v1.1.2)
|
||||||
},
|
},
|
||||||
lua = {
|
lua = {
|
||||||
augend.integer.alias.decimal_int, -- nonnegative and negative decimal number
|
|
||||||
augend.constant.alias.bool, -- boolean value (true <-> false)
|
|
||||||
augend.constant.new({
|
augend.constant.new({
|
||||||
elements = { "and", "or" },
|
elements = { "and", "or" },
|
||||||
word = true, -- if false, "sand" is incremented into "sor", "doctor" into "doctand", etc.
|
word = true, -- if false, "sand" is incremented into "sor", "doctor" into "doctand", etc.
|
||||||
|
|
@ -155,14 +158,20 @@ return {
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
python = {
|
python = {
|
||||||
augend.integer.alias.decimal_int, -- nonnegative and negative decimal number
|
augend.constant.new({
|
||||||
capitalized_boolean,
|
elements = { "and", "or" },
|
||||||
logical_alias,
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
|
-- copy defaults to each group
|
||||||
|
for name, group in pairs(opts.groups) do
|
||||||
|
if name ~= "default" then
|
||||||
|
vim.list_extend(group, opts.groups.default)
|
||||||
|
end
|
||||||
|
end
|
||||||
require("dial.config").augends:register_group(opts.groups)
|
require("dial.config").augends:register_group(opts.groups)
|
||||||
vim.g.dials_by_ft = opts.dials_by_ft
|
vim.g.dials_by_ft = opts.dials_by_ft
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
|
|
@ -40,13 +40,13 @@ end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
desc = "Awesome picker for FZF (alternative to Telescope)",
|
desc = "Awesome picker for FZF (alternative to Telescope)",
|
||||||
recommended = true,
|
|
||||||
{
|
{
|
||||||
"ibhagwan/fzf-lua",
|
"ibhagwan/fzf-lua",
|
||||||
cmd = "FzfLua",
|
cmd = "FzfLua",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
local config = require("fzf-lua.config")
|
local fzf = require("fzf-lua")
|
||||||
local actions = require("fzf-lua.actions")
|
local config = fzf.config
|
||||||
|
local actions = fzf.actions
|
||||||
|
|
||||||
-- Quickfix
|
-- Quickfix
|
||||||
config.defaults.keymap.fzf["ctrl-q"] = "select-all+accept"
|
config.defaults.keymap.fzf["ctrl-q"] = "select-all+accept"
|
||||||
|
|
@ -74,18 +74,6 @@ return {
|
||||||
config.defaults.actions.files["alt-c"] = config.defaults.actions.files["ctrl-r"]
|
config.defaults.actions.files["alt-c"] = config.defaults.actions.files["ctrl-r"]
|
||||||
config.set_action_helpstr(config.defaults.actions.files["ctrl-r"], "toggle-root-dir")
|
config.set_action_helpstr(config.defaults.actions.files["ctrl-r"], "toggle-root-dir")
|
||||||
|
|
||||||
-- use the same prompt for all
|
|
||||||
local defaults = require("fzf-lua.profiles.default-title")
|
|
||||||
local function fix(t)
|
|
||||||
t.prompt = t.prompt ~= nil and " " or nil
|
|
||||||
for _, v in pairs(t) do
|
|
||||||
if type(v) == "table" then
|
|
||||||
fix(v)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
fix(defaults)
|
|
||||||
|
|
||||||
local img_previewer ---@type string[]?
|
local img_previewer ---@type string[]?
|
||||||
for _, v in ipairs({
|
for _, v in ipairs({
|
||||||
{ cmd = "ueberzug", args = {} },
|
{ cmd = "ueberzug", args = {} },
|
||||||
|
|
@ -98,7 +86,8 @@ return {
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return vim.tbl_deep_extend("force", defaults, {
|
return {
|
||||||
|
"default-title",
|
||||||
fzf_colors = true,
|
fzf_colors = true,
|
||||||
fzf_opts = {
|
fzf_opts = {
|
||||||
["--no-scrollbar"] = true,
|
["--no-scrollbar"] = true,
|
||||||
|
|
@ -131,9 +120,9 @@ return {
|
||||||
winopts = {
|
winopts = {
|
||||||
layout = "vertical",
|
layout = "vertical",
|
||||||
-- height is number of items minus 15 lines for the preview, with a max of 80% screen height
|
-- height is number of items minus 15 lines for the preview, with a max of 80% screen height
|
||||||
height = math.floor(math.min(vim.o.lines * 0.8 - 16, #items + 2) + 0.5) + 16,
|
height = math.floor(math.min(vim.o.lines * 0.8 - 16, #items + 4) + 0.5) + 16,
|
||||||
width = 0.5,
|
width = 0.5,
|
||||||
preview = not vim.tbl_isempty(LazyVim.lsp.get_clients({ bufnr = 0, name = "vtsls" })) and {
|
preview = not vim.tbl_isempty(vim.lsp.get_clients({ bufnr = 0, name = "vtsls" })) and {
|
||||||
layout = "vertical",
|
layout = "vertical",
|
||||||
vertical = "down:15,border-top",
|
vertical = "down:15,border-top",
|
||||||
hidden = "hidden",
|
hidden = "hidden",
|
||||||
|
|
@ -146,7 +135,7 @@ return {
|
||||||
winopts = {
|
winopts = {
|
||||||
width = 0.5,
|
width = 0.5,
|
||||||
-- height is number of items, with a max of 80% screen height
|
-- height is number of items, with a max of 80% screen height
|
||||||
height = math.floor(math.min(vim.o.lines * 0.8, #items + 2) + 0.5),
|
height = math.floor(math.min(vim.o.lines * 0.8, #items + 4) + 0.5),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
|
@ -186,9 +175,24 @@ return {
|
||||||
previewer = vim.fn.executable("delta") == 1 and "codeaction_native" or nil,
|
previewer = vim.fn.executable("delta") == 1 and "codeaction_native" or nil,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
}
|
||||||
end,
|
end,
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
|
if opts[1] == "default-title" then
|
||||||
|
-- use the same prompt for all pickers for profile `default-title` and
|
||||||
|
-- profiles that use `default-title` as base profile
|
||||||
|
local function fix(t)
|
||||||
|
t.prompt = t.prompt ~= nil and " " or nil
|
||||||
|
for _, v in pairs(t) do
|
||||||
|
if type(v) == "table" then
|
||||||
|
fix(v)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return t
|
||||||
|
end
|
||||||
|
opts = vim.tbl_deep_extend("force", fix(require("fzf-lua.profiles.default-title")), opts)
|
||||||
|
opts[1] = nil
|
||||||
|
end
|
||||||
require("fzf-lua").setup(opts)
|
require("fzf-lua").setup(opts)
|
||||||
end,
|
end,
|
||||||
init = function()
|
init = function()
|
||||||
|
|
@ -284,10 +288,10 @@ return {
|
||||||
local Keys = require("lazyvim.plugins.lsp.keymaps").get()
|
local Keys = require("lazyvim.plugins.lsp.keymaps").get()
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
vim.list_extend(Keys, {
|
vim.list_extend(Keys, {
|
||||||
{ "gd", "<cmd>FzfLua lsp_definitions jump_to_single_result=true ignore_current_line=true<cr>", desc = "Goto Definition", has = "definition" },
|
{ "gd", "<cmd>FzfLua lsp_definitions jump1=true ignore_current_line=true<cr>", desc = "Goto Definition", has = "definition" },
|
||||||
{ "gr", "<cmd>FzfLua lsp_references jump_to_single_result=true ignore_current_line=true<cr>", desc = "References", nowait = true },
|
{ "gr", "<cmd>FzfLua lsp_references jump1=true ignore_current_line=true<cr>", desc = "References", nowait = true },
|
||||||
{ "gI", "<cmd>FzfLua lsp_implementations jump_to_single_result=true ignore_current_line=true<cr>", desc = "Goto Implementation" },
|
{ "gI", "<cmd>FzfLua lsp_implementations jump1=true ignore_current_line=true<cr>", desc = "Goto Implementation" },
|
||||||
{ "gy", "<cmd>FzfLua lsp_typedefs jump_to_single_result=true ignore_current_line=true<cr>", desc = "Goto T[y]pe Definition" },
|
{ "gy", "<cmd>FzfLua lsp_typedefs jump1=true ignore_current_line=true<cr>", desc = "Goto T[y]pe Definition" },
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ return {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for i = 1, 5 do
|
for i = 1, 9 do
|
||||||
table.insert(keys, {
|
table.insert(keys, {
|
||||||
"<leader>" .. i,
|
"<leader>" .. i,
|
||||||
function()
|
function()
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
-- This works with LSP, Treesitter, and regexp matching to find the other
|
-- This works with LSP, Treesitter, and regexp matching to find the other
|
||||||
-- instances.
|
-- instances.
|
||||||
return {
|
return {
|
||||||
|
-- disable snacks words
|
||||||
|
{ "snacks.nvim", opts = { words = { enabled = false } } },
|
||||||
|
|
||||||
{
|
{
|
||||||
"RRethy/vim-illuminate",
|
"RRethy/vim-illuminate",
|
||||||
event = "LazyFile",
|
event = "LazyFile",
|
||||||
|
|
@ -53,8 +56,4 @@ return {
|
||||||
{ "[[", desc = "Prev Reference" },
|
{ "[[", desc = "Prev Reference" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
opts = { document_highlight = { enabled = false } },
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ return {
|
||||||
|
|
||||||
-- rename surround mappings from gs to gz to prevent conflict with leap
|
-- rename surround mappings from gs to gz to prevent conflict with leap
|
||||||
{
|
{
|
||||||
"echasnovski/mini.surround",
|
"nvim-mini/mini.surround",
|
||||||
optional = true,
|
optional = true,
|
||||||
opts = {
|
opts = {
|
||||||
mappings = {
|
mappings = {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ return {
|
||||||
|
|
||||||
-- setup mini.diff
|
-- setup mini.diff
|
||||||
{
|
{
|
||||||
"echasnovski/mini.diff",
|
"nvim-mini/mini.diff",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
|
|
@ -29,6 +29,29 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"mini.diff",
|
||||||
|
opts = function()
|
||||||
|
Snacks.toggle({
|
||||||
|
name = "Mini Diff Signs",
|
||||||
|
get = function()
|
||||||
|
return vim.g.minidiff_disable ~= true
|
||||||
|
end,
|
||||||
|
set = function(state)
|
||||||
|
vim.g.minidiff_disable = not state
|
||||||
|
if state then
|
||||||
|
require("mini.diff").enable(0)
|
||||||
|
else
|
||||||
|
require("mini.diff").disable(0)
|
||||||
|
end
|
||||||
|
-- HACK: redraw to update the signs
|
||||||
|
vim.defer_fn(function()
|
||||||
|
vim.cmd([[redraw!]])
|
||||||
|
end, 200)
|
||||||
|
end,
|
||||||
|
}):map("<leader>uG")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
-- lualine integration
|
-- lualine integration
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
return {
|
return {
|
||||||
"echasnovski/mini.files",
|
"nvim-mini/mini.files",
|
||||||
opts = {
|
opts = {
|
||||||
windows = {
|
windows = {
|
||||||
preview = true,
|
preview = true,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"echasnovski/mini.move",
|
"nvim-mini/mini.move",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = {},
|
opts = {},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ return {
|
||||||
init = function()
|
init = function()
|
||||||
vim.g.navic_silence = true
|
vim.g.navic_silence = true
|
||||||
LazyVim.lsp.on_attach(function(client, buffer)
|
LazyVim.lsp.on_attach(function(client, buffer)
|
||||||
if client.supports_method("textDocument/documentSymbol") then
|
if client:supports_method("textDocument/documentSymbol") then
|
||||||
require("nvim-navic").attach(client, buffer)
|
require("nvim-navic").attach(client, buffer)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
128
lua/lazyvim/plugins/extras/editor/neo-tree.lua
Normal file
128
lua/lazyvim/plugins/extras/editor/neo-tree.lua
Normal file
|
|
@ -0,0 +1,128 @@
|
||||||
|
return {
|
||||||
|
|
||||||
|
-- file explorer
|
||||||
|
{
|
||||||
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
|
cmd = "Neotree",
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>fe",
|
||||||
|
function()
|
||||||
|
require("neo-tree.command").execute({ toggle = true, dir = LazyVim.root() })
|
||||||
|
end,
|
||||||
|
desc = "Explorer NeoTree (Root Dir)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>fE",
|
||||||
|
function()
|
||||||
|
require("neo-tree.command").execute({ toggle = true, dir = vim.uv.cwd() })
|
||||||
|
end,
|
||||||
|
desc = "Explorer NeoTree (cwd)",
|
||||||
|
},
|
||||||
|
{ "<leader>e", "<leader>fe", desc = "Explorer NeoTree (Root Dir)", remap = true },
|
||||||
|
{ "<leader>E", "<leader>fE", desc = "Explorer NeoTree (cwd)", remap = true },
|
||||||
|
{
|
||||||
|
"<leader>ge",
|
||||||
|
function()
|
||||||
|
require("neo-tree.command").execute({ source = "git_status", toggle = true })
|
||||||
|
end,
|
||||||
|
desc = "Git Explorer",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>be",
|
||||||
|
function()
|
||||||
|
require("neo-tree.command").execute({ source = "buffers", toggle = true })
|
||||||
|
end,
|
||||||
|
desc = "Buffer Explorer",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
deactivate = function()
|
||||||
|
vim.cmd([[Neotree close]])
|
||||||
|
end,
|
||||||
|
init = function()
|
||||||
|
-- FIX: use `autocmd` for lazy-loading neo-tree instead of directly requiring it,
|
||||||
|
-- because `cwd` is not set up properly.
|
||||||
|
vim.api.nvim_create_autocmd("BufEnter", {
|
||||||
|
group = vim.api.nvim_create_augroup("Neotree_start_directory", { clear = true }),
|
||||||
|
desc = "Start Neo-tree with directory",
|
||||||
|
once = true,
|
||||||
|
callback = function()
|
||||||
|
if package.loaded["neo-tree"] then
|
||||||
|
return
|
||||||
|
else
|
||||||
|
local stats = vim.uv.fs_stat(vim.fn.argv(0))
|
||||||
|
if stats and stats.type == "directory" then
|
||||||
|
require("neo-tree")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
opts = {
|
||||||
|
sources = { "filesystem", "buffers", "git_status" },
|
||||||
|
open_files_do_not_replace_types = { "terminal", "Trouble", "trouble", "qf", "Outline" },
|
||||||
|
filesystem = {
|
||||||
|
bind_to_cwd = false,
|
||||||
|
follow_current_file = { enabled = true },
|
||||||
|
use_libuv_file_watcher = true,
|
||||||
|
},
|
||||||
|
window = {
|
||||||
|
mappings = {
|
||||||
|
["l"] = "open",
|
||||||
|
["h"] = "close_node",
|
||||||
|
["<space>"] = "none",
|
||||||
|
["Y"] = {
|
||||||
|
function(state)
|
||||||
|
local node = state.tree:get_node()
|
||||||
|
local path = node:get_id()
|
||||||
|
vim.fn.setreg("+", path, "c")
|
||||||
|
end,
|
||||||
|
desc = "Copy Path to Clipboard",
|
||||||
|
},
|
||||||
|
["O"] = {
|
||||||
|
function(state)
|
||||||
|
require("lazy.util").open(state.tree:get_node().path, { system = true })
|
||||||
|
end,
|
||||||
|
desc = "Open with System Application",
|
||||||
|
},
|
||||||
|
["P"] = { "toggle_preview", config = { use_float = false } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
default_component_configs = {
|
||||||
|
indent = {
|
||||||
|
with_expanders = true, -- if nil and file nesting is enabled, will enable expanders
|
||||||
|
expander_collapsed = "",
|
||||||
|
expander_expanded = "",
|
||||||
|
expander_highlight = "NeoTreeExpander",
|
||||||
|
},
|
||||||
|
git_status = {
|
||||||
|
symbols = {
|
||||||
|
unstaged = "",
|
||||||
|
staged = "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
local function on_move(data)
|
||||||
|
Snacks.rename.on_rename_file(data.source, data.destination)
|
||||||
|
end
|
||||||
|
|
||||||
|
local events = require("neo-tree.events")
|
||||||
|
opts.event_handlers = opts.event_handlers or {}
|
||||||
|
vim.list_extend(opts.event_handlers, {
|
||||||
|
{ event = events.FILE_MOVED, handler = on_move },
|
||||||
|
{ event = events.FILE_RENAMED, handler = on_move },
|
||||||
|
})
|
||||||
|
require("neo-tree").setup(opts)
|
||||||
|
vim.api.nvim_create_autocmd("TermClose", {
|
||||||
|
pattern = "*lazygit",
|
||||||
|
callback = function()
|
||||||
|
if package.loaded["neo-tree.sources.git_status"] then
|
||||||
|
require("neo-tree.sources.git_status").refresh()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
local pick = function()
|
local pick = function()
|
||||||
|
local refactoring = require("refactoring")
|
||||||
if LazyVim.pick.picker.name == "telescope" then
|
if LazyVim.pick.picker.name == "telescope" then
|
||||||
return require("telescope").extensions.refactoring.refactors()
|
return require("telescope").extensions.refactoring.refactors()
|
||||||
elseif LazyVim.pick.picker.name == "fzf" then
|
elseif LazyVim.pick.picker.name == "fzf" then
|
||||||
local fzf_lua = require("fzf-lua")
|
local fzf_lua = require("fzf-lua")
|
||||||
local results = require("refactoring").get_refactors()
|
local results = refactoring.get_refactors()
|
||||||
local refactoring = require("refactoring")
|
|
||||||
|
|
||||||
local opts = {
|
local opts = {
|
||||||
fzf_opts = {},
|
fzf_opts = {},
|
||||||
|
|
@ -16,6 +16,8 @@ local pick = function()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
fzf_lua.fzf_exec(results, opts)
|
fzf_lua.fzf_exec(results, opts)
|
||||||
|
else
|
||||||
|
refactoring.select_refactor()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -28,34 +30,39 @@ return {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>r", "", desc = "+refactor", mode = { "n", "v" } },
|
{ "<leader>r", "", desc = "+refactor", mode = { "n", "x" } },
|
||||||
{
|
{
|
||||||
"<leader>rs",
|
"<leader>rs",
|
||||||
pick,
|
pick,
|
||||||
mode = "v",
|
mode = { "n", "x" },
|
||||||
desc = "Refactor",
|
desc = "Refactor",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>ri",
|
"<leader>ri",
|
||||||
function()
|
function()
|
||||||
require("refactoring").refactor("Inline Variable")
|
return require("refactoring").refactor("Inline Variable")
|
||||||
end,
|
end,
|
||||||
mode = { "n", "v" },
|
mode = { "n", "x" },
|
||||||
desc = "Inline Variable",
|
desc = "Inline Variable",
|
||||||
|
expr = true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>rb",
|
"<leader>rb",
|
||||||
function()
|
function()
|
||||||
require("refactoring").refactor("Extract Block")
|
return require("refactoring").refactor("Extract Block")
|
||||||
end,
|
end,
|
||||||
|
mode = { "n", "x" },
|
||||||
desc = "Extract Block",
|
desc = "Extract Block",
|
||||||
|
expr = true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>rf",
|
"<leader>rf",
|
||||||
function()
|
function()
|
||||||
require("refactoring").refactor("Extract Block To File")
|
return require("refactoring").refactor("Extract Block To File")
|
||||||
end,
|
end,
|
||||||
|
mode = { "n", "x" },
|
||||||
desc = "Extract Block To File",
|
desc = "Extract Block To File",
|
||||||
|
expr = true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>rP",
|
"<leader>rP",
|
||||||
|
|
@ -69,6 +76,7 @@ return {
|
||||||
function()
|
function()
|
||||||
require("refactoring").debug.print_var({ normal = true })
|
require("refactoring").debug.print_var({ normal = true })
|
||||||
end,
|
end,
|
||||||
|
mode = { "n", "x" },
|
||||||
desc = "Debug Print Variable",
|
desc = "Debug Print Variable",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -81,33 +89,36 @@ return {
|
||||||
{
|
{
|
||||||
"<leader>rf",
|
"<leader>rf",
|
||||||
function()
|
function()
|
||||||
require("refactoring").refactor("Extract Function")
|
return require("refactoring").refactor("Extract Function")
|
||||||
end,
|
end,
|
||||||
mode = "v",
|
mode = { "n", "x" },
|
||||||
desc = "Extract Function",
|
desc = "Extract Function",
|
||||||
|
expr = true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>rF",
|
"<leader>rF",
|
||||||
function()
|
function()
|
||||||
require("refactoring").refactor("Extract Function To File")
|
return require("refactoring").refactor("Extract Function To File")
|
||||||
end,
|
end,
|
||||||
mode = "v",
|
mode = { "n", "x" },
|
||||||
desc = "Extract Function To File",
|
desc = "Extract Function To File",
|
||||||
|
expr = true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>rx",
|
"<leader>rx",
|
||||||
function()
|
function()
|
||||||
require("refactoring").refactor("Extract Variable")
|
return require("refactoring").refactor("Extract Variable")
|
||||||
end,
|
end,
|
||||||
mode = "v",
|
mode = { "n", "x" },
|
||||||
desc = "Extract Variable",
|
desc = "Extract Variable",
|
||||||
|
expr = true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>rp",
|
"<leader>rp",
|
||||||
function()
|
function()
|
||||||
require("refactoring").debug.print_var()
|
require("refactoring").debug.print_var()
|
||||||
end,
|
end,
|
||||||
mode = "v",
|
mode = { "n", "x" },
|
||||||
desc = "Debug Print Variable",
|
desc = "Debug Print Variable",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
24
lua/lazyvim/plugins/extras/editor/snacks_explorer.lua
Normal file
24
lua/lazyvim/plugins/extras/editor/snacks_explorer.lua
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
return {
|
||||||
|
desc = "Snacks File Explorer",
|
||||||
|
recommended = true,
|
||||||
|
"folke/snacks.nvim",
|
||||||
|
opts = { explorer = {} },
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>fe",
|
||||||
|
function()
|
||||||
|
Snacks.explorer({ cwd = LazyVim.root() })
|
||||||
|
end,
|
||||||
|
desc = "Explorer Snacks (root dir)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>fE",
|
||||||
|
function()
|
||||||
|
Snacks.explorer()
|
||||||
|
end,
|
||||||
|
desc = "Explorer Snacks (cwd)",
|
||||||
|
},
|
||||||
|
{ "<leader>e", "<leader>fe", desc = "Explorer Snacks (root dir)", remap = true },
|
||||||
|
{ "<leader>E", "<leader>fE", desc = "Explorer Snacks (cwd)", remap = true },
|
||||||
|
},
|
||||||
|
}
|
||||||
255
lua/lazyvim/plugins/extras/editor/snacks_picker.lua
Normal file
255
lua/lazyvim/plugins/extras/editor/snacks_picker.lua
Normal file
|
|
@ -0,0 +1,255 @@
|
||||||
|
if lazyvim_docs then
|
||||||
|
-- In case you don't want to use `:LazyExtras`,
|
||||||
|
-- then you need to set the option below.
|
||||||
|
vim.g.lazyvim_picker = "snacks"
|
||||||
|
end
|
||||||
|
|
||||||
|
---@module 'snacks'
|
||||||
|
|
||||||
|
---@type LazyPicker
|
||||||
|
local picker = {
|
||||||
|
name = "snacks",
|
||||||
|
commands = {
|
||||||
|
files = "files",
|
||||||
|
live_grep = "grep",
|
||||||
|
oldfiles = "recent",
|
||||||
|
},
|
||||||
|
|
||||||
|
---@param source string
|
||||||
|
---@param opts? snacks.picker.Config
|
||||||
|
open = function(source, opts)
|
||||||
|
return Snacks.picker.pick(source, opts)
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
if not LazyVim.pick.register(picker) then
|
||||||
|
return {}
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
desc = "Fast and modern file picker",
|
||||||
|
recommended = true,
|
||||||
|
{
|
||||||
|
"folke/snacks.nvim",
|
||||||
|
opts = {
|
||||||
|
picker = {
|
||||||
|
win = {
|
||||||
|
input = {
|
||||||
|
keys = {
|
||||||
|
["<a-c>"] = {
|
||||||
|
"toggle_cwd",
|
||||||
|
mode = { "n", "i" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
actions = {
|
||||||
|
---@param p snacks.Picker
|
||||||
|
toggle_cwd = function(p)
|
||||||
|
local root = LazyVim.root({ buf = p.input.filter.current_buf, normalize = true })
|
||||||
|
local cwd = vim.fs.normalize((vim.uv or vim.loop).cwd() or ".")
|
||||||
|
local current = p:cwd()
|
||||||
|
p:set_cwd(current == root and cwd or root)
|
||||||
|
p:find()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- stylua: ignore
|
||||||
|
keys = {
|
||||||
|
{ "<leader>,", function() Snacks.picker.buffers() end, desc = "Buffers" },
|
||||||
|
{ "<leader>/", LazyVim.pick("grep"), desc = "Grep (Root Dir)" },
|
||||||
|
{ "<leader>:", function() Snacks.picker.command_history() end, desc = "Command History" },
|
||||||
|
{ "<leader><space>", LazyVim.pick("files"), desc = "Find Files (Root Dir)" },
|
||||||
|
{ "<leader>n", function() Snacks.picker.notifications() end, desc = "Notification History" },
|
||||||
|
-- find
|
||||||
|
{ "<leader>fb", function() Snacks.picker.buffers() end, desc = "Buffers" },
|
||||||
|
{ "<leader>fB", function() Snacks.picker.buffers({ hidden = true, nofile = true }) end, desc = "Buffers (all)" },
|
||||||
|
{ "<leader>fc", LazyVim.pick.config_files(), desc = "Find Config File" },
|
||||||
|
{ "<leader>ff", LazyVim.pick("files"), desc = "Find Files (Root Dir)" },
|
||||||
|
{ "<leader>fF", LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" },
|
||||||
|
{ "<leader>fg", function() Snacks.picker.git_files() end, desc = "Find Files (git-files)" },
|
||||||
|
{ "<leader>fr", LazyVim.pick("oldfiles"), desc = "Recent" },
|
||||||
|
{ "<leader>fR", function() Snacks.picker.recent({ filter = { cwd = true }}) end, desc = "Recent (cwd)" },
|
||||||
|
{ "<leader>fp", function() Snacks.picker.projects() end, desc = "Projects" },
|
||||||
|
-- git
|
||||||
|
{ "<leader>gd", function() Snacks.picker.git_diff() end, desc = "Git Diff (hunks)" },
|
||||||
|
{ "<leader>gs", function() Snacks.picker.git_status() end, desc = "Git Status" },
|
||||||
|
{ "<leader>gS", function() Snacks.picker.git_stash() end, desc = "Git Stash" },
|
||||||
|
-- Grep
|
||||||
|
{ "<leader>sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" },
|
||||||
|
{ "<leader>sB", function() Snacks.picker.grep_buffers() end, desc = "Grep Open Buffers" },
|
||||||
|
{ "<leader>sg", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" },
|
||||||
|
{ "<leader>sG", LazyVim.pick("live_grep", { root = false }), desc = "Grep (cwd)" },
|
||||||
|
{ "<leader>sp", function() Snacks.picker.lazy() end, desc = "Search for Plugin Spec" },
|
||||||
|
{ "<leader>sw", LazyVim.pick("grep_word"), desc = "Visual selection or word (Root Dir)", mode = { "n", "x" } },
|
||||||
|
{ "<leader>sW", LazyVim.pick("grep_word", { root = false }), desc = "Visual selection or word (cwd)", mode = { "n", "x" } },
|
||||||
|
-- search
|
||||||
|
{ '<leader>s"', function() Snacks.picker.registers() end, desc = "Registers" },
|
||||||
|
{ '<leader>s/', function() Snacks.picker.search_history() end, desc = "Search History" },
|
||||||
|
{ "<leader>sa", function() Snacks.picker.autocmds() end, desc = "Autocmds" },
|
||||||
|
{ "<leader>sc", function() Snacks.picker.command_history() end, desc = "Command History" },
|
||||||
|
{ "<leader>sC", function() Snacks.picker.commands() end, desc = "Commands" },
|
||||||
|
{ "<leader>sd", function() Snacks.picker.diagnostics() end, desc = "Diagnostics" },
|
||||||
|
{ "<leader>sD", function() Snacks.picker.diagnostics_buffer() end, desc = "Buffer Diagnostics" },
|
||||||
|
{ "<leader>sh", function() Snacks.picker.help() end, desc = "Help Pages" },
|
||||||
|
{ "<leader>sH", function() Snacks.picker.highlights() end, desc = "Highlights" },
|
||||||
|
{ "<leader>si", function() Snacks.picker.icons() end, desc = "Icons" },
|
||||||
|
{ "<leader>sj", function() Snacks.picker.jumps() end, desc = "Jumps" },
|
||||||
|
{ "<leader>sk", function() Snacks.picker.keymaps() end, desc = "Keymaps" },
|
||||||
|
{ "<leader>sl", function() Snacks.picker.loclist() end, desc = "Location List" },
|
||||||
|
{ "<leader>sM", function() Snacks.picker.man() end, desc = "Man Pages" },
|
||||||
|
{ "<leader>sm", function() Snacks.picker.marks() end, desc = "Marks" },
|
||||||
|
{ "<leader>sR", function() Snacks.picker.resume() end, desc = "Resume" },
|
||||||
|
{ "<leader>sq", function() Snacks.picker.qflist() end, desc = "Quickfix List" },
|
||||||
|
{ "<leader>su", function() Snacks.picker.undo() end, desc = "Undotree" },
|
||||||
|
-- ui
|
||||||
|
{ "<leader>uC", function() Snacks.picker.colorschemes() end, desc = "Colorschemes" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"folke/snacks.nvim",
|
||||||
|
opts = function(_, opts)
|
||||||
|
if LazyVim.has("trouble.nvim") then
|
||||||
|
return vim.tbl_deep_extend("force", opts or {}, {
|
||||||
|
picker = {
|
||||||
|
actions = {
|
||||||
|
trouble_open = function(...)
|
||||||
|
return require("trouble.sources.snacks").actions.trouble_open.action(...)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
win = {
|
||||||
|
input = {
|
||||||
|
keys = {
|
||||||
|
["<a-t>"] = {
|
||||||
|
"trouble_open",
|
||||||
|
mode = { "n", "i" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
opts = function()
|
||||||
|
local Keys = require("lazyvim.plugins.lsp.keymaps").get()
|
||||||
|
-- stylua: ignore
|
||||||
|
vim.list_extend(Keys, {
|
||||||
|
{ "gd", function() Snacks.picker.lsp_definitions() end, desc = "Goto Definition", has = "definition" },
|
||||||
|
{ "gr", function() Snacks.picker.lsp_references() end, nowait = true, desc = "References" },
|
||||||
|
{ "gI", function() Snacks.picker.lsp_implementations() end, desc = "Goto Implementation" },
|
||||||
|
{ "gy", function() Snacks.picker.lsp_type_definitions() end, desc = "Goto T[y]pe Definition" },
|
||||||
|
{ "<leader>ss", function() Snacks.picker.lsp_symbols({ filter = LazyVim.config.kind_filter }) end, desc = "LSP Symbols", has = "documentSymbol" },
|
||||||
|
{ "<leader>sS", function() Snacks.picker.lsp_workspace_symbols({ filter = LazyVim.config.kind_filter }) end, desc = "LSP Workspace Symbols", has = "workspace/symbols" },
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"folke/todo-comments.nvim",
|
||||||
|
optional = true,
|
||||||
|
-- stylua: ignore
|
||||||
|
keys = {
|
||||||
|
{ "<leader>st", function() Snacks.picker.todo_comments() end, desc = "Todo" },
|
||||||
|
{ "<leader>sT", function () Snacks.picker.todo_comments({ keywords = { "TODO", "FIX", "FIXME" } }) end, desc = "Todo/Fix/Fixme" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"folke/snacks.nvim",
|
||||||
|
opts = function(_, opts)
|
||||||
|
table.insert(opts.dashboard.preset.keys, 3, {
|
||||||
|
icon = " ",
|
||||||
|
key = "p",
|
||||||
|
desc = "Projects",
|
||||||
|
action = ":lua Snacks.picker.projects()",
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"goolord/alpha-nvim",
|
||||||
|
optional = true,
|
||||||
|
opts = function(_, dashboard)
|
||||||
|
local button = dashboard.button("p", " " .. " Projects", [[<cmd> lua Snacks.picker.projects() <cr>]])
|
||||||
|
button.opts.hl = "AlphaButtons"
|
||||||
|
button.opts.hl_shortcut = "AlphaShortcut"
|
||||||
|
table.insert(dashboard.section.buttons.val, 4, button)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvim-mini/mini.starter",
|
||||||
|
optional = true,
|
||||||
|
opts = function(_, opts)
|
||||||
|
local items = {
|
||||||
|
{
|
||||||
|
name = "Projects",
|
||||||
|
action = [[lua Snacks.picker.projects()]],
|
||||||
|
section = string.rep(" ", 22) .. "Telescope",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
vim.list_extend(opts.items, items)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvimdev/dashboard-nvim",
|
||||||
|
optional = true,
|
||||||
|
opts = function(_, opts)
|
||||||
|
if not vim.tbl_get(opts, "config", "center") then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local projects = {
|
||||||
|
action = "lua Snacks.picker.projects()",
|
||||||
|
desc = " Projects",
|
||||||
|
icon = " ",
|
||||||
|
key = "p",
|
||||||
|
}
|
||||||
|
|
||||||
|
projects.desc = projects.desc .. string.rep(" ", 43 - #projects.desc)
|
||||||
|
projects.key_format = " %s"
|
||||||
|
|
||||||
|
table.insert(opts.config.center, 3, projects)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"folke/flash.nvim",
|
||||||
|
optional = true,
|
||||||
|
specs = {
|
||||||
|
{
|
||||||
|
"folke/snacks.nvim",
|
||||||
|
opts = {
|
||||||
|
picker = {
|
||||||
|
win = {
|
||||||
|
input = {
|
||||||
|
keys = {
|
||||||
|
["<a-s>"] = { "flash", mode = { "n", "i" } },
|
||||||
|
["s"] = { "flash" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
actions = {
|
||||||
|
flash = function(picker)
|
||||||
|
require("flash").jump({
|
||||||
|
pattern = "^",
|
||||||
|
label = { after = { 0, 0 } },
|
||||||
|
search = {
|
||||||
|
mode = "search",
|
||||||
|
exclude = {
|
||||||
|
function(win)
|
||||||
|
return vim.bo[vim.api.nvim_win_get_buf(win)].filetype ~= "snacks_picker_list"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
action = function(match)
|
||||||
|
local idx = picker.list:row2idx(match.pos[1])
|
||||||
|
picker.list:_move(idx, true, true)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -61,9 +61,6 @@ return {
|
||||||
{
|
{
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
cmd = "Telescope",
|
cmd = "Telescope",
|
||||||
enabled = function()
|
|
||||||
return LazyVim.pick.want() == "telescope"
|
|
||||||
end,
|
|
||||||
version = false, -- telescope did only one release, so use HEAD for now
|
version = false, -- telescope did only one release, so use HEAD for now
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{
|
{
|
||||||
|
|
@ -267,9 +264,6 @@ return {
|
||||||
{
|
{
|
||||||
"stevearc/dressing.nvim",
|
"stevearc/dressing.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
enabled = function()
|
|
||||||
return LazyVim.pick.want() == "telescope"
|
|
||||||
end,
|
|
||||||
init = function()
|
init = function()
|
||||||
---@diagnostic disable-next-line: duplicate-set-field
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
vim.ui.select = function(...)
|
vim.ui.select = function(...)
|
||||||
|
|
@ -287,9 +281,6 @@ return {
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
opts = function()
|
opts = function()
|
||||||
if LazyVim.pick.want() ~= "telescope" then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local Keys = require("lazyvim.plugins.lsp.keymaps").get()
|
local Keys = require("lazyvim.plugins.lsp.keymaps").get()
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
vim.list_extend(Keys, {
|
vim.list_extend(Keys, {
|
||||||
|
|
|
||||||
59
lua/lazyvim/plugins/extras/formatting/biome.lua
Normal file
59
lua/lazyvim/plugins/extras/formatting/biome.lua
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
---@diagnostic disable: inject-field
|
||||||
|
if lazyvim_docs then
|
||||||
|
-- Enable this option to avoid conflicts with Prettier.
|
||||||
|
vim.g.lazyvim_prettier_needs_config = true
|
||||||
|
end
|
||||||
|
|
||||||
|
-- https://biomejs.dev/internals/language-support/
|
||||||
|
local supported = {
|
||||||
|
"astro",
|
||||||
|
"css",
|
||||||
|
"graphql",
|
||||||
|
-- "html",
|
||||||
|
"javascript",
|
||||||
|
"javascriptreact",
|
||||||
|
"json",
|
||||||
|
"jsonc",
|
||||||
|
-- "markdown",
|
||||||
|
"svelte",
|
||||||
|
"typescript",
|
||||||
|
"typescriptreact",
|
||||||
|
"vue",
|
||||||
|
-- "yaml",
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"mason-org/mason.nvim",
|
||||||
|
opts = { ensure_installed = { "biome" } },
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"stevearc/conform.nvim",
|
||||||
|
optional = true,
|
||||||
|
---@param opts ConformOpts
|
||||||
|
opts = function(_, opts)
|
||||||
|
opts.formatters_by_ft = opts.formatters_by_ft or {}
|
||||||
|
for _, ft in ipairs(supported) do
|
||||||
|
opts.formatters_by_ft[ft] = opts.formatters_by_ft[ft] or {}
|
||||||
|
table.insert(opts.formatters_by_ft[ft], "biome")
|
||||||
|
end
|
||||||
|
|
||||||
|
opts.formatters = opts.formatters or {}
|
||||||
|
opts.formatters.biome = {
|
||||||
|
require_cwd = true,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- none-ls support
|
||||||
|
{
|
||||||
|
"nvimtools/none-ls.nvim",
|
||||||
|
optional = true,
|
||||||
|
opts = function(_, opts)
|
||||||
|
local nls = require("null-ls")
|
||||||
|
opts.sources = opts.sources or {}
|
||||||
|
table.insert(opts.sources, nls.builtins.formatting.biome)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
table.insert(opts.ensure_installed, "black")
|
table.insert(opts.ensure_installed, "black")
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ M.has_parser = LazyVim.memoize(M.has_parser)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
opts = { ensure_installed = { "prettier" } },
|
opts = { ensure_installed = { "prettier" } },
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ return {
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
opts = { ensure_installed = { "ansible-lint" } },
|
opts = { ensure_installed = { "ansible-lint" } },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@ return {
|
||||||
"compile_commands.json",
|
"compile_commands.json",
|
||||||
"compile_flags.txt",
|
"compile_flags.txt",
|
||||||
"configure.ac", -- AutoTools
|
"configure.ac", -- AutoTools
|
||||||
|
"meson.build",
|
||||||
|
"build.ninja",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
|
@ -60,19 +62,19 @@ return {
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>ch", "<cmd>ClangdSwitchSourceHeader<cr>", desc = "Switch Source/Header (C/C++)" },
|
{ "<leader>ch", "<cmd>ClangdSwitchSourceHeader<cr>", desc = "Switch Source/Header (C/C++)" },
|
||||||
},
|
},
|
||||||
root_dir = function(fname)
|
root_markers = {
|
||||||
return require("lspconfig.util").root_pattern(
|
"compile_commands.json",
|
||||||
"Makefile",
|
"compile_flags.txt",
|
||||||
"configure.ac",
|
"configure.ac", -- AutoTools
|
||||||
"configure.in",
|
"Makefile",
|
||||||
"config.h.in",
|
"configure.ac",
|
||||||
"meson.build",
|
"configure.in",
|
||||||
"meson_options.txt",
|
"config.h.in",
|
||||||
"build.ninja"
|
"meson.build",
|
||||||
)(fname) or require("lspconfig.util").root_pattern("compile_commands.json", "compile_flags.txt")(
|
"meson_options.txt",
|
||||||
fname
|
"build.ninja",
|
||||||
) or require("lspconfig.util").find_git_ancestor(fname)
|
".git",
|
||||||
end,
|
},
|
||||||
capabilities = {
|
capabilities = {
|
||||||
offsetEncoding = { "utf-16" },
|
offsetEncoding = { "utf-16" },
|
||||||
},
|
},
|
||||||
|
|
@ -103,8 +105,11 @@ return {
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
|
optional = true,
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
|
opts.sorting = opts.sorting or {}
|
||||||
|
opts.sorting.comparators = opts.sorting.comparators or {}
|
||||||
table.insert(opts.sorting.comparators, 1, require("clangd_extensions.cmp_scores"))
|
table.insert(opts.sorting.comparators, 1, require("clangd_extensions.cmp_scores"))
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
@ -114,7 +119,7 @@ return {
|
||||||
optional = true,
|
optional = true,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- Ensure C/C++ debugger is installed
|
-- Ensure C/C++ debugger is installed
|
||||||
"williamboman/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
optional = true,
|
optional = true,
|
||||||
opts = { ensure_installed = { "codelldb" } },
|
opts = { ensure_installed = { "codelldb" } },
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -21,13 +21,13 @@ return {
|
||||||
},
|
},
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
if type(opts.sources) == "table" then
|
if type(opts.sources) == "table" then
|
||||||
vim.list_extend(opts.sources, { name = "clojure" })
|
vim.list_extend(opts.sources, { name = "conjure" })
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Add s-exp mappings
|
-- Add s-exp mappings
|
||||||
{ "PaterJason/nvim-treesitter-sexp", opts = {}, event = "LazyFile" },
|
{ "julienvincent/nvim-paredit", opts = {}, event = "LazyFile" },
|
||||||
|
|
||||||
-- Colorize the output of the log buffer
|
-- Colorize the output of the log buffer
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ return {
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
opts = { ensure_installed = { "elm-format" } },
|
opts = { ensure_installed = { "elm-format" } },
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,8 @@ return {
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
|
optional = true,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "petertriho/cmp-git", opts = {} },
|
{ "petertriho/cmp-git", opts = {} },
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,6 @@ return {
|
||||||
rangeVariableTypes = true,
|
rangeVariableTypes = true,
|
||||||
},
|
},
|
||||||
analyses = {
|
analyses = {
|
||||||
fieldalignment = true,
|
|
||||||
nilness = true,
|
nilness = true,
|
||||||
unusedparams = true,
|
unusedparams = true,
|
||||||
unusedwrite = true,
|
unusedwrite = true,
|
||||||
|
|
@ -76,7 +75,7 @@ return {
|
||||||
},
|
},
|
||||||
-- Ensure Go tools are installed
|
-- Ensure Go tools are installed
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
opts = { ensure_installed = { "goimports", "gofumpt" } },
|
opts = { ensure_installed = { "goimports", "gofumpt" } },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -84,7 +83,7 @@ return {
|
||||||
optional = true,
|
optional = true,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
opts = { ensure_installed = { "gomodifytags", "impl" } },
|
opts = { ensure_installed = { "gomodifytags", "impl" } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -112,7 +111,7 @@ return {
|
||||||
optional = true,
|
optional = true,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
opts = { ensure_installed = { "delve" } },
|
opts = { ensure_installed = { "delve" } },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -140,7 +139,7 @@ return {
|
||||||
|
|
||||||
-- Filetype icons
|
-- Filetype icons
|
||||||
{
|
{
|
||||||
"echasnovski/mini.icons",
|
"nvim-mini/mini.icons",
|
||||||
opts = {
|
opts = {
|
||||||
file = {
|
file = {
|
||||||
[".go-version"] = { glyph = "", hl = "MiniIconsBlue" },
|
[".go-version"] = { glyph = "", hl = "MiniIconsBlue" },
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ return {
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
opts = { ensure_installed = { "haskell-language-server" } },
|
opts = { ensure_installed = { "haskell-language-server" } },
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -37,7 +37,7 @@ return {
|
||||||
optional = true,
|
optional = true,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
opts = { ensure_installed = { "haskell-debug-adapter" } },
|
opts = { ensure_installed = { "haskell-debug-adapter" } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -70,7 +70,7 @@ return {
|
||||||
"luc-tielen/telescope_hoogle",
|
"luc-tielen/telescope_hoogle",
|
||||||
ft = { "haskell", "lhaskell", "cabal", "cabalproject" },
|
ft = { "haskell", "lhaskell", "cabal", "cabalproject" },
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "nvim-telescope/telescope.nvim" },
|
{ "nvim-telescope/telescope.nvim", optional = true },
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local ok, telescope = pcall(require, "telescope")
|
local ok, telescope = pcall(require, "telescope")
|
||||||
|
|
|
||||||
|
|
@ -40,9 +40,23 @@ return {
|
||||||
{
|
{
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
optional = true,
|
optional = true,
|
||||||
|
opts = function()
|
||||||
|
-- Simple configuration to attach to remote java debug process
|
||||||
|
-- Taken directly from https://github.com/mfussenegger/nvim-dap/wiki/Java
|
||||||
|
local dap = require("dap")
|
||||||
|
dap.configurations.java = {
|
||||||
|
{
|
||||||
|
type = "java",
|
||||||
|
request = "attach",
|
||||||
|
name = "Debug (Attach) - Remote",
|
||||||
|
hostName = "127.0.0.1",
|
||||||
|
port = 5005,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
opts = { ensure_installed = { "java-debug-adapter", "java-test" } },
|
opts = { ensure_installed = { "java-debug-adapter", "java-test" } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -71,12 +85,15 @@ return {
|
||||||
dependencies = { "folke/which-key.nvim" },
|
dependencies = { "folke/which-key.nvim" },
|
||||||
ft = java_filetypes,
|
ft = java_filetypes,
|
||||||
opts = function()
|
opts = function()
|
||||||
local mason_registry = require("mason-registry")
|
local cmd = { vim.fn.exepath("jdtls") }
|
||||||
local lombok_jar = mason_registry.get_package("jdtls"):get_install_path() .. "/lombok.jar"
|
if LazyVim.has("mason.nvim") then
|
||||||
|
local lombok_jar = vim.fn.expand("$MASON/share/jdtls/lombok.jar")
|
||||||
|
table.insert(cmd, string.format("--jvm-arg=-javaagent:%s", lombok_jar))
|
||||||
|
end
|
||||||
return {
|
return {
|
||||||
-- How to find the root dir for a given filename. The default comes from
|
root_dir = function(path)
|
||||||
-- lspconfig which provides a function specifically for java projects.
|
return vim.fs.root(path, vim.lsp.config.jdtls.root_markers)
|
||||||
root_dir = LazyVim.lsp.get_raw_config("jdtls").default_config.root_dir,
|
end,
|
||||||
|
|
||||||
-- How to find the project name for a given root dir.
|
-- How to find the project name for a given root dir.
|
||||||
project_name = function(root_dir)
|
project_name = function(root_dir)
|
||||||
|
|
@ -93,10 +110,7 @@ return {
|
||||||
|
|
||||||
-- How to run jdtls. This can be overridden to a full java command-line
|
-- How to run jdtls. This can be overridden to a full java command-line
|
||||||
-- if the Python wrapper script doesn't suffice.
|
-- if the Python wrapper script doesn't suffice.
|
||||||
cmd = {
|
cmd = cmd,
|
||||||
vim.fn.exepath("jdtls"),
|
|
||||||
string.format("--jvm-arg=-javaagent:%s", lombok_jar),
|
|
||||||
},
|
|
||||||
full_cmd = function(opts)
|
full_cmd = function(opts)
|
||||||
local fname = vim.api.nvim_buf_get_name(0)
|
local fname = vim.api.nvim_buf_get_name(0)
|
||||||
local root_dir = opts.root_dir(fname)
|
local root_dir = opts.root_dir(fname)
|
||||||
|
|
@ -115,6 +129,7 @@ return {
|
||||||
|
|
||||||
-- These depend on nvim-dap, but can additionally be disabled by setting false here.
|
-- These depend on nvim-dap, but can additionally be disabled by setting false here.
|
||||||
dap = { hotcodereplace = "auto", config_overrides = {} },
|
dap = { hotcodereplace = "auto", config_overrides = {} },
|
||||||
|
-- Can set this to false to disable main class scan, which is a performance killer for large project
|
||||||
dap_main = {},
|
dap_main = {},
|
||||||
test = true,
|
test = true,
|
||||||
settings = {
|
settings = {
|
||||||
|
|
@ -131,29 +146,17 @@ return {
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
-- Find the extra bundles that should be passed on the jdtls command-line
|
-- Find the extra bundles that should be passed on the jdtls command-line
|
||||||
-- if nvim-dap is enabled with java debug/test.
|
-- if nvim-dap is enabled with java debug/test.
|
||||||
local mason_registry = require("mason-registry")
|
|
||||||
local bundles = {} ---@type string[]
|
local bundles = {} ---@type string[]
|
||||||
if opts.dap and LazyVim.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then
|
if LazyVim.has("mason.nvim") then
|
||||||
local java_dbg_pkg = mason_registry.get_package("java-debug-adapter")
|
local mason_registry = require("mason-registry")
|
||||||
local java_dbg_path = java_dbg_pkg:get_install_path()
|
if opts.dap and LazyVim.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then
|
||||||
local jar_patterns = {
|
bundles = vim.fn.glob("$MASON/share/java-debug-adapter/com.microsoft.java.debug.plugin-*jar", false, true)
|
||||||
java_dbg_path .. "/extension/server/com.microsoft.java.debug.plugin-*.jar",
|
-- java-test also depends on java-debug-adapter.
|
||||||
}
|
if opts.test and mason_registry.is_installed("java-test") then
|
||||||
-- java-test also depends on java-debug-adapter.
|
vim.list_extend(bundles, vim.fn.glob("$MASON/share/java-test/*.jar", false, true))
|
||||||
if opts.test and mason_registry.is_installed("java-test") then
|
|
||||||
local java_test_pkg = mason_registry.get_package("java-test")
|
|
||||||
local java_test_path = java_test_pkg:get_install_path()
|
|
||||||
vim.list_extend(jar_patterns, {
|
|
||||||
java_test_path .. "/extension/server/*.jar",
|
|
||||||
})
|
|
||||||
end
|
|
||||||
for _, jar_pattern in ipairs(jar_patterns) do
|
|
||||||
for _, bundle in ipairs(vim.split(vim.fn.glob(jar_pattern), "\n")) do
|
|
||||||
table.insert(bundles, bundle)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function attach_jdtls()
|
local function attach_jdtls()
|
||||||
local fname = vim.api.nvim_buf_get_name(0)
|
local fname = vim.api.nvim_buf_get_name(0)
|
||||||
|
|
||||||
|
|
@ -197,8 +200,8 @@ return {
|
||||||
{ "<leader>cx", group = "extract" },
|
{ "<leader>cx", group = "extract" },
|
||||||
{ "<leader>cxv", require("jdtls").extract_variable_all, desc = "Extract Variable" },
|
{ "<leader>cxv", require("jdtls").extract_variable_all, desc = "Extract Variable" },
|
||||||
{ "<leader>cxc", require("jdtls").extract_constant, desc = "Extract Constant" },
|
{ "<leader>cxc", require("jdtls").extract_constant, desc = "Extract Constant" },
|
||||||
{ "gs", require("jdtls").super_implementation, desc = "Goto Super" },
|
{ "<leader>cgs", require("jdtls").super_implementation, desc = "Goto Super" },
|
||||||
{ "gS", require("jdtls.tests").goto_subjects, desc = "Goto Subjects" },
|
{ "<leader>cgS", require("jdtls.tests").goto_subjects, desc = "Goto Subjects" },
|
||||||
{ "<leader>co", require("jdtls").organize_imports, desc = "Organize Imports" },
|
{ "<leader>co", require("jdtls").organize_imports, desc = "Organize Imports" },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
@ -225,40 +228,45 @@ return {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
if opts.dap and LazyVim.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then
|
if LazyVim.has("mason.nvim") then
|
||||||
-- custom init for Java debugger
|
local mason_registry = require("mason-registry")
|
||||||
require("jdtls").setup_dap(opts.dap)
|
if opts.dap and LazyVim.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then
|
||||||
require("jdtls.dap").setup_dap_main_class_configs(opts.dap_main)
|
-- custom init for Java debugger
|
||||||
|
require("jdtls").setup_dap(opts.dap)
|
||||||
|
if opts.dap_main then
|
||||||
|
require("jdtls.dap").setup_dap_main_class_configs(opts.dap_main)
|
||||||
|
end
|
||||||
|
|
||||||
-- Java Test require Java debugger to work
|
-- Java Test require Java debugger to work
|
||||||
if opts.test and mason_registry.is_installed("java-test") then
|
if opts.test and mason_registry.is_installed("java-test") then
|
||||||
-- custom keymaps for Java test runner (not yet compatible with neotest)
|
-- custom keymaps for Java test runner (not yet compatible with neotest)
|
||||||
wk.add({
|
wk.add({
|
||||||
{
|
|
||||||
mode = "n",
|
|
||||||
buffer = args.buf,
|
|
||||||
{ "<leader>t", group = "test" },
|
|
||||||
{
|
{
|
||||||
"<leader>tt",
|
mode = "n",
|
||||||
function()
|
buffer = args.buf,
|
||||||
require("jdtls.dap").test_class({
|
{ "<leader>t", group = "test" },
|
||||||
config_overrides = type(opts.test) ~= "boolean" and opts.test.config_overrides or nil,
|
{
|
||||||
})
|
"<leader>tt",
|
||||||
end,
|
function()
|
||||||
desc = "Run All Test",
|
require("jdtls.dap").test_class({
|
||||||
|
config_overrides = type(opts.test) ~= "boolean" and opts.test.config_overrides or nil,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
desc = "Run All Test",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>tr",
|
||||||
|
function()
|
||||||
|
require("jdtls.dap").test_nearest_method({
|
||||||
|
config_overrides = type(opts.test) ~= "boolean" and opts.test.config_overrides or nil,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
desc = "Run Nearest Test",
|
||||||
|
},
|
||||||
|
{ "<leader>tT", require("jdtls.dap").pick_test, desc = "Run Test" },
|
||||||
},
|
},
|
||||||
{
|
})
|
||||||
"<leader>tr",
|
end
|
||||||
function()
|
|
||||||
require("jdtls.dap").test_nearest_method({
|
|
||||||
config_overrides = type(opts.test) ~= "boolean" and opts.test.config_overrides or nil,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
desc = "Run Nearest Test",
|
|
||||||
},
|
|
||||||
{ "<leader>tT", require("jdtls.dap").pick_test, desc = "Run Test" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ return {
|
||||||
servers = {
|
servers = {
|
||||||
jsonls = {
|
jsonls = {
|
||||||
-- lazy-load schemastore when needed
|
-- lazy-load schemastore when needed
|
||||||
on_new_config = function(new_config)
|
before_init = function(_, new_config)
|
||||||
new_config.settings.json.schemas = new_config.settings.json.schemas or {}
|
new_config.settings.json.schemas = new_config.settings.json.schemas or {}
|
||||||
vim.list_extend(new_config.settings.json.schemas, require("schemastore").json.schemas())
|
vim.list_extend(new_config.settings.json.schemas, require("schemastore").json.schemas())
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ return {
|
||||||
end,
|
end,
|
||||||
-- Add packages(linting, debug adapter)
|
-- Add packages(linting, debug adapter)
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
opts = { ensure_installed = { "ktlint" } },
|
opts = { ensure_installed = { "ktlint" } },
|
||||||
},
|
},
|
||||||
-- Add syntax highlighting
|
-- Add syntax highlighting
|
||||||
|
|
@ -35,7 +35,7 @@ return {
|
||||||
{
|
{
|
||||||
"mfussenegger/nvim-lint",
|
"mfussenegger/nvim-lint",
|
||||||
optional = true,
|
optional = true,
|
||||||
dependencies = "williamboman/mason.nvim",
|
dependencies = "mason-org/mason.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
linters_by_ft = { kotlin = { "ktlint" } },
|
linters_by_ft = { kotlin = { "ktlint" } },
|
||||||
},
|
},
|
||||||
|
|
@ -64,7 +64,7 @@ return {
|
||||||
{
|
{
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
optional = true,
|
optional = true,
|
||||||
dependencies = "williamboman/mason.nvim",
|
dependencies = "mason-org/mason.nvim",
|
||||||
opts = function()
|
opts = function()
|
||||||
local dap = require("dap")
|
local dap = require("dap")
|
||||||
if not dap.adapters.kotlin then
|
if not dap.adapters.kotlin then
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
opts = { ensure_installed = { "markdownlint-cli2", "markdown-toc" } },
|
opts = { ensure_installed = { "markdownlint-cli2", "markdown-toc" } },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -104,23 +104,17 @@ return {
|
||||||
sign = false,
|
sign = false,
|
||||||
icons = {},
|
icons = {},
|
||||||
},
|
},
|
||||||
|
checkbox = {
|
||||||
|
enabled = false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
ft = { "markdown", "norg", "rmd", "org" },
|
ft = { "markdown", "norg", "rmd", "org", "codecompanion" },
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
require("render-markdown").setup(opts)
|
require("render-markdown").setup(opts)
|
||||||
Snacks.toggle({
|
Snacks.toggle({
|
||||||
name = "Render Markdown",
|
name = "Render Markdown",
|
||||||
get = function()
|
get = require("render-markdown").get,
|
||||||
return require("render-markdown.state").enabled
|
set = require("render-markdown").set,
|
||||||
end,
|
|
||||||
set = function(enabled)
|
|
||||||
local m = require("render-markdown")
|
|
||||||
if enabled then
|
|
||||||
m.enable()
|
|
||||||
else
|
|
||||||
m.disable()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
}):map("<leader>um")
|
}):map("<leader>um")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -26,17 +26,19 @@ return {
|
||||||
"reason",
|
"reason",
|
||||||
"dune",
|
"dune",
|
||||||
},
|
},
|
||||||
root_dir = function(fname)
|
root_markers = {
|
||||||
return require("lspconfig.util").root_pattern(
|
function(name)
|
||||||
"*.opam",
|
return name:match(".*%.opam$")
|
||||||
"esy.json",
|
end,
|
||||||
"package.json",
|
"esy.json",
|
||||||
".git",
|
"package.json",
|
||||||
"dune-project",
|
".git",
|
||||||
"dune-workspace",
|
"dune-project",
|
||||||
"*.ml"
|
"dune-workspace",
|
||||||
)(fname)
|
function(name)
|
||||||
end,
|
return name:match(".*%.ml$")
|
||||||
|
end,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
opts = { ensure_installed = { "csharpier", "netcoredbg" } },
|
opts = { ensure_installed = { "csharpier", "netcoredbg" } },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ return {
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"phpcs",
|
"phpcs",
|
||||||
|
|
@ -48,11 +48,10 @@ return {
|
||||||
optional = true,
|
optional = true,
|
||||||
opts = function()
|
opts = function()
|
||||||
local dap = require("dap")
|
local dap = require("dap")
|
||||||
local path = require("mason-registry").get_package("php-debug-adapter"):get_install_path()
|
|
||||||
dap.adapters.php = {
|
dap.adapters.php = {
|
||||||
type = "executable",
|
type = "executable",
|
||||||
command = "node",
|
command = "php-debug-adapter",
|
||||||
args = { path .. "/extension/out/phpDebug.js" },
|
args = {},
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -114,19 +114,13 @@ return {
|
||||||
|
|
||||||
{
|
{
|
||||||
"linux-cultist/venv-selector.nvim",
|
"linux-cultist/venv-selector.nvim",
|
||||||
branch = "regexp", -- Use this branch for the new version
|
|
||||||
cmd = "VenvSelect",
|
cmd = "VenvSelect",
|
||||||
enabled = function()
|
|
||||||
return LazyVim.has("telescope.nvim")
|
|
||||||
end,
|
|
||||||
opts = {
|
opts = {
|
||||||
settings = {
|
options = {
|
||||||
options = {
|
notify_user_on_venv_activation = true,
|
||||||
notify_user_on_venv_activation = true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- Call config for python files and load the cached venv automatically
|
-- Call config for Python files and load the cached venv automatically
|
||||||
ft = "python",
|
ft = "python",
|
||||||
keys = { { "<leader>cv", "<cmd>:VenvSelect<cr>", desc = "Select VirtualEnv", ft = "python" } },
|
keys = { { "<leader>cv", "<cmd>:VenvSelect<cr>", desc = "Select VirtualEnv", ft = "python" } },
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -65,11 +65,7 @@ return {
|
||||||
opts = {
|
opts = {
|
||||||
servers = {
|
servers = {
|
||||||
r_language_server = {
|
r_language_server = {
|
||||||
root_dir = function(fname)
|
root_markers = { "DESCRIPTION", "NAMESPACE", ".Rbuildignore" },
|
||||||
return require("lspconfig.util").root_pattern("DESCRIPTION", "NAMESPACE", ".Rbuildignore")(fname)
|
|
||||||
or require("lspconfig.util").find_git_ancestor(fname)
|
|
||||||
or vim.loop.os_homedir()
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,6 @@ if lazyvim_docs then
|
||||||
end
|
end
|
||||||
|
|
||||||
local lsp = vim.g.lazyvim_ruby_lsp or "ruby_lsp"
|
local lsp = vim.g.lazyvim_ruby_lsp or "ruby_lsp"
|
||||||
if vim.fn.has("nvim-0.10") == 0 then
|
|
||||||
-- ruby_lsp does not work well with Neovim < 0.10
|
|
||||||
lsp = vim.g.lazyvim_ruby_lsp or "solargraph"
|
|
||||||
end
|
|
||||||
local formatter = vim.g.lazyvim_ruby_formatter or "rubocop"
|
local formatter = vim.g.lazyvim_ruby_formatter or "rubocop"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
@ -25,9 +21,8 @@ return {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
---@class PluginLspOpts
|
---@type PluginLspOpts
|
||||||
opts = {
|
opts = {
|
||||||
---@type lspconfig.options
|
|
||||||
servers = {
|
servers = {
|
||||||
ruby_lsp = {
|
ruby_lsp = {
|
||||||
enabled = lsp == "ruby_lsp",
|
enabled = lsp == "ruby_lsp",
|
||||||
|
|
@ -48,7 +43,7 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
opts = { ensure_installed = { "erb-formatter", "erb-lint" } },
|
opts = { ensure_installed = { "erb-formatter", "erb-lint" } },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,13 @@
|
||||||
|
if lazyvim_docs then
|
||||||
|
-- LSP Server to use for Rust.
|
||||||
|
-- Set to "bacon-ls" to use bacon-ls instead of rust-analyzer.
|
||||||
|
-- only for diagnostics. The rest of LSP support will still be
|
||||||
|
-- provided by rust-analyzer.
|
||||||
|
vim.g.lazyvim_rust_diagnostics = "rust-analyzer"
|
||||||
|
end
|
||||||
|
|
||||||
|
local diagnostics = vim.g.lazyvim_rust_diagnostics or "rust-analyzer"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
recommended = function()
|
recommended = function()
|
||||||
return LazyVim.extras.wants({
|
return LazyVim.extras.wants({
|
||||||
|
|
@ -33,14 +43,19 @@ return {
|
||||||
|
|
||||||
-- Ensure Rust debugger is installed
|
-- Ensure Rust debugger is installed
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
optional = true,
|
optional = true,
|
||||||
opts = { ensure_installed = { "codelldb" } },
|
opts = function(_, opts)
|
||||||
|
opts.ensure_installed = opts.ensure_installed or {}
|
||||||
|
vim.list_extend(opts.ensure_installed, { "codelldb" })
|
||||||
|
if diagnostics == "bacon-ls" then
|
||||||
|
vim.list_extend(opts.ensure_installed, { "bacon" })
|
||||||
|
end
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"mrcjkb/rustaceanvim",
|
"mrcjkb/rustaceanvim",
|
||||||
version = vim.fn.has("nvim-0.10.0") == 0 and "^4" or false,
|
|
||||||
ft = { "rust" },
|
ft = { "rust" },
|
||||||
opts = {
|
opts = {
|
||||||
server = {
|
server = {
|
||||||
|
|
@ -62,8 +77,12 @@ return {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- Add clippy lints for Rust.
|
-- Add clippy lints for Rust if using rust-analyzer
|
||||||
checkOnSave = true,
|
checkOnSave = diagnostics == "rust-analyzer",
|
||||||
|
-- Enable diagnostics if using rust-analyzer
|
||||||
|
diagnostics = {
|
||||||
|
enable = diagnostics == "rust-analyzer",
|
||||||
|
},
|
||||||
procMacro = {
|
procMacro = {
|
||||||
enable = true,
|
enable = true,
|
||||||
ignored = {
|
ignored = {
|
||||||
|
|
@ -72,11 +91,32 @@ return {
|
||||||
["async-recursion"] = { "async_recursion" },
|
["async-recursion"] = { "async_recursion" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
files = {
|
||||||
|
excludeDirs = {
|
||||||
|
".direnv",
|
||||||
|
".git",
|
||||||
|
".github",
|
||||||
|
".gitlab",
|
||||||
|
"bin",
|
||||||
|
"node_modules",
|
||||||
|
"target",
|
||||||
|
"venv",
|
||||||
|
".venv",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
|
if LazyVim.has("mason.nvim") then
|
||||||
|
local codelldb = vim.fn.exepath("codelldb")
|
||||||
|
local codelldb_lib_ext = io.popen("uname"):read("*l") == "Linux" and ".so" or ".dylib"
|
||||||
|
local library_path = vim.fn.expand("$MASON/opt/lldb/lib/liblldb" .. codelldb_lib_ext)
|
||||||
|
opts.dap = {
|
||||||
|
adapter = require("rustaceanvim.config").get_codelldb_adapter(codelldb, library_path),
|
||||||
|
}
|
||||||
|
end
|
||||||
vim.g.rustaceanvim = vim.tbl_deep_extend("keep", vim.g.rustaceanvim or {}, opts or {})
|
vim.g.rustaceanvim = vim.tbl_deep_extend("keep", vim.g.rustaceanvim or {}, opts or {})
|
||||||
if vim.fn.executable("rust-analyzer") == 0 then
|
if vim.fn.executable("rust-analyzer") == 0 then
|
||||||
LazyVim.error(
|
LazyVim.error(
|
||||||
|
|
@ -92,6 +132,9 @@ return {
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
opts = {
|
opts = {
|
||||||
servers = {
|
servers = {
|
||||||
|
bacon_ls = {
|
||||||
|
enabled = diagnostics == "bacon-ls",
|
||||||
|
},
|
||||||
rust_analyzer = { enabled = false },
|
rust_analyzer = { enabled = false },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -48,19 +48,21 @@ return {
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
pattern = sql_ft,
|
pattern = sql_ft,
|
||||||
callback = function()
|
callback = function()
|
||||||
local cmp = require("cmp")
|
if LazyVim.has_extra("coding.nvim-cmp") then
|
||||||
|
local cmp = require("cmp")
|
||||||
|
|
||||||
-- global sources
|
-- global sources
|
||||||
---@param source cmp.SourceConfig
|
---@param source cmp.SourceConfig
|
||||||
local sources = vim.tbl_map(function(source)
|
local sources = vim.tbl_map(function(source)
|
||||||
return { name = source.name }
|
return { name = source.name }
|
||||||
end, cmp.get_config().sources)
|
end, cmp.get_config().sources)
|
||||||
|
|
||||||
-- add vim-dadbod-completion source
|
-- add vim-dadbod-completion source
|
||||||
table.insert(sources, { name = "vim-dadbod-completion" })
|
table.insert(sources, { name = "vim-dadbod-completion" })
|
||||||
|
|
||||||
-- update sources for the current buffer
|
-- update sources for the current buffer
|
||||||
cmp.setup.buffer({ sources = sources })
|
cmp.setup.buffer({ sources = sources })
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
|
@ -122,9 +124,26 @@ return {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- blink.cmp integration
|
||||||
|
{
|
||||||
|
"saghen/blink.cmp",
|
||||||
|
optional = true,
|
||||||
|
opts = {
|
||||||
|
sources = {
|
||||||
|
default = { "dadbod" },
|
||||||
|
providers = {
|
||||||
|
dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dependencies = {
|
||||||
|
"kristijanhusak/vim-dadbod-completion",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
-- Linters & formatters
|
-- Linters & formatters
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
opts = { ensure_installed = { "sqlfluff" } },
|
opts = { ensure_installed = { "sqlfluff" } },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -31,11 +31,6 @@ return {
|
||||||
desc = "Organize Imports",
|
desc = "Organize Imports",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
capabilities = {
|
|
||||||
workspace = {
|
|
||||||
didChangeWatchedFiles = vim.fn.has("nvim-0.10") == 0 and { dynamicRegistration = true },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -28,11 +28,10 @@ return {
|
||||||
},
|
},
|
||||||
setup = {
|
setup = {
|
||||||
tailwindcss = function(_, opts)
|
tailwindcss = function(_, opts)
|
||||||
local tw = LazyVim.lsp.get_raw_config("tailwindcss")
|
|
||||||
opts.filetypes = opts.filetypes or {}
|
opts.filetypes = opts.filetypes or {}
|
||||||
|
|
||||||
-- Add default filetypes
|
-- Add default filetypes
|
||||||
vim.list_extend(opts.filetypes, tw.default_config.filetypes)
|
vim.list_extend(opts.filetypes, vim.lsp.config.tailwindcss.filetypes)
|
||||||
|
|
||||||
-- Remove excluded filetypes
|
-- Remove excluded filetypes
|
||||||
--- @param ft string
|
--- @param ft string
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ return {
|
||||||
},
|
},
|
||||||
-- ensure terraform tools are installed
|
-- ensure terraform tools are installed
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
opts = { ensure_installed = { "tflint" } },
|
opts = { ensure_installed = { "tflint" } },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ return {
|
||||||
vim.g.vimtex_quickfix_method = vim.fn.executable("pplatex") == 1 and "pplatex" or "latexlog"
|
vim.g.vimtex_quickfix_method = vim.fn.executable("pplatex") == 1 and "pplatex" or "latexlog"
|
||||||
end,
|
end,
|
||||||
keys = {
|
keys = {
|
||||||
{ "<localLeader>l", "", desc = "+vimtex" },
|
{ "<localLeader>l", "", desc = "+vimtex", ft = "tex" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ return {
|
||||||
enableMoveToFileCodeAction = true,
|
enableMoveToFileCodeAction = true,
|
||||||
autoUseWorkspaceTsdk = true,
|
autoUseWorkspaceTsdk = true,
|
||||||
experimental = {
|
experimental = {
|
||||||
|
maxInlayHintLength = 30,
|
||||||
completion = {
|
completion = {
|
||||||
enableServerSideFuzzyMatch = true,
|
enableServerSideFuzzyMatch = true,
|
||||||
},
|
},
|
||||||
|
|
@ -130,20 +131,42 @@ return {
|
||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
vtsls = function(_, opts)
|
vtsls = function(_, opts)
|
||||||
|
if vim.lsp.config.denols and vim.lsp.config.vtsls then
|
||||||
|
---@param server string
|
||||||
|
local resolve = function(server)
|
||||||
|
local markers, root_dir = vim.lsp.config[server].root_markers, vim.lsp.config[server].root_dir
|
||||||
|
vim.lsp.config(server, {
|
||||||
|
root_dir = function(bufnr, on_dir)
|
||||||
|
local is_deno = vim.fs.root(bufnr, { "deno.json", "deno.jsonc" }) ~= nil
|
||||||
|
if is_deno == (server == "denols") then
|
||||||
|
if root_dir then
|
||||||
|
return root_dir(bufnr, on_dir)
|
||||||
|
elseif type(markers) == "table" then
|
||||||
|
local root = vim.fs.root(bufnr, markers)
|
||||||
|
return root and on_dir(root)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
resolve("denols")
|
||||||
|
resolve("vtsls")
|
||||||
|
end
|
||||||
|
|
||||||
LazyVim.lsp.on_attach(function(client, buffer)
|
LazyVim.lsp.on_attach(function(client, buffer)
|
||||||
client.commands["_typescript.moveToFileRefactoring"] = function(command, ctx)
|
client.commands["_typescript.moveToFileRefactoring"] = function(command, ctx)
|
||||||
---@type string, string, lsp.Range
|
---@type string, string, lsp.Range
|
||||||
local action, uri, range = unpack(command.arguments)
|
local action, uri, range = unpack(command.arguments)
|
||||||
|
|
||||||
local function move(newf)
|
local function move(newf)
|
||||||
client.request("workspace/executeCommand", {
|
client:request("workspace/executeCommand", {
|
||||||
command = command.command,
|
command = command.command,
|
||||||
arguments = { action, uri, range, newf },
|
arguments = { action, uri, range, newf },
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
local fname = vim.uri_to_fname(uri)
|
local fname = vim.uri_to_fname(uri)
|
||||||
client.request("workspace/executeCommand", {
|
client:request("workspace/executeCommand", {
|
||||||
command = "typescript.tsserverRequest",
|
command = "typescript.tsserverRequest",
|
||||||
arguments = {
|
arguments = {
|
||||||
"getMoveToRefactoringFileSuggestions",
|
"getMoveToRefactoringFileSuggestions",
|
||||||
|
|
@ -193,7 +216,7 @@ return {
|
||||||
optional = true,
|
optional = true,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
opts.ensure_installed = opts.ensure_installed or {}
|
opts.ensure_installed = opts.ensure_installed or {}
|
||||||
table.insert(opts.ensure_installed, "js-debug-adapter")
|
table.insert(opts.ensure_installed, "js-debug-adapter")
|
||||||
|
|
@ -262,7 +285,7 @@ return {
|
||||||
|
|
||||||
-- Filetype icons
|
-- Filetype icons
|
||||||
{
|
{
|
||||||
"echasnovski/mini.icons",
|
"nvim-mini/mini.icons",
|
||||||
opts = {
|
opts = {
|
||||||
file = {
|
file = {
|
||||||
[".eslintrc.js"] = { glyph = "", hl = "MiniIconsYellow" },
|
[".eslintrc.js"] = { glyph = "", hl = "MiniIconsYellow" },
|
||||||
|
|
|
||||||
|
|
@ -19,13 +19,7 @@ return {
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
opts = {
|
opts = {
|
||||||
servers = {
|
servers = {
|
||||||
volar = {
|
vue_ls = {},
|
||||||
init_options = {
|
|
||||||
vue = {
|
|
||||||
hybridMode = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
vtsls = {},
|
vtsls = {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- lazy-load schemastore when needed
|
-- lazy-load schemastore when needed
|
||||||
on_new_config = function(new_config)
|
before_init = function(_, new_config)
|
||||||
new_config.settings.yaml.schemas = vim.tbl_deep_extend(
|
new_config.settings.yaml.schemas = vim.tbl_deep_extend(
|
||||||
"force",
|
"force",
|
||||||
new_config.settings.yaml.schemas or {},
|
new_config.settings.yaml.schemas or {},
|
||||||
|
|
@ -55,16 +55,6 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
setup = {
|
|
||||||
yamlls = function()
|
|
||||||
-- Neovim < 0.10 does not have dynamic registration for formatting
|
|
||||||
if vim.fn.has("nvim-0.10") == 0 then
|
|
||||||
LazyVim.lsp.on_attach(function(client, _)
|
|
||||||
client.server_capabilities.documentFormattingProvider = true
|
|
||||||
end, "yamlls")
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ return {
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
-- other settings removed for brevity
|
-- other settings removed for brevity
|
||||||
opts = {
|
opts = {
|
||||||
---@type lspconfig.options
|
---@type table<string, vim.lsp.Config>
|
||||||
servers = {
|
servers = {
|
||||||
eslint = {
|
eslint = {
|
||||||
settings = {
|
settings = {
|
||||||
|
|
@ -26,10 +26,6 @@ return {
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local function get_client(buf)
|
|
||||||
return LazyVim.lsp.get_clients({ name = "eslint", bufnr = buf })[1]
|
|
||||||
end
|
|
||||||
|
|
||||||
local formatter = LazyVim.lsp.formatter({
|
local formatter = LazyVim.lsp.formatter({
|
||||||
name = "eslint: lsp",
|
name = "eslint: lsp",
|
||||||
primary = false,
|
primary = false,
|
||||||
|
|
@ -37,24 +33,6 @@ return {
|
||||||
filter = "eslint",
|
filter = "eslint",
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Use EslintFixAll on Neovim < 0.10.0
|
|
||||||
if not pcall(require, "vim.lsp._dynamic") then
|
|
||||||
formatter.name = "eslint: EslintFixAll"
|
|
||||||
formatter.sources = function(buf)
|
|
||||||
local client = get_client(buf)
|
|
||||||
return client and { "eslint" } or {}
|
|
||||||
end
|
|
||||||
formatter.format = function(buf)
|
|
||||||
local client = get_client(buf)
|
|
||||||
if client then
|
|
||||||
local diag = vim.diagnostic.get(buf, { namespace = vim.lsp.diagnostic.get_namespace(client.id) })
|
|
||||||
if #diag > 0 then
|
|
||||||
vim.cmd("EslintFixAll")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- register the formatter with LazyVim
|
-- register the formatter with LazyVim
|
||||||
LazyVim.format.register(formatter)
|
LazyVim.format.register(formatter)
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
return {
|
return {
|
||||||
|
|
||||||
{ "nvimdev/dashboard-nvim", enabled = false },
|
{ "folke/snacks.nvim", opts = { dashboard = { enabled = false } } },
|
||||||
{ "echasnovski/mini.starter", enabled = false },
|
|
||||||
-- Dashboard. This runs when neovim starts, and is what displays
|
-- Dashboard. This runs when neovim starts, and is what displays
|
||||||
-- the "LAZYVIM" banner.
|
-- the "LAZYVIM" banner.
|
||||||
{
|
{
|
||||||
|
|
@ -23,11 +22,11 @@ return {
|
||||||
dashboard.section.header.val = vim.split(logo, "\n")
|
dashboard.section.header.val = vim.split(logo, "\n")
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
dashboard.section.buttons.val = {
|
dashboard.section.buttons.val = {
|
||||||
dashboard.button("f", " " .. " Find file", LazyVim.pick()),
|
dashboard.button("f", " " .. " Find file", "<cmd> lua LazyVim.pick()() <cr>"),
|
||||||
dashboard.button("n", " " .. " New file", [[<cmd> ene <BAR> startinsert <cr>]]),
|
dashboard.button("n", " " .. " New file", [[<cmd> ene <BAR> startinsert <cr>]]),
|
||||||
dashboard.button("r", " " .. " Recent files", LazyVim.pick("oldfiles")),
|
dashboard.button("r", " " .. " Recent files", [[<cmd> lua LazyVim.pick("oldfiles")() <cr>]]),
|
||||||
dashboard.button("g", " " .. " Find text", LazyVim.pick("live_grep")),
|
dashboard.button("g", " " .. " Find text", [[<cmd> lua LazyVim.pick("live_grep")() <cr>]]),
|
||||||
dashboard.button("c", " " .. " Config", LazyVim.pick.config_files()),
|
dashboard.button("c", " " .. " Config", "<cmd> lua LazyVim.pick.config_files()() <cr>"),
|
||||||
dashboard.button("s", " " .. " Restore Session", [[<cmd> lua require("persistence").load() <cr>]]),
|
dashboard.button("s", " " .. " Restore Session", [[<cmd> lua require("persistence").load() <cr>]]),
|
||||||
dashboard.button("x", " " .. " Lazy Extras", "<cmd> LazyExtras <cr>"),
|
dashboard.button("x", " " .. " Lazy Extras", "<cmd> LazyExtras <cr>"),
|
||||||
dashboard.button("l", " " .. " Lazy", "<cmd> Lazy <cr>"),
|
dashboard.button("l", " " .. " Lazy", "<cmd> Lazy <cr>"),
|
||||||
|
|
|
||||||
68
lua/lazyvim/plugins/extras/ui/dashboard-nvim.lua
Normal file
68
lua/lazyvim/plugins/extras/ui/dashboard-nvim.lua
Normal file
|
|
@ -0,0 +1,68 @@
|
||||||
|
return {
|
||||||
|
{ "folke/snacks.nvim", opts = { dashboard = { enabled = false } } },
|
||||||
|
{
|
||||||
|
"nvimdev/dashboard-nvim",
|
||||||
|
lazy = false, -- As https://github.com/nvimdev/dashboard-nvim/pull/450, dashboard-nvim shouldn't be lazy-loaded to properly handle stdin.
|
||||||
|
opts = function()
|
||||||
|
local logo = [[
|
||||||
|
██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z
|
||||||
|
██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z
|
||||||
|
██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z
|
||||||
|
██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z
|
||||||
|
███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║
|
||||||
|
╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
|
||||||
|
]]
|
||||||
|
|
||||||
|
logo = string.rep("\n", 8) .. logo .. "\n\n"
|
||||||
|
|
||||||
|
local opts = {
|
||||||
|
theme = "doom",
|
||||||
|
hide = {
|
||||||
|
-- this is taken care of by lualine
|
||||||
|
-- enabling this messes up the actual laststatus setting after loading a file
|
||||||
|
statusline = false,
|
||||||
|
},
|
||||||
|
config = {
|
||||||
|
header = vim.split(logo, "\n"),
|
||||||
|
-- stylua: ignore
|
||||||
|
center = {
|
||||||
|
{ action = 'lua LazyVim.pick()()', desc = " Find File", icon = " ", key = "f" },
|
||||||
|
{ action = "ene | startinsert", desc = " New File", icon = " ", key = "n" },
|
||||||
|
{ action = 'lua LazyVim.pick("oldfiles")()', desc = " Recent Files", icon = " ", key = "r" },
|
||||||
|
{ action = 'lua LazyVim.pick("live_grep")()', desc = " Find Text", icon = " ", key = "g" },
|
||||||
|
{ action = 'lua LazyVim.pick.config_files()()', desc = " Config", icon = " ", key = "c" },
|
||||||
|
{ action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" },
|
||||||
|
{ action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" },
|
||||||
|
{ action = "Lazy", desc = " Lazy", icon = " ", key = "l" },
|
||||||
|
{ action = function() vim.api.nvim_input("<cmd>qa<cr>") end, desc = " Quit", icon = " ", key = "q" },
|
||||||
|
},
|
||||||
|
footer = function()
|
||||||
|
local stats = require("lazy").stats()
|
||||||
|
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
||||||
|
return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" }
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, button in ipairs(opts.config.center) do
|
||||||
|
button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
|
||||||
|
button.key_format = " %s"
|
||||||
|
end
|
||||||
|
|
||||||
|
-- open dashboard after closing lazy
|
||||||
|
if vim.o.filetype == "lazy" then
|
||||||
|
vim.api.nvim_create_autocmd("WinClosed", {
|
||||||
|
pattern = tostring(vim.api.nvim_get_current_win()),
|
||||||
|
once = true,
|
||||||
|
callback = function()
|
||||||
|
vim.schedule(function()
|
||||||
|
vim.api.nvim_exec_autocmds("UIEnter", { group = "dashboard" })
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
return opts
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
return {
|
return {
|
||||||
-- edgy
|
-- Create and display predefined window layouts.
|
||||||
{
|
{
|
||||||
"folke/edgy.nvim",
|
"folke/edgy.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
|
|
|
||||||
51
lua/lazyvim/plugins/extras/ui/indent-blankline.lua
Normal file
51
lua/lazyvim/plugins/extras/ui/indent-blankline.lua
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
return {
|
||||||
|
-- disable snacks indent when indent-blankline is enabled
|
||||||
|
{
|
||||||
|
"snacks.nvim",
|
||||||
|
opts = {
|
||||||
|
indent = { enabled = false },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
|
event = "LazyFile",
|
||||||
|
opts = function()
|
||||||
|
Snacks.toggle({
|
||||||
|
name = "Indention Guides",
|
||||||
|
get = function()
|
||||||
|
return require("ibl.config").get_config(0).enabled
|
||||||
|
end,
|
||||||
|
set = function(state)
|
||||||
|
require("ibl").setup_buffer(0, { enabled = state })
|
||||||
|
end,
|
||||||
|
}):map("<leader>ug")
|
||||||
|
|
||||||
|
return {
|
||||||
|
indent = {
|
||||||
|
char = "│",
|
||||||
|
tab_char = "│",
|
||||||
|
},
|
||||||
|
scope = { show_start = false, show_end = false },
|
||||||
|
exclude = {
|
||||||
|
filetypes = {
|
||||||
|
"Trouble",
|
||||||
|
"alpha",
|
||||||
|
"dashboard",
|
||||||
|
"help",
|
||||||
|
"lazy",
|
||||||
|
"mason",
|
||||||
|
"neo-tree",
|
||||||
|
"notify",
|
||||||
|
"snacks_dashboard",
|
||||||
|
"snacks_notif",
|
||||||
|
"snacks_terminal",
|
||||||
|
"snacks_win",
|
||||||
|
"toggleterm",
|
||||||
|
"trouble",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
main = "ibl",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -1,53 +1,65 @@
|
||||||
-- animations
|
-- animations
|
||||||
return {
|
return {
|
||||||
"echasnovski/mini.animate",
|
-- disable snacks scroll when animate is enabled
|
||||||
recommended = true,
|
{
|
||||||
event = "VeryLazy",
|
"snacks.nvim",
|
||||||
opts = function()
|
opts = {
|
||||||
-- don't use animate when scrolling with the mouse
|
scroll = { enabled = false },
|
||||||
local mouse_scrolled = false
|
},
|
||||||
for _, scroll in ipairs({ "Up", "Down" }) do
|
},
|
||||||
local key = "<ScrollWheel" .. scroll .. ">"
|
|
||||||
vim.keymap.set({ "", "i" }, key, function()
|
|
||||||
mouse_scrolled = true
|
|
||||||
return key
|
|
||||||
end, { expr = true })
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
-- Animates many common Neovim actions, like scrolling,
|
||||||
pattern = "grug-far",
|
-- moving the cursor, and resizing windows.
|
||||||
callback = function()
|
{
|
||||||
vim.b.minianimate_disable = true
|
"nvim-mini/mini.animate",
|
||||||
end,
|
event = "VeryLazy",
|
||||||
})
|
cond = vim.g.neovide == nil,
|
||||||
|
opts = function(_, opts)
|
||||||
|
-- don't use animate when scrolling with the mouse
|
||||||
|
local mouse_scrolled = false
|
||||||
|
for _, scroll in ipairs({ "Up", "Down" }) do
|
||||||
|
local key = "<ScrollWheel" .. scroll .. ">"
|
||||||
|
vim.keymap.set({ "", "i" }, key, function()
|
||||||
|
mouse_scrolled = true
|
||||||
|
return key
|
||||||
|
end, { expr = true })
|
||||||
|
end
|
||||||
|
|
||||||
Snacks.toggle({
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
name = "Mini Animate",
|
pattern = "grug-far",
|
||||||
get = function()
|
callback = function()
|
||||||
return not vim.g.minianimate_disable
|
vim.b.minianimate_disable = true
|
||||||
end,
|
end,
|
||||||
set = function(state)
|
})
|
||||||
vim.g.minianimate_disable = not state
|
|
||||||
end,
|
|
||||||
}):map("<leader>ua")
|
|
||||||
|
|
||||||
local animate = require("mini.animate")
|
Snacks.toggle({
|
||||||
return {
|
name = "Mini Animate",
|
||||||
resize = {
|
get = function()
|
||||||
timing = animate.gen_timing.linear({ duration = 50, unit = "total" }),
|
return not vim.g.minianimate_disable
|
||||||
},
|
end,
|
||||||
scroll = {
|
set = function(state)
|
||||||
timing = animate.gen_timing.linear({ duration = 150, unit = "total" }),
|
vim.g.minianimate_disable = not state
|
||||||
subscroll = animate.gen_subscroll.equal({
|
end,
|
||||||
predicate = function(total_scroll)
|
}):map("<leader>ua")
|
||||||
if mouse_scrolled then
|
|
||||||
mouse_scrolled = false
|
local animate = require("mini.animate")
|
||||||
return false
|
return vim.tbl_deep_extend("force", opts, {
|
||||||
end
|
resize = {
|
||||||
return total_scroll > 1
|
timing = animate.gen_timing.linear({ duration = 50, unit = "total" }),
|
||||||
end,
|
},
|
||||||
}),
|
scroll = {
|
||||||
},
|
timing = animate.gen_timing.linear({ duration = 150, unit = "total" }),
|
||||||
}
|
subscroll = animate.gen_subscroll.equal({
|
||||||
end,
|
predicate = function(total_scroll)
|
||||||
|
if mouse_scrolled then
|
||||||
|
mouse_scrolled = false
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
return total_scroll > 1
|
||||||
|
end,
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ return {
|
||||||
-- code, this highlights the current level of indentation, and animates
|
-- code, this highlights the current level of indentation, and animates
|
||||||
-- the highlighting.
|
-- the highlighting.
|
||||||
{
|
{
|
||||||
"echasnovski/mini.indentscope",
|
"nvim-mini/mini.indentscope",
|
||||||
version = false, -- wait till new 0.7.0 release to put it back on semver
|
version = false, -- wait till new 0.7.0 release to put it back on semver
|
||||||
event = "LazyFile",
|
event = "LazyFile",
|
||||||
opts = {
|
opts = {
|
||||||
|
|
@ -23,6 +23,7 @@ return {
|
||||||
"mason",
|
"mason",
|
||||||
"neo-tree",
|
"neo-tree",
|
||||||
"notify",
|
"notify",
|
||||||
|
"snacks_dashboard",
|
||||||
"snacks_notif",
|
"snacks_notif",
|
||||||
"snacks_terminal",
|
"snacks_terminal",
|
||||||
"snacks_win",
|
"snacks_win",
|
||||||
|
|
@ -33,13 +34,33 @@ return {
|
||||||
vim.b.miniindentscope_disable = true
|
vim.b.miniindentscope_disable = true
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("User", {
|
||||||
|
pattern = "SnacksDashboardOpened",
|
||||||
|
callback = function(data)
|
||||||
|
vim.b[data.buf].miniindentscope_disable = true
|
||||||
|
end,
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- disable inent-blankline scope when mini-indentscope is enabled
|
||||||
{
|
{
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
|
optional = true,
|
||||||
event = "LazyFile",
|
event = "LazyFile",
|
||||||
opts = {
|
opts = {
|
||||||
scope = { enabled = false },
|
scope = { enabled = false },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- disable snacks scroll when mini-indentscope is enabled
|
||||||
|
{
|
||||||
|
"snacks.nvim",
|
||||||
|
opts = {
|
||||||
|
indent = {
|
||||||
|
scope = { enabled = false },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,11 @@
|
||||||
-- start screen
|
-- start screen
|
||||||
return {
|
return {
|
||||||
-- disable alpha
|
-- disable alpha
|
||||||
{ "goolord/alpha-nvim", enabled = false },
|
{ "folke/snacks.nvim", opts = { dashboard = { enabled = false } } },
|
||||||
{ "nvimdev/dashboard-nvim", enabled = false },
|
|
||||||
|
|
||||||
-- enable mini.starter
|
-- enable mini.starter
|
||||||
{
|
{
|
||||||
"echasnovski/mini.starter",
|
"nvim-mini/mini.starter",
|
||||||
version = false, -- wait till new 0.7.0 release to put it back on semver
|
version = false, -- wait till new 0.7.0 release to put it back on semver
|
||||||
event = "VimEnter",
|
event = "VimEnter",
|
||||||
opts = function()
|
opts = function()
|
||||||
|
|
@ -68,7 +67,7 @@ return {
|
||||||
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
||||||
local pad_footer = string.rep(" ", 8)
|
local pad_footer = string.rep(" ", 8)
|
||||||
starter.config.footer = pad_footer .. "⚡ Neovim loaded " .. stats.count .. " plugins in " .. ms .. "ms"
|
starter.config.footer = pad_footer .. "⚡ Neovim loaded " .. stats.count .. " plugins in " .. ms .. "ms"
|
||||||
-- INFO: based on @echasnovski's recommendation (thanks a lot!!!)
|
-- INFO: based on @nvim-mini's recommendation (thanks a lot!!!)
|
||||||
if vim.bo[ev.buf].filetype == "ministarter" then
|
if vim.bo[ev.buf].filetype == "ministarter" then
|
||||||
pcall(starter.refresh)
|
pcall(starter.refresh)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
20
lua/lazyvim/plugins/extras/ui/smear-cursor.lua
Normal file
20
lua/lazyvim/plugins/extras/ui/smear-cursor.lua
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
-- Animates cursor movement with a smear effect.
|
||||||
|
return {
|
||||||
|
"sphamba/smear-cursor.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
cond = vim.g.neovide == nil,
|
||||||
|
opts = {
|
||||||
|
hide_target_hack = true,
|
||||||
|
cursor_color = "none",
|
||||||
|
},
|
||||||
|
specs = {
|
||||||
|
-- disable mini.animate cursor
|
||||||
|
{
|
||||||
|
"nvim-mini/mini.animate",
|
||||||
|
optional = true,
|
||||||
|
opts = {
|
||||||
|
cursor = { enable = false },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
-- Show context of the current function
|
-- Show context of the current function
|
||||||
return {
|
return {
|
||||||
"nvim-treesitter/nvim-treesitter-context",
|
"nvim-treesitter/nvim-treesitter-context",
|
||||||
event = "VeryLazy",
|
event = "LazyFile",
|
||||||
opts = function()
|
opts = function()
|
||||||
local tsc = require("treesitter-context")
|
local tsc = require("treesitter-context")
|
||||||
Snacks.toggle({
|
Snacks.toggle({
|
||||||
|
|
|
||||||
|
|
@ -3,22 +3,44 @@ local pick_chezmoi = function()
|
||||||
require("telescope").extensions.chezmoi.find_files()
|
require("telescope").extensions.chezmoi.find_files()
|
||||||
elseif LazyVim.pick.picker.name == "fzf" then
|
elseif LazyVim.pick.picker.name == "fzf" then
|
||||||
local fzf_lua = require("fzf-lua")
|
local fzf_lua = require("fzf-lua")
|
||||||
local results = require("chezmoi.commands").list()
|
local actions = {
|
||||||
local chezmoi = require("chezmoi.commands")
|
["enter"] = function(selected)
|
||||||
|
fzf_lua.actions.vimcmd_entry("ChezmoiEdit", selected, { cwd = os.getenv("HOME") })
|
||||||
local opts = {
|
end,
|
||||||
fzf_opts = {},
|
|
||||||
fzf_colors = true,
|
|
||||||
actions = {
|
|
||||||
["default"] = function(selected)
|
|
||||||
chezmoi.edit({
|
|
||||||
targets = { "~/" .. selected[1] },
|
|
||||||
args = { "--watch" },
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
fzf_lua.fzf_exec(results, opts)
|
fzf_lua.files({ cmd = "chezmoi managed --include=files,symlinks", actions = actions })
|
||||||
|
elseif LazyVim.pick.picker.name == "snacks" then
|
||||||
|
local results = require("chezmoi.commands").list({
|
||||||
|
args = {
|
||||||
|
"--path-style",
|
||||||
|
"absolute",
|
||||||
|
"--include",
|
||||||
|
"files",
|
||||||
|
"--exclude",
|
||||||
|
"externals",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
local items = {}
|
||||||
|
|
||||||
|
for _, czFile in ipairs(results) do
|
||||||
|
table.insert(items, {
|
||||||
|
text = czFile,
|
||||||
|
file = czFile,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
---@type snacks.picker.Config
|
||||||
|
local opts = {
|
||||||
|
items = items,
|
||||||
|
confirm = function(picker, item)
|
||||||
|
picker:close()
|
||||||
|
require("chezmoi.commands").edit({
|
||||||
|
targets = { item.text },
|
||||||
|
args = { "--watch" },
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
Snacks.picker.pick(opts)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -33,6 +55,7 @@ return {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"xvzc/chezmoi.nvim",
|
"xvzc/chezmoi.nvim",
|
||||||
|
cmd = { "ChezmoiEdit" },
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
"<leader>sz",
|
"<leader>sz",
|
||||||
|
|
@ -88,10 +111,31 @@ return {
|
||||||
table.insert(opts.config.center, 5, projects)
|
table.insert(opts.config.center, 5, projects)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"folke/snacks.nvim",
|
||||||
|
optional = true,
|
||||||
|
opts = function(_, opts)
|
||||||
|
local chezmoi_entry = {
|
||||||
|
icon = " ",
|
||||||
|
key = "c",
|
||||||
|
desc = "Config",
|
||||||
|
action = pick_chezmoi,
|
||||||
|
}
|
||||||
|
local config_index
|
||||||
|
for i = #opts.dashboard.preset.keys, 1, -1 do
|
||||||
|
if opts.dashboard.preset.keys[i].key == "c" then
|
||||||
|
table.remove(opts.dashboard.preset.keys, i)
|
||||||
|
config_index = i
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
table.insert(opts.dashboard.preset.keys, config_index, chezmoi_entry)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
-- Filetype icons
|
-- Filetype icons
|
||||||
{
|
{
|
||||||
"echasnovski/mini.icons",
|
"nvim-mini/mini.icons",
|
||||||
opts = {
|
opts = {
|
||||||
file = {
|
file = {
|
||||||
[".chezmoiignore"] = { glyph = "", hl = "MiniIconsGrey" },
|
[".chezmoiignore"] = { glyph = "", hl = "MiniIconsGrey" },
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
opts = { ensure_installed = { "shellcheck" } },
|
opts = { ensure_installed = { "shellcheck" } },
|
||||||
},
|
},
|
||||||
-- add some stuff to treesitter
|
-- add some stuff to treesitter
|
||||||
|
|
@ -39,11 +39,12 @@ return {
|
||||||
pattern = {
|
pattern = {
|
||||||
[".*/waybar/config"] = "jsonc",
|
[".*/waybar/config"] = "jsonc",
|
||||||
[".*/mako/config"] = "dosini",
|
[".*/mako/config"] = "dosini",
|
||||||
[".*/kitty/.+%.conf"] = "bash",
|
[".*/kitty/.+%.conf"] = "kitty",
|
||||||
[".*/hypr/.+%.conf"] = "hyprlang",
|
[".*/hypr/.+%.conf"] = "hyprlang",
|
||||||
["%.env%.[%w_.-]+"] = "sh",
|
["%.env%.[%w_.-]+"] = "sh",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
vim.treesitter.language.register("bash", "kitty")
|
||||||
|
|
||||||
add("git_config")
|
add("git_config")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ return {
|
||||||
|
|
||||||
-- Ensure GitUI tool is installed
|
-- Ensure GitUI tool is installed
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
opts = { ensure_installed = { "gitui" } },
|
opts = { ensure_installed = { "gitui" } },
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ local M = {}
|
||||||
M.hl = {}
|
M.hl = {}
|
||||||
|
|
||||||
M.plugin = {
|
M.plugin = {
|
||||||
"echasnovski/mini.hipatterns",
|
"nvim-mini/mini.hipatterns",
|
||||||
recommended = true,
|
recommended = true,
|
||||||
desc = "Highlight colors in your code. Also includes Tailwind CSS support.",
|
desc = "Highlight colors in your code. Also includes Tailwind CSS support.",
|
||||||
event = "LazyFile",
|
event = "LazyFile",
|
||||||
|
|
|
||||||
|
|
@ -22,13 +22,16 @@ return {
|
||||||
{ "<leader>gr", "<cmd>Octo repo list<CR>", desc = "List Repos (Octo)" },
|
{ "<leader>gr", "<cmd>Octo repo list<CR>", desc = "List Repos (Octo)" },
|
||||||
{ "<leader>gS", "<cmd>Octo search<CR>", desc = "Search (Octo)" },
|
{ "<leader>gS", "<cmd>Octo search<CR>", desc = "Search (Octo)" },
|
||||||
|
|
||||||
{ "<leader>a", "", desc = "+assignee (Octo)", ft = "octo" },
|
{ "<localleader>a", "", desc = "+assignee (Octo)", ft = "octo" },
|
||||||
{ "<leader>c", "", desc = "+comment/code (Octo)", ft = "octo" },
|
{ "<localleader>c", "", desc = "+comment/code (Octo)", ft = "octo" },
|
||||||
{ "<leader>l", "", desc = "+label (Octo)", ft = "octo" },
|
{ "<localleader>l", "", desc = "+label (Octo)", ft = "octo" },
|
||||||
{ "<leader>i", "", desc = "+issue (Octo)", ft = "octo" },
|
{ "<localleader>i", "", desc = "+issue (Octo)", ft = "octo" },
|
||||||
{ "<leader>r", "", desc = "+react (Octo)", ft = "octo" },
|
{ "<localleader>r", "", desc = "+react (Octo)", ft = "octo" },
|
||||||
{ "<leader>p", "", desc = "+pr (Octo)", ft = "octo" },
|
{ "<localleader>p", "", desc = "+pr (Octo)", ft = "octo" },
|
||||||
{ "<leader>v", "", desc = "+review (Octo)", ft = "octo" },
|
{ "<localleader>pr", "", desc = "+rebase (Octo)", ft = "octo" },
|
||||||
|
{ "<localleader>ps", "", desc = "+squash (Octo)", ft = "octo" },
|
||||||
|
{ "<localleader>v", "", desc = "+review (Octo)", ft = "octo" },
|
||||||
|
{ "<localleader>g", "", desc = "+goto_issue (Octo)", ft = "octo" },
|
||||||
{ "@", "@<C-x><C-o>", mode = "i", ft = "octo", silent = true },
|
{ "@", "@<C-x><C-o>", mode = "i", ft = "octo", silent = true },
|
||||||
{ "#", "#<C-x><C-o>", mode = "i", ft = "octo", silent = true },
|
{ "#", "#<C-x><C-o>", mode = "i", ft = "octo", silent = true },
|
||||||
},
|
},
|
||||||
|
|
@ -39,12 +42,14 @@ return {
|
||||||
"pwntester/octo.nvim",
|
"pwntester/octo.nvim",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
vim.treesitter.language.register("markdown", "octo")
|
vim.treesitter.language.register("markdown", "octo")
|
||||||
if LazyVim.has("telescope.nvim") then
|
if LazyVim.has_extra("editor.telescope") then
|
||||||
opts.picker = "telescope"
|
opts.picker = "telescope"
|
||||||
elseif LazyVim.has("fzf-lua") then
|
elseif LazyVim.has_extra("editor.fzf") then
|
||||||
opts.picker = "fzf-lua"
|
opts.picker = "fzf-lua"
|
||||||
|
elseif LazyVim.has_extra("editor.snacks_picker") then
|
||||||
|
opts.picker = "snacks"
|
||||||
else
|
else
|
||||||
LazyVim.error("`octo.nvim` requires `telescope.nvim` or `fzf-lua`")
|
LazyVim.error("`octo.nvim` requires `telescope.nvim` or `fzf-lua` or `snacks.nvim`")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Keep some empty windows in sessions
|
-- Keep some empty windows in sessions
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@ return {
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"echasnovski/mini.starter",
|
"nvim-mini/mini.starter",
|
||||||
optional = true,
|
optional = true,
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
local items = {
|
local items = {
|
||||||
|
|
@ -152,6 +152,9 @@ return {
|
||||||
"nvimdev/dashboard-nvim",
|
"nvimdev/dashboard-nvim",
|
||||||
optional = true,
|
optional = true,
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
|
if not vim.tbl_get(opts, "config", "center") then
|
||||||
|
return
|
||||||
|
end
|
||||||
local projects = {
|
local projects = {
|
||||||
action = pick,
|
action = pick,
|
||||||
desc = " Projects",
|
desc = " Projects",
|
||||||
|
|
@ -165,4 +168,17 @@ return {
|
||||||
table.insert(opts.config.center, 3, projects)
|
table.insert(opts.config.center, 3, projects)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"folke/snacks.nvim",
|
||||||
|
optional = true,
|
||||||
|
opts = function(_, opts)
|
||||||
|
table.insert(opts.dashboard.preset.keys, 3, {
|
||||||
|
action = pick,
|
||||||
|
desc = "Projects",
|
||||||
|
icon = " ",
|
||||||
|
key = "p",
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,23 @@ return {
|
||||||
ft = "http",
|
ft = "http",
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>R", "", desc = "+Rest", ft = "http" },
|
{ "<leader>R", "", desc = "+Rest", ft = "http" },
|
||||||
{ "<leader>Rs", "<cmd>lua require('kulala').run()<cr>", desc = "Send the request", ft = "http" },
|
{ "<leader>Rb", "<cmd>lua require('kulala').scratchpad()<cr>", desc = "Open scratchpad", ft = "http" },
|
||||||
{ "<leader>Rt", "<cmd>lua require('kulala').toggle_view()<cr>", desc = "Toggle headers/body", ft = "http" },
|
{ "<leader>Rc", "<cmd>lua require('kulala').copy()<cr>", desc = "Copy as cURL", ft = "http" },
|
||||||
{ "<leader>Rp", "<cmd>lua require('kulala').jump_prev()<cr>", desc = "Jump to previous request", ft = "http" },
|
{ "<leader>RC", "<cmd>lua require('kulala').from_curl()<cr>", desc = "Paste from curl", ft = "http" },
|
||||||
|
{
|
||||||
|
"<leader>Rg",
|
||||||
|
"<cmd>lua require('kulala').download_graphql_schema()<cr>",
|
||||||
|
desc = "Download GraphQL schema",
|
||||||
|
ft = "http",
|
||||||
|
},
|
||||||
|
{ "<leader>Ri", "<cmd>lua require('kulala').inspect()<cr>", desc = "Inspect current request", ft = "http" },
|
||||||
{ "<leader>Rn", "<cmd>lua require('kulala').jump_next()<cr>", desc = "Jump to next request", ft = "http" },
|
{ "<leader>Rn", "<cmd>lua require('kulala').jump_next()<cr>", desc = "Jump to next request", ft = "http" },
|
||||||
|
{ "<leader>Rp", "<cmd>lua require('kulala').jump_prev()<cr>", desc = "Jump to previous request", ft = "http" },
|
||||||
|
{ "<leader>Rq", "<cmd>lua require('kulala').close()<cr>", desc = "Close window", ft = "http" },
|
||||||
|
{ "<leader>Rr", "<cmd>lua require('kulala').replay()<cr>", desc = "Replay the last request", ft = "http" },
|
||||||
|
{ "<leader>Rs", "<cmd>lua require('kulala').run()<cr>", desc = "Send the request", ft = "http" },
|
||||||
|
{ "<leader>RS", "<cmd>lua require('kulala').show_stats()<cr>", desc = "Show stats", ft = "http" },
|
||||||
|
{ "<leader>Rt", "<cmd>lua require('kulala').toggle_view()<cr>", desc = "Toggle headers/body", ft = "http" },
|
||||||
},
|
},
|
||||||
opts = {},
|
opts = {},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ if not vim.g.vscode then
|
||||||
end
|
end
|
||||||
|
|
||||||
local enabled = {
|
local enabled = {
|
||||||
|
"LazyVim",
|
||||||
"dial.nvim",
|
"dial.nvim",
|
||||||
"flit.nvim",
|
"flit.nvim",
|
||||||
"lazy.nvim",
|
"lazy.nvim",
|
||||||
|
|
@ -15,10 +16,10 @@ local enabled = {
|
||||||
"nvim-treesitter",
|
"nvim-treesitter",
|
||||||
"nvim-treesitter-textobjects",
|
"nvim-treesitter-textobjects",
|
||||||
"nvim-ts-context-commentstring",
|
"nvim-ts-context-commentstring",
|
||||||
|
"snacks.nvim",
|
||||||
"ts-comments.nvim",
|
"ts-comments.nvim",
|
||||||
"vim-repeat",
|
"vim-repeat",
|
||||||
"yanky.nvim",
|
"yanky.nvim",
|
||||||
"LazyVim",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
local Config = require("lazy.core.config")
|
local Config = require("lazy.core.config")
|
||||||
|
|
@ -27,14 +28,24 @@ Config.options.change_detection.enabled = false
|
||||||
Config.options.defaults.cond = function(plugin)
|
Config.options.defaults.cond = function(plugin)
|
||||||
return vim.tbl_contains(enabled, plugin.name) or plugin.vscode
|
return vim.tbl_contains(enabled, plugin.name) or plugin.vscode
|
||||||
end
|
end
|
||||||
|
vim.g.snacks_animate = false
|
||||||
|
|
||||||
-- Add some vscode specific keymaps
|
-- Add some vscode specific keymaps
|
||||||
vim.api.nvim_create_autocmd("User", {
|
vim.api.nvim_create_autocmd("User", {
|
||||||
pattern = "LazyVimKeymapsDefaults",
|
pattern = "LazyVimKeymapsDefaults",
|
||||||
callback = function()
|
callback = function()
|
||||||
|
-- VSCode-specific keymaps for search and navigation
|
||||||
vim.keymap.set("n", "<leader><space>", "<cmd>Find<cr>")
|
vim.keymap.set("n", "<leader><space>", "<cmd>Find<cr>")
|
||||||
vim.keymap.set("n", "<leader>/", [[<cmd>lua require('vscode').action('workbench.action.findInFiles')<cr>]])
|
vim.keymap.set("n", "<leader>/", [[<cmd>lua require('vscode').action('workbench.action.findInFiles')<cr>]])
|
||||||
vim.keymap.set("n", "<leader>ss", [[<cmd>lua require('vscode').action('workbench.action.gotoSymbol')<cr>]])
|
vim.keymap.set("n", "<leader>ss", [[<cmd>lua require('vscode').action('workbench.action.gotoSymbol')<cr>]])
|
||||||
|
|
||||||
|
-- Keep undo/redo lists in sync with VsCode
|
||||||
|
vim.keymap.set("n", "u", "<Cmd>call VSCodeNotify('undo')<CR>")
|
||||||
|
vim.keymap.set("n", "<C-r>", "<Cmd>call VSCodeNotify('redo')<CR>")
|
||||||
|
|
||||||
|
-- Navigate VSCode tabs like lazyvim buffers
|
||||||
|
vim.keymap.set("n", "<S-h>", "<Cmd>call VSCodeNotify('workbench.action.previousEditor')<CR>")
|
||||||
|
vim.keymap.set("n", "<S-l>", "<Cmd>call VSCodeNotify('workbench.action.nextEditor')<CR>")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -43,6 +54,20 @@ function LazyVim.terminal()
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
{
|
||||||
|
"snacks.nvim",
|
||||||
|
opts = {
|
||||||
|
bigfile = { enabled = false },
|
||||||
|
dashboard = { enabled = false },
|
||||||
|
indent = { enabled = false },
|
||||||
|
input = { enabled = false },
|
||||||
|
notifier = { enabled = false },
|
||||||
|
picker = { enabled = false },
|
||||||
|
quickfile = { enabled = false },
|
||||||
|
scroll = { enabled = false },
|
||||||
|
statuscolumn = { enabled = false },
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"LazyVim/LazyVim",
|
"LazyVim/LazyVim",
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue