Merge branch 'main' of github.com:LazyVim/LazyVim

This commit is contained in:
Kemboi Elvis 2025-10-21 22:10:05 +03:00
commit 036e0dd58c
87 changed files with 2155 additions and 477 deletions

View file

@ -1,3 +1,3 @@
{ {
".": "15.1.0" ".": "15.10.1"
} }

View file

@ -1,5 +1,239 @@
# Changelog # Changelog
## [15.10.1](https://github.com/LazyVim/LazyVim/compare/v15.10.0...v15.10.1) (2025-10-20)
### Bug Fixes
* **avante:** correct key mapping declarations ([#6656](https://github.com/LazyVim/LazyVim/issues/6656)) ([41d1b8d](https://github.com/LazyVim/LazyVim/commit/41d1b8dc72d4270c49db3365edba670d9fa01fbd))
* **blink:** added work-around back for unsupported native snippets ([899533a](https://github.com/LazyVim/LazyVim/commit/899533a101e4bacf35dadf091977b4d12875dbf6))
* **treesitter:** added buf to treesitter start just to be sure ([3ffb471](https://github.com/LazyVim/LazyVim/commit/3ffb471c187a66562b19bdf68382be9f82ac670d))
## [15.10.0](https://github.com/LazyVim/LazyVim/compare/v15.9.0...v15.10.0) (2025-10-20)
### Features
* **ai:** add avante.nvim for a better AI experience ([#4440](https://github.com/LazyVim/LazyVim/issues/4440)) ([2682ce0](https://github.com/LazyVim/LazyVim/commit/2682ce0ab95c0a88867855ada41948107db8232e))
* **extra:** allow users to add custom bundles through opts.init_options.bundles to jdtls ([#6265](https://github.com/LazyVim/LazyVim/issues/6265)) ([faeb24b](https://github.com/LazyVim/LazyVim/commit/faeb24ba956f103c5551bde11506991d8b594bc5))
* **extras:** add Dart language ([#4749](https://github.com/LazyVim/LazyVim/issues/4749)) ([90f84e7](https://github.com/LazyVim/LazyVim/commit/90f84e7e755f72bb99dc8a9dedbfef05e58eb09d))
* **extras:** added ember lang support ([#6203](https://github.com/LazyVim/LazyVim/issues/6203)) ([ac4cce0](https://github.com/LazyVim/LazyVim/commit/ac4cce0f2f436b3e2dd93ad9179178436ab8c600))
* **extras:** added twig language ([#5464](https://github.com/LazyVim/LazyVim/issues/5464)) ([a6eb51e](https://github.com/LazyVim/LazyVim/commit/a6eb51e5b5897749bed8721ce98cd2491b2ea8e2))
* **extras:** ai: add `claudecode.nvim` ([#6229](https://github.com/LazyVim/LazyVim/issues/6229)) ([e7a3e80](https://github.com/LazyVim/LazyVim/commit/e7a3e80ee1327ac012c7bb7257bb2d49f9f2fd89))
* **extras:** automatically update lazyvim.json for renamed or deprecated extras ([37ecd06](https://github.com/LazyVim/LazyVim/commit/37ecd06fad65d5c188ad2d2e55d47a8fd1594d16))
* **extras:** renamed extra omnisharp -> dotnet + added fautocomplete to lspconfig ([1b2e6e8](https://github.com/LazyVim/LazyVim/commit/1b2e6e8986b3cfee19635920129fc08df4f32b38))
* **extras:** utils: add `gh.nvim` ([#6250](https://github.com/LazyVim/LazyVim/issues/6250)) ([8db9c75](https://github.com/LazyVim/LazyVim/commit/8db9c75e8d3a8609926dcb868d2e462e0f0b1d3d))
* **go:** add linting with golangci-lint ([#6311](https://github.com/LazyVim/LazyVim/issues/6311)) ([248876a](https://github.com/LazyVim/LazyVim/commit/248876adb6b1f54031be350e45bbf0c7835d486f))
* **haskell:** update `haskell-tools` version and add formatters + linters ([#6230](https://github.com/LazyVim/LazyVim/issues/6230)) ([82382f4](https://github.com/LazyVim/LazyVim/commit/82382f455ad37bc4fa928fe4a6fb9379a924fa3a))
* **lang/fsharp:** add F# support to omnisharp extra ([#6538](https://github.com/LazyVim/LazyVim/issues/6538)) ([80a980a](https://github.com/LazyVim/LazyVim/commit/80a980ab00a871777c37ec3f0db9c394509b2465))
* **lang:** add neotest config for PHP tests ([#5958](https://github.com/LazyVim/LazyVim/issues/5958)) ([9b077c7](https://github.com/LazyVim/LazyVim/commit/9b077c7a8ec96050f3a3b73219c8b904d3d83ab0))
* **lang:** add solidity language support ([#4742](https://github.com/LazyVim/LazyVim/issues/4742)) ([2cd46d4](https://github.com/LazyVim/LazyVim/commit/2cd46d42ba357a42b11c5e4f5e16641bde0516d6))
* **lang:** add Typst language support ([#4042](https://github.com/LazyVim/LazyVim/issues/4042)) ([645846b](https://github.com/LazyVim/LazyVim/commit/645846be5c7d798c7e87e61d00e8cae4fd3741c7))
* **lang:** julia support ([#6231](https://github.com/LazyVim/LazyVim/issues/6231)) ([5d186c0](https://github.com/LazyVim/LazyVim/commit/5d186c009a85efbdad2b92115d4268c7c4a7aa18))
* **lang:** nix add `statix` linter ([#6244](https://github.com/LazyVim/LazyVim/issues/6244)) ([2a866f6](https://github.com/LazyVim/LazyVim/commit/2a866f6c8c974c88cb9c723560cbec4308d304a2))
* **sidekick:** added sidekick cli status to lualine ([16917db](https://github.com/LazyVim/LazyVim/commit/16917db94a056fe01b3bac604bc89da4077bd9cd))
### Bug Fixes
* **extras.lang:** fix Scala extra by using nvimMetals only ([#5726](https://github.com/LazyVim/LazyVim/issues/5726)) ([f118dca](https://github.com/LazyVim/LazyVim/commit/f118dca334d40cf8e78e0f0d5aa3108b972e8d84))
* **fzf-lua:** added some missing keymaps similar to snacks picker. Closes [#6036](https://github.com/LazyVim/LazyVim/issues/6036). Closes [#5830](https://github.com/LazyVim/LazyVim/issues/5830) ([69a5744](https://github.com/LazyVim/LazyVim/commit/69a57448032253ca086d999c0d53d6e33ad4e505))
* **helm:** broken helm highlighting ([#5335](https://github.com/LazyVim/LazyVim/issues/5335)) ([4d0d87f](https://github.com/LazyVim/LazyVim/commit/4d0d87f6268969987e5c58f59e086c886e77e1ae))
* **keymap:** remove select mode remaps of printable characters ([#6296](https://github.com/LazyVim/LazyVim/issues/6296)) ([83468be](https://github.com/LazyVim/LazyVim/commit/83468be35062d06896c233d90d2f1c1cd24d84f3))
* **tailwind:** additional settings ([#5266](https://github.com/LazyVim/LazyVim/issues/5266)) ([d2f9885](https://github.com/LazyVim/LazyVim/commit/d2f9885d6b8244818066cc16a5c72cb656748f6c))
* **telescope:** sync keymaps with snacks picker + added some that were missing ([1a08e9f](https://github.com/LazyVim/LazyVim/commit/1a08e9f50f8c11a329c3017c4bfdd4b96b7ec541))
* **twig:** correct mason url ([9d345de](https://github.com/LazyVim/LazyVim/commit/9d345dec446f577f75d36a147164ae258ffc2d8c))
* **typescript:** better default pwa-node DAP config. Closes [#6386](https://github.com/LazyVim/LazyVim/issues/6386) ([e4d3432](https://github.com/LazyVim/LazyVim/commit/e4d34328f244fc0c7f91587258e767bfb55d0648))
* **typescript:** support chrome, node and msedge dap adapters ([#6649](https://github.com/LazyVim/LazyVim/issues/6649)) ([0b65d33](https://github.com/LazyVim/LazyVim/commit/0b65d33d8545d179207c8827025f40764de61d06))
* **util.project:** different mapping on dashboard than `snacks.projects` ([#5737](https://github.com/LazyVim/LazyVim/issues/5737)) ([e389447](https://github.com/LazyVim/LazyVim/commit/e38944799e7fc45baea0483f5c955472f3ffde27))
### Reverts
* "feat(extra): allow users to add custom bundles through opts.init_options.bundles to jdtls ([#6265](https://github.com/LazyVim/LazyVim/issues/6265))" ([#6650](https://github.com/LazyVim/LazyVim/issues/6650)) ([a582f00](https://github.com/LazyVim/LazyVim/commit/a582f004473a3bade99c19c62fea649fb0b1c20f))
## [15.9.0](https://github.com/LazyVim/LazyVim/compare/v15.8.1...v15.9.0) (2025-10-19)
### Features
* **docker:** associate 'Containerfile' with 'dockerfile' filetype ([#5974](https://github.com/LazyVim/LazyVim/issues/5974)) ([97af4a2](https://github.com/LazyVim/LazyVim/commit/97af4a23bccac85eb02e489f573db68863d6ed33))
* **extras.rest:** add keymap for changing environment ([#5678](https://github.com/LazyVim/LazyVim/issues/5678)) ([1da659d](https://github.com/LazyVim/LazyVim/commit/1da659db4a3fbcd6d171f3b38d0092ced0887e61))
* **java:** enable `blink.cmp` capabilities to show signature documentation ([#5218](https://github.com/LazyVim/LazyVim/issues/5218)) ([9618e32](https://github.com/LazyVim/LazyVim/commit/9618e327edfb79d9cbb037a2039c4315a95df63f))
* **lang/omnisharp:** switch neotest adapter to vstest ([#6540](https://github.com/LazyVim/LazyVim/issues/6540)) ([4086d44](https://github.com/LazyVim/LazyVim/commit/4086d44a0b5c576630c603c7b71c6be5198d9eaf))
* **neotest:** extra keymap to attach to a test ([#6198](https://github.com/LazyVim/LazyVim/issues/6198)) ([66e927f](https://github.com/LazyVim/LazyVim/commit/66e927fd9d0b0ff2886b9fe1465d9396461a2665))
### Bug Fixes
* **blink:** remove snippet expand override (no longer needed). Closes [#6044](https://github.com/LazyVim/LazyVim/issues/6044) ([336e2c3](https://github.com/LazyVim/LazyVim/commit/336e2c3ea67636c4eea3cf8f7538feb86b5a0610))
* **chezmoi:** add `hidden=false` to fzf picker ([#6095](https://github.com/LazyVim/LazyVim/issues/6095)) ([1aa1b59](https://github.com/LazyVim/LazyVim/commit/1aa1b59a7ec7cab61fa7b096db53df15ec5008e7))
* **copilot-chat:** use up to date config for chat headers ([#6543](https://github.com/LazyVim/LazyVim/issues/6543)) ([2c5eef7](https://github.com/LazyVim/LazyVim/commit/2c5eef7df7520fbc6fe0d90150cd26ac9e4f325b))
* **extras/rust:** fix config key for files.exclude ([#5664](https://github.com/LazyVim/LazyVim/issues/5664)) ([762a34d](https://github.com/LazyVim/LazyVim/commit/762a34d5ad95447b241287e8d540b657a699d141))
* **extras:** adjust switch source/header shortcut ([#6567](https://github.com/LazyVim/LazyVim/issues/6567)) ([b36b858](https://github.com/LazyVim/LazyVim/commit/b36b8589b62f55b181367afe954606c73233c0a1))
* **extras:** remove procMacro ignored ([#6117](https://github.com/LazyVim/LazyVim/issues/6117)) ([4a3702e](https://github.com/LazyVim/LazyVim/commit/4a3702e050881fea262ccae980ae1ff9e849d275))
* **lang.omnisharp:** update CSharpier command and arguments for Mason compatibility ([#6156](https://github.com/LazyVim/LazyVim/issues/6156)) ([dfebe70](https://github.com/LazyVim/LazyVim/commit/dfebe70b8d09514dd3ee85e12463f266f93c5dd7))
* **lang.rust:** rust-analyzer hanging on root scanned ([#6178](https://github.com/LazyVim/LazyVim/issues/6178)) ([7bf8c22](https://github.com/LazyVim/LazyVim/commit/7bf8c22c56283fa6d5d35246dcd0f49d37a5c709))
* **latex:** ensure tex extra installs latex tree-sitter parser ([#6357](https://github.com/LazyVim/LazyVim/issues/6357)) ([ae74622](https://github.com/LazyVim/LazyVim/commit/ae74622e6666ea4c3e6c58c4ef2d3f313d8e8f20))
* **mini.animate:** schedule the toggle mapping to correctly take effect ([#6483](https://github.com/LazyVim/LazyVim/issues/6483)) ([bd23357](https://github.com/LazyVim/LazyVim/commit/bd233579a66018f526b6b0970e33afde4cde399e))
* **sql:** fix autocomplete when `omni` is used as a `blink.cmp` source ([#5652](https://github.com/LazyVim/LazyVim/issues/5652)) ([f6f72b9](https://github.com/LazyVim/LazyVim/commit/f6f72b90d41d9347b93a07d0b680195541f64c55))
* **treesitter:** attach textobject keymaps to existing buffers on load. Closes [#6642](https://github.com/LazyVim/LazyVim/issues/6642). Closes [#6639](https://github.com/LazyVim/LazyVim/issues/6639) ([92a7728](https://github.com/LazyVim/LazyVim/commit/92a77287321236f52ff38648a38cf314ab223137))
* **typescript:** make_position_params with offset encoding. ([#6277](https://github.com/LazyVim/LazyVim/issues/6277)) ([22152e9](https://github.com/LazyVim/LazyVim/commit/22152e958f3f7c2b732cb6429ccc90541e0ad17f))
* **ui:** ignore sidekick_terminal in mini-indentscope ([#6619](https://github.com/LazyVim/LazyVim/issues/6619)) ([f0b32b5](https://github.com/LazyVim/LazyVim/commit/f0b32b5955889d4d2d3636a52d2ddf5d113646df))
* **util:** add some kulala keymaps back to global ([#5960](https://github.com/LazyVim/LazyVim/issues/5960)) ([a16739e](https://github.com/LazyVim/LazyVim/commit/a16739e3328c2687d96f868839c575765c49baad))
* **vscode:** don't sync undo/redo with vscode ([#5957](https://github.com/LazyVim/LazyVim/issues/5957)) ([706ec44](https://github.com/LazyVim/LazyVim/commit/706ec4443a33ec474f2329b5b806e9cdb85cce43))
## [15.8.1](https://github.com/LazyVim/LazyVim/compare/v15.8.0...v15.8.1) (2025-10-18)
### Bug Fixes
* **treesitter:** reload lazyvim.tresitter.util to prevent issues with stale modules when upgrading ([62ce8a2](https://github.com/LazyVim/LazyVim/commit/62ce8a23d89fa766956447a3df01d9f3448e9a66))
## [15.8.0](https://github.com/LazyVim/LazyVim/compare/v15.7.1...v15.8.0) (2025-10-17)
### Features
* **gleam:** add conform ([#5640](https://github.com/LazyVim/LazyVim/issues/5640)) ([02b8dd3](https://github.com/LazyVim/LazyVim/commit/02b8dd3f4bd55f06be133471fad027f3131238f4))
* **sidekick:** added `<leader>ad` to close/detach a terminal/session ([f8b062b](https://github.com/LazyVim/LazyVim/commit/f8b062b130177f07d3c1c13b642402d42e980df5))
* **sidekick:** changed default keymaps for sidekick. Please check updated docs at sidekick.nvim ([a3e52dd](https://github.com/LazyVim/LazyVim/commit/a3e52dd346ea35db5521b66e46dca95d32f00cb4))
* **sidekick:** use `<a-a>` in any snacks picker to send the (selected) results to an AI tool ([26c43a9](https://github.com/LazyVim/LazyVim/commit/26c43a9b931f3ab04a8c449671250182ac9ddca6))
* **treesitter:** add installation instructions to get a C compiler on windows ([37032da](https://github.com/LazyVim/LazyVim/commit/37032dabd657ae567011e7ab4f881ecbf476eb76))
* **treesitter:** added support for `disable` langs to indent/highlight/folds. Closes [#6608](https://github.com/LazyVim/LazyVim/issues/6608) ([0e8069c](https://github.com/LazyVim/LazyVim/commit/0e8069c78ee92279055236388df8c2019476767a))
* **treesitter:** better health checks for treesitter requirements ([413b9d5](https://github.com/LazyVim/LazyVim/commit/413b9d5fa91c5bd5088b28c6d1764caa88542cb1))
* **treesitter:** on windows, use `gcc` if available and `cl.exe` is not available for building parsers ([2a1f3c3](https://github.com/LazyVim/LazyVim/commit/2a1f3c370145c3465c0142deade3e3b2660ce829))
### Bug Fixes
* **blink:** disable blink left/right key in the cmdline ([94c4603](https://github.com/LazyVim/LazyVim/commit/94c4603b6838fbe75343b6e3342b4343744157dc))
* **keymaps:** update deprecated diagnostic keymap to latest api change ([#6574](https://github.com/LazyVim/LazyVim/issues/6574)) ([b9d38f6](https://github.com/LazyVim/LazyVim/commit/b9d38f692015fecaa72d55282b74a3d601e4c9fa))
* **sidekick:** only add copilot to lspconfig when `opts.nes.enabled ~= false` ([049db39](https://github.com/LazyVim/LazyVim/commit/049db39de0f272e8368a4b3881ac5a13f0d04b09))
* **terminal:** term toggle keymaps now only work for snacks terminals. Closes [#6573](https://github.com/LazyVim/LazyVim/issues/6573) ([4efd0e2](https://github.com/LazyVim/LazyVim/commit/4efd0e2bea2a387d6fcdea8cf36a62049e8bafed))
* **treesiter:** check that `disable` options are tables ([e8c5fa7](https://github.com/LazyVim/LazyVim/commit/e8c5fa7eae06539c883699507caeadb46d74f401))
* **treesitter:** better check on windows if microsoft build tools is installed ([5effc77](https://github.com/LazyVim/LazyVim/commit/5effc77185f94f557809375b5650d427e7171c32))
* **xtras:** load `copilot-native` before `blink` ([#6588](https://github.com/LazyVim/LazyVim/issues/6588)) ([aa2c436](https://github.com/LazyVim/LazyVim/commit/aa2c43633adee0f80faf8d743d6476ea4f8ba5ca))
### Performance Improvements
* **ansible:** load on ft=yaml and run should only be mapped on ft=yaml.ansible ([ebdcf1b](https://github.com/LazyVim/LazyVim/commit/ebdcf1ba7ef18daa8c897c8922a5ef770e8bcffb))
## [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) ## [15.1.0](https://github.com/LazyVim/LazyVim/compare/v15.0.3...v15.1.0) (2025-09-18)

View file

@ -54,7 +54,7 @@ LazyVim 是一个基于 [💤 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)

View file

@ -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)_**

View file

@ -52,7 +52,7 @@ LazyVim es una configuración de Neovim impulsada por [💤 lazy.nvim](https://g
## ⚡️ Requisitos ## ⚡️ Requisitos
- Neovim >= **0.9.0** (debe ser compilado con **LuaJIT**) - Neovim >= **0.11.2** (debe ser compilado con **LuaJIT**)
- Git >= **2.19.0** (para soporte de clones parciales) - Git >= **2.19.0** (para soporte de clones parciales)
- una [Fuente Nerd](https://www.nerdfonts.com/) **_(opcional)_** - una [Fuente Nerd](https://www.nerdfonts.com/) **_(opcional)_**
- un compilador **C** para `nvim-treesitter`. Consulta [aquí](https://github.com/nvim-treesitter/nvim-treesitter#requirements) - un compilador **C** para `nvim-treesitter`. Consulta [aquí](https://github.com/nvim-treesitter/nvim-treesitter#requirements)

151
README-FR.md Normal file
View file

@ -0,0 +1,151 @@
<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">Install</a>
·
<a href="https://lazyvim.github.io/configuration">Configure</a>
·
<a href="https://lazyvim.github.io">Docs</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 est une configuration Neovim basée sur [💤 lazy.nvim](https://github.com/folke/lazy.nvim)
facilitant la personnalisation et l'ajout d'extensions.
Plutôt que d'imposer le choix entre partir de rien et utiliser
une distribution toute faite, LazyVim offre le meilleur des deux mondes
: la flexibilité d'une config ajustable selon vos besoins, et le confort
d'une configuration pensée et peaufinée à l'avance.
![image](https://user-images.githubusercontent.com/292349/211285846-0b7bb3bf-0462-4029-b64c-4ee1d037fc1c.png)
![image](https://user-images.githubusercontent.com/292349/213447056-92290767-ea16-430c-8727-ce994c93e9cc.png)
## ✨ Fonctionnalités
- 🔥 Transforme Neovim en un environnement de développement complet
- 💤 Customise et étends ta config sans effort grâce à [lazy.nvim](https://github.com/folke/lazy.nvim)
- 🚀 Rapide comme l'éclair !
- 🧹 Configuration par défaut propre et intuitive pour les options, les autocmds, et les keymaps
- 📦 Livré avec une variété de plugins pre-configurés et prêts à être utilisés
## ⚡️ Pré-requis
- Neovim >= **0.9.0** (doit être compilé avec **LuaJIT**)
- Git >= **2.19.0** (pour supporter le clonage partiel)
- Un [Nerd Font](https://www.nerdfonts.com/) **_(optionel)_**
- Un compileur **C** pour `nvim-treesitter`. Voir [ici](https://github.com/nvim-treesitter/nvim-treesitter#requirements)
## 🚀 Comment commencer
Un template pour **LazyVim** peut être trouvé [ici](https://github.com/LazyVim/starter)
<details><summary>Essayer avec 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>Installer le <a href="https://github.com/LazyVim/starter">LazyVim Starter</a></summary>
- Sauvegardez votre configuration Neovim :
```sh
mv ~/.config/nvim ~/.config/nvim.bak
mv ~/.local/share/nvim ~/.local/share/nvim.bak
```
- Clonez le starter
```sh
git clone https://github.com/LazyVim/starter ~/.config/nvim
```
- Supprimez le dossier `.git`, afin que vous puissiez l'ajouter à votre repo plus tard
```sh
rm -rf ~/.config/nvim/.git
```
- Lancez Neovim !
```sh
nvim
```
Consultez les commentaires dans les fichiers pour savoir comment personnaliser **LazyVim**.
</details>
---
Il y a une superbe vidéo (en anglais) de [@elijahmanor](https://github.com/elijahmanor)
qui vous guide pas-à-pas pour commencer.
[![Watch the video](https://img.youtube.com/vi/N93cTbtLCIM/hqdefault.jpg)](https://www.youtube.com/watch?v=N93cTbtLCIM)
[@dusty-phillips](https://github.com/dusty-phillips) a écrit un livre exhaustif
sur LazyVim, nommé [LazyVim for Ambitious Developers](https://lazyvim-ambitious-devs.phillips.codes)
disponible gratuitement en ligne.
## 📂 Structure de fichier
Les fichiers dans le dossier config vont être chargés automatiquement en temps voulu,
donc pas besoin de `require` ces fichiers manuellement.
**LazyVim** vient avec un ensemble de fichiers de configuration par défaut qui seront chargés
**_avant_** les vôtres. Voir [ici](https://github.com/LazyVim/LazyVim/tree/main/lua/lazyvim/config)
Vous pouvez ajouter vos configurations de plugins sous `lua/plugins/`.
Ici, tous les fichiers seront automatiquement chargés par [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>
## ⚙️ Configuration
Veuillez vous référer à la [documentation](https://lazyvim.github.io)

View file

@ -57,7 +57,7 @@ insieme alla comodità di un setup preconfigurato.
## ⚡️ Requisiti ## ⚡️ Requisiti
- Neovim >= **0.9.0** (deve essere compilato con **LuaJIT**) - Neovim >= **0.11.2** (deve essere compilato con **LuaJIT**)
- Git >= **2.19.0** (per supportare cloni parziali) - Git >= **2.19.0** (per supportare cloni parziali)
- a [Nerd Font](https://www.nerdfonts.com/) **_(opzionale)_** - a [Nerd Font](https://www.nerdfonts.com/) **_(opzionale)_**
- un compilatore **C** per `nvim-treesitter`. Leggi [qui](https://github.com/nvim-treesitter/nvim-treesitter#requirements) - un compilatore **C** per `nvim-treesitter`. Leggi [qui](https://github.com/nvim-treesitter/nvim-treesitter#requirements)

View file

@ -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)

View file

@ -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)를 확인해주시기바랍니다.

147
README-PL.md Normal file
View file

@ -0,0 +1,147 @@
<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">Install</a>
·
<a href="https://lazyvim.github.io/configuration">Configure</a>
·
<a href="https://lazyvim.github.io">Docs</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 to konfiguracja Neovim oparta na [💤 lazy.nvim](https://github.com/folke/lazy.nvim)
która ułatwia dostosowywanie i rozszerzanie konfiguracji.
Zamiast wybierać między rozpoczynaniem od zera a używaniem gotowej dystrybucji, LazyVim oferuje najlepsze z obu światów elastyczność pozwalającą na dostosowanie konfiguracji do własnych potrzeb oraz wygodę wstępnie skonfigurowanego środowiska.
![image](https://user-images.githubusercontent.com/292349/211285846-0b7bb3bf-0462-4029-b64c-4ee1d037fc1c.png)
![image](https://user-images.githubusercontent.com/292349/213447056-92290767-ea16-430c-8727-ce994c93e9cc.png)
## ✨ Funkcje
- 🔥 Przekształć Neovim w pełnoprawne IDE
- 💤 Łatwo dostosowuj i rozszerzaj swoją konfigurację dzięki [lazy.nvim](https://github.com/folke/lazy.nvim)
- 🚀 Niezwykle szybkie działanie
- 🧹 Przemyślane domyślne ustawienia opcji, autocmd i skrótów klawiszowych
- 📦 Zawiera bogaty zestaw wstępnie skonfigurowanych wtyczek gotowych do użycia
## ⚡️ Wymagania
- Neovim >= **0.9.0** (musi być skompilowany z **LuaJIT**)
- Git >= **2.19.0** (dla obsługi częściowego klonowania repozytoriów)
- [Nerd Font](https://www.nerdfonts.com/) **_(opcjonalnie)_**
- Kompilator **C** wymagany dla `nvim-treesitter`. Szczegóły [tutaj](https://github.com/nvim-treesitter/nvim-treesitter#requirements)
## 🚀 Pierwsze kroki
Szablon startowy dla **LazyVim** znajdziesz [tutaj](https://github.com/LazyVim/starter)
<details><summary>Wypróbuj z Dockerem</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>Zainstaluj <a href="https://github.com/LazyVim/starter">Starter LazyVim</a></summary>
- Wykonaj kopię zapasową swoich obecnych plików Neovim:
```sh
mv ~/.config/nvim ~/.config/nvim.bak
mv ~/.local/share/nvim ~/.local/share/nvim.bak
```
- Sklonuj repozytorium startowe:
```sh
git clone https://github.com/LazyVim/starter ~/.config/nvim
```
- Usuń folder `.git`, aby później móc dodać własne repozytorium:
```sh
rm -rf ~/.config/nvim/.git
```
- Uruchom Neovim!
```sh
nvim
```
W plikach znajdziesz komentarze, które pomogą Ci dostosować **LazyVim**.
</details>
---
[@elijahmanor](https://github.com/elijahmanor) stworzył świetne wideo z przewodnikiem, jak zacząć.
[![Obejrzyj wideo](https://img.youtube.com/vi/N93cTbtLCIM/hqdefault.jpg)](https://www.youtube.com/watch?v=N93cTbtLCIM)
[@dusty-phillips](https://github.com/dusty-phillips) napisał obszerną książkę
[LazyVim for Ambitious Developers](https://lazyvim-ambitious-devs.phillips.codes),
która jest dostępna za darmo online.
## 📂 Struktura plików
Pliki w katalogu `config` są automatycznie ładowane w odpowiednim momencie,
więc nie musisz ich ręcznie dołączać.
**LazyVim** zawiera zestaw domyślnych plików konfiguracyjnych,
które zostaną załadowane **_przed_** Twoimi własnymi. Szczegóły znajdziesz [tutaj](https://github.com/LazyVim/LazyVim/tree/main/lua/lazyvim/config).
Możesz dodać własne specyfikacje wtyczek w katalogu `lua/plugins/`.
Wszystkie pliki w tym folderze zostaną automatycznie załadowane przez [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>
## ⚙️ Konfiguracja
Zapoznaj się z [dokumentacją](https://lazyvim.github.io).

View file

@ -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)

View file

@ -111,10 +111,6 @@ docker run -w /root -it --rm alpine:edge sh -uelic '
--- ---
There's a great video created by [@elijahmanor](https://github.com/elijahmanor) with a walkthrough to get started.
[![Watch the video](https://img.youtube.com/vi/N93cTbtLCIM/hqdefault.jpg)](https://www.youtube.com/watch?v=N93cTbtLCIM)
[@dusty-phillips](https://github.com/dusty-phillips) wrote a comprehensive book called [@dusty-phillips](https://github.com/dusty-phillips) wrote a comprehensive book called
[LazyVim for Ambitious Developers](https://lazyvim-ambitious-devs.phillips.codes) [LazyVim for Ambitious Developers](https://lazyvim-ambitious-devs.phillips.codes)
available for free online. available for free online.

View file

@ -1,4 +1,4 @@
*LazyVim.txt* For Neovim Last change: 2025 September 18 *LazyVim.txt* For Neovim Last change: 2025 October 20
============================================================================== ==============================================================================
Table of Contents *LazyVim-table-of-contents* Table of Contents *LazyVim-table-of-contents*
@ -97,11 +97,6 @@ Install the LazyVim Starter ~
Refer to the comments in the files on how to customize **LazyVim**. Refer to the comments in the files on how to customize **LazyVim**.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Theres a great video created by @elijahmanor
<https://github.com/elijahmanor> with a walkthrough to get started.
<https://www.youtube.com/watch?v=N93cTbtLCIM>
@dusty-phillips <https://github.com/dusty-phillips> wrote a comprehensive book @dusty-phillips <https://github.com/dusty-phillips> wrote a comprehensive book
called LazyVim for Ambitious Developers called LazyVim for Ambitious Developers
<https://lazyvim-ambitious-devs.phillips.codes> available for free online. <https://lazyvim-ambitious-devs.phillips.codes> available for free online.
@ -127,9 +122,7 @@ Refer to the docs <https://lazyvim.github.io>
1. *image*: https://user-images.githubusercontent.com/292349/211285846-0b7bb3bf-0462-4029-b64c-4ee1d037fc1c.png 1. *image*: https://user-images.githubusercontent.com/292349/211285846-0b7bb3bf-0462-4029-b64c-4ee1d037fc1c.png
2. *image*: https://user-images.githubusercontent.com/292349/213447056-92290767-ea16-430c-8727-ce994c93e9cc.png 2. *image*: https://user-images.githubusercontent.com/292349/213447056-92290767-ea16-430c-8727-ce994c93e9cc.png
3. *@elijahmanor*: 3. *@dusty-phillips*:
4. *Watch the video*: https://img.youtube.com/vi/N93cTbtLCIM/hqdefault.jpg
5. *@dusty-phillips*:
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc> Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>

View file

@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util")
---@class LazyVimConfig: LazyVimOptions ---@class LazyVimConfig: LazyVimOptions
local M = {} local M = {}
M.version = "15.1.0" -- x-release-please-version M.version = "15.10.1" -- x-release-please-version
LazyVim.config = M LazyVim.config = M
---@class LazyVimOptions ---@class LazyVimOptions
@ -304,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
@ -326,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

View file

@ -81,8 +81,8 @@ map({ "i", "x", "n", "s" }, "<C-s>", "<cmd>w<cr><esc>", { desc = "Save File" })
map("n", "<leader>K", "<cmd>norm! K<cr>", { desc = "Keywordprg" }) map("n", "<leader>K", "<cmd>norm! K<cr>", { desc = "Keywordprg" })
-- better indenting -- better indenting
map("v", "<", "<gv") map("x", "<", "<gv")
map("v", ">", ">gv") map("x", ">", ">gv")
-- commenting -- commenting
map("n", "gco", "o<esc>Vcx<esc><cmd>normal gcc<cr>fxa<bs>", { desc = "Add Comment Below" }) map("n", "gco", "o<esc>Vcx<esc><cmd>normal gcc<cr>fxa<bs>", { desc = "Add Comment Below" })
@ -114,16 +114,18 @@ 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" })
-- formatting -- formatting
map({ "n", "v" }, "<leader>cf", function() map({ "n", "x" }, "<leader>cf", function()
LazyVim.format({ force = true }) LazyVim.format({ force = true })
end, { desc = "Format" }) 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" })
@ -163,12 +165,12 @@ 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>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", "<leader>gL", function() Snacks.picker.git_log() end, { desc = "Git 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>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>gB", function() Snacks.gitbrowse() end, { desc = "Git Browse (open)" })
map({"n", "x" }, "<leader>gY", function() map({"n", "x" }, "<leader>gY", function()
Snacks.gitbrowse({ open = function(url) vim.fn.setreg("+", url) end, notify = false }) Snacks.gitbrowse({ open = function(url) vim.fn.setreg("+", url) end, notify = false })
@ -187,12 +189,8 @@ 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>-", "<C-W>s", { desc = "Split Window Below", remap = true }) map("n", "<leader>-", "<C-W>s", { desc = "Split Window Below", remap = true })

View file

@ -4,6 +4,7 @@ local start = vim.health.start or vim.health.report_start
local ok = vim.health.ok or vim.health.report_ok local ok = vim.health.ok or vim.health.report_ok
local warn = vim.health.warn or vim.health.report_warn local warn = vim.health.warn or vim.health.report_warn
local error = vim.health.error or vim.health.report_error local error = vim.health.error or vim.health.report_error
local info = vim.health.info or vim.health.report_info
function M.check() function M.check()
start("LazyVim") start("LazyVim")
@ -33,6 +34,23 @@ function M.check()
warn(("`%s` is not installed"):format(name)) warn(("`%s` is not installed"):format(name))
end end
end end
start("LazyVim nvim-treesitter")
local tsok, health = LazyVim.treesitter.check()
local keys = vim.tbl_keys(health) ---@type string[]
table.sort(keys)
for _, k in pairs(keys) do
(health[k] and ok or error)(("`%s` is %s"):format(k, health[k] and "installed" or "not installed"))
end
if not tsok then
info(
"See the requirements at [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter/tree/main?tab=readme-ov-file#requirements)"
)
info("Run `:checkhealth nvim-treesitter` for more information.")
if vim.fn.has("win32") == 1 and not health["C compiler"] then
info("Install a C compiler with `winget install --id=BrechtSanders.WinLibs.POSIX.UCRT -e`")
end
end
end end
return M return M

View file

@ -13,6 +13,14 @@ 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,
@ -28,26 +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, snacks = true,
telescope = true, telescope = true,
treesitter = true,
treesitter_context = true, treesitter_context = true,
which_key = true, which_key = true,
}, },
@ -58,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_theme() opts.highlights = require("catppuccin.special.bufferline").get_theme()
end end
end, end,
}, },

View file

@ -18,7 +18,7 @@ return {
}, },
}) })
end, end,
mode = { "n", "v" }, mode = { "n", "x" },
desc = "Search and Replace", desc = "Search and Replace",
}, },
}, },
@ -64,7 +64,7 @@ return {
defaults = {}, defaults = {},
spec = { spec = {
{ {
mode = { "n", "v" }, mode = { "n", "x" },
{ "<leader><tab>", group = "tabs" }, { "<leader><tab>", group = "tabs" },
{ "<leader>c", group = "code" }, { "<leader>c", group = "code" },
{ "<leader>d", group = "debug" }, { "<leader>d", group = "debug" },
@ -173,8 +173,8 @@ return {
end, "Prev Hunk") end, "Prev Hunk")
map("n", "]H", function() gs.nav_hunk("last") end, "Last Hunk") map("n", "]H", function() gs.nav_hunk("last") end, "Last Hunk")
map("n", "[H", function() gs.nav_hunk("first") end, "First Hunk") map("n", "[H", function() gs.nav_hunk("first") end, "First Hunk")
map({ "n", "v" }, "<leader>ghs", ":Gitsigns stage_hunk<CR>", "Stage Hunk") map({ "n", "x" }, "<leader>ghs", ":Gitsigns stage_hunk<CR>", "Stage Hunk")
map({ "n", "v" }, "<leader>ghr", ":Gitsigns reset_hunk<CR>", "Reset Hunk") map({ "n", "x" }, "<leader>ghr", ":Gitsigns reset_hunk<CR>", "Reset Hunk")
map("n", "<leader>ghS", gs.stage_buffer, "Stage Buffer") map("n", "<leader>ghS", gs.stage_buffer, "Stage Buffer")
map("n", "<leader>ghu", gs.undo_stage_hunk, "Undo Stage Hunk") map("n", "<leader>ghu", gs.undo_stage_hunk, "Undo Stage Hunk")
map("n", "<leader>ghR", gs.reset_buffer, "Reset Buffer") map("n", "<leader>ghR", gs.reset_buffer, "Reset Buffer")

View file

@ -0,0 +1,89 @@
return {
{ "MunifTanjim/nui.nvim", lazy = true },
{
"yetone/avante.nvim",
build = vim.fn.has("win32") ~= 0 and "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false"
or "make",
event = "VeryLazy",
opts = {
provider = "copilot",
selection = {
hint_display = "none",
},
behaviour = {
auto_set_keymaps = false,
},
},
cmd = {
"AvanteAsk",
"AvanteBuild",
"AvanteChat",
"AvanteClear",
"AvanteEdit",
"AvanteFocus",
"AvanteHistory",
"AvanteModels",
"AvanteRefresh",
"AvanteShowRepoMap",
"AvanteStop",
"AvanteSwitchProvider",
"AvanteToggle",
},
keys = {
{ "<leader>aa", "<cmd>AvanteAsk<CR>", desc = "Ask Avante" },
{ "<leader>ac", "<cmd>AvanteChat<CR>", desc = "Chat with Avante" },
{ "<leader>ae", "<cmd>AvanteEdit<CR>", desc = "Edit Avante" },
{ "<leader>af", "<cmd>AvanteFocus<CR>", desc = "Focus Avante" },
{ "<leader>ah", "<cmd>AvanteHistory<CR>", desc = "Avante History" },
{ "<leader>am", "<cmd>AvanteModels<CR>", desc = "Select Avante Model" },
{ "<leader>an", "<cmd>AvanteChatNew<CR>", desc = "New Avante Chat" },
{ "<leader>ap", "<cmd>AvanteSwitchProvider<CR>", desc = "Switch Avante Provider" },
{ "<leader>ar", "<cmd>AvanteRefresh<CR>", desc = "Refresh Avante" },
{ "<leader>as", "<cmd>AvanteStop<CR>", desc = "Stop Avante" },
{ "<leader>at", "<cmd>AvanteToggle<CR>", desc = "Toggle Avante" },
},
},
-- support for image pasting
{
"HakonHarnes/img-clip.nvim",
event = "VeryLazy",
optional = true,
opts = {
-- recommended settings
default = {
embed_image_as_base64 = false,
prompt_for_file_name = false,
drag_and_drop = {
insert_mode = true,
},
-- required for Windows users
use_absolute_path = true,
},
},
},
-- Make sure to set this up properly if you have lazy=true
{
"MeanderingProgrammer/render-markdown.nvim",
optional = true,
opts = {
file_types = { "markdown", "Avante" },
},
ft = { "markdown", "Avante" },
},
-- blink.cmp source for avante.nvim
{
"saghen/blink.cmp",
optional = true,
specs = { "Kaiser-Yang/blink-cmp-avante" },
opts = {
sources = {
default = { "avante" },
providers = { avante = { module = "blink-cmp-avante", name = "Avante" } },
},
},
},
}

View file

@ -0,0 +1,22 @@
return {
"coder/claudecode.nvim",
opts = {},
keys = {
{ "<leader>a", "", desc = "+ai", mode = { "n", "v" } },
{ "<leader>ac", "<cmd>ClaudeCode<cr>", desc = "Toggle Claude" },
{ "<leader>af", "<cmd>ClaudeCodeFocus<cr>", desc = "Focus Claude" },
{ "<leader>ar", "<cmd>ClaudeCode --resume<cr>", desc = "Resume Claude" },
{ "<leader>aC", "<cmd>ClaudeCode --continue<cr>", desc = "Continue Claude" },
{ "<leader>ab", "<cmd>ClaudeCodeAdd %<cr>", desc = "Add current buffer" },
{ "<leader>as", "<cmd>ClaudeCodeSend<cr>", mode = "v", desc = "Send to Claude" },
{
"<leader>as",
"<cmd>ClaudeCodeTreeAdd<cr>",
desc = "Add file",
ft = { "NvimTree", "neo-tree", "oil" },
},
-- Diff management
{ "<leader>aa", "<cmd>ClaudeCodeDiffAccept<cr>", desc = "Accept diff" },
{ "<leader>ad", "<cmd>ClaudeCodeDiffDeny<cr>", desc = "Deny diff" },
},
}

View file

@ -8,8 +8,11 @@ return {
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,
question_header = "" .. user .. " ", headers = {
answer_header = " Copilot ", user = "" .. user .. " ",
assistant = " Copilot ",
tool = "󰊳 Tool ",
},
window = { window = {
width = 0.4, width = 0.4,
}, },
@ -17,14 +20,14 @@ return {
end, end,
keys = { keys = {
{ "<c-s>", "<CR>", ft = "copilot-chat", desc = "Submit Prompt", remap = true }, { "<c-s>", "<CR>", ft = "copilot-chat", desc = "Submit Prompt", remap = true },
{ "<leader>a", "", desc = "+ai", mode = { "n", "v" } }, { "<leader>a", "", desc = "+ai", mode = { "n", "x" } },
{ {
"<leader>aa", "<leader>aa",
function() function()
return require("CopilotChat").toggle() return require("CopilotChat").toggle()
end, end,
desc = "Toggle (CopilotChat)", desc = "Toggle (CopilotChat)",
mode = { "n", "v" }, mode = { "n", "x" },
}, },
{ {
"<leader>ax", "<leader>ax",
@ -32,7 +35,7 @@ return {
return require("CopilotChat").reset() return require("CopilotChat").reset()
end, end,
desc = "Clear (CopilotChat)", desc = "Clear (CopilotChat)",
mode = { "n", "v" }, mode = { "n", "x" },
}, },
{ {
"<leader>aq", "<leader>aq",
@ -46,7 +49,7 @@ return {
end) end)
end, end,
desc = "Quick Chat (CopilotChat)", desc = "Quick Chat (CopilotChat)",
mode = { "n", "v" }, mode = { "n", "x" },
}, },
{ {
"<leader>ap", "<leader>ap",
@ -54,7 +57,7 @@ return {
require("CopilotChat").select_prompt() require("CopilotChat").select_prompt()
end, end,
desc = "Prompt Actions (CopilotChat)", desc = "Prompt Actions (CopilotChat)",
mode = { "n", "v" }, mode = { "n", "x" },
}, },
}, },
config = function(_, opts) config = function(_, opts)

View 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,
},
}

View file

@ -25,6 +25,17 @@ return {
}, },
}, },
-- 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 -- add ai_accept action
{ {
"zbirenbaum/copilot.lua", "zbirenbaum/copilot.lua",
@ -98,15 +109,14 @@ return {
{ {
"saghen/blink.cmp", "saghen/blink.cmp",
optional = true, optional = true,
dependencies = { "giuxtaposition/blink-cmp-copilot" }, dependencies = { "fang2hou/blink-copilot" },
opts = { opts = {
sources = { sources = {
default = { "copilot" }, default = { "copilot" },
providers = { providers = {
copilot = { copilot = {
name = "copilot", name = "copilot",
module = "blink-cmp-copilot", module = "blink-copilot",
kind = "Copilot",
score_offset = 100, score_offset = 100,
async = true, async = true,
}, },

View file

@ -0,0 +1,146 @@
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,
})
table.insert(opts.sections.lualine_x, 2, {
function()
local status = require("sidekick.status").cli()
return "" .. (#status > 1 and #status or "")
end,
cond = function()
return #require("sidekick.status").cli() > 0
end,
color = function()
return { fg = Snacks.util.color("Special") }
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",
},
},
},
{
"folke/snacks.nvim",
optional = true,
opts = {
picker = {
actions = {
sidekick_send = function(...)
return require("sidekick.cli.picker.snacks").send(...)
end,
},
win = {
input = {
keys = {
["<a-a>"] = {
"sidekick_send",
mode = { "n", "i" },
},
},
},
},
},
},
},
}

View file

@ -37,9 +37,7 @@ return {
---@type blink.cmp.Config ---@type blink.cmp.Config
opts = { opts = {
snippets = { snippets = {
expand = function(snippet, _) preset = "default",
return LazyVim.cmp.expand(snippet)
end,
}, },
appearance = { appearance = {
@ -85,7 +83,11 @@ return {
cmdline = { cmdline = {
enabled = true, enabled = true,
keymap = { preset = "cmdline" }, keymap = {
preset = "cmdline",
["<Right>"] = false,
["<Left>"] = false,
},
completion = { completion = {
list = { selection = { preselect = false } }, list = { selection = { preselect = false } },
menu = { menu = {
@ -104,6 +106,9 @@ return {
}, },
---@param opts blink.cmp.Config | { sources: { compat: string[] } } ---@param opts blink.cmp.Config | { sources: { compat: string[] } }
config = function(_, opts) config = function(_, opts)
if opts.snippets and opts.snippets.preset == "default" then
opts.snippets.expand = LazyVim.cmp.expand
end
-- setup compat sources -- setup compat sources
local enabled = opts.sources.default local enabled = opts.sources.default
for _, source in ipairs(opts.sources.compat or {}) do for _, source in ipairs(opts.sources.compat or {}) do
@ -122,12 +127,12 @@ return {
if opts.keymap.preset == "super-tab" then -- super-tab if opts.keymap.preset == "super-tab" then -- super-tab
opts.keymap["<Tab>"] = { opts.keymap["<Tab>"] = {
require("blink.cmp.keymap.presets").get("super-tab")["<Tab>"][1], require("blink.cmp.keymap.presets").get("super-tab")["<Tab>"][1],
LazyVim.cmp.map({ "snippet_forward", "ai_accept" }), LazyVim.cmp.map({ "snippet_forward", "ai_nes", "ai_accept" }),
"fallback", "fallback",
} }
else -- other presets else -- other presets
opts.keymap["<Tab>"] = { opts.keymap["<Tab>"] = {
LazyVim.cmp.map({ "snippet_forward", "ai_accept" }), LazyVim.cmp.map({ "snippet_forward", "ai_nes", "ai_accept" }),
"fallback", "fallback",
} }
end end

View file

@ -1,6 +1,6 @@
return { return {
-- disable builtin snippet support -- disable builtin snippet support
{ "garymjr/nvim-snippets", enabled = false }, { "garymjr/nvim-snippets", optional = true, enabled = false },
-- add luasnip -- add luasnip
{ {

View file

@ -1,6 +1,6 @@
if lazyvim_docs then if lazyvim_docs then
-- Set to `false` to prevent "non-lsp snippets"" from appearing inside completion windows -- 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 -- Motivation: Less clutter in completion windows and a more direct usage of snippets
vim.g.lazyvim_mini_snippets_in_completion = true vim.g.lazyvim_mini_snippets_in_completion = true
-- NOTE: Please also read: -- NOTE: Please also read:

View file

@ -8,7 +8,7 @@ return {
-- 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")
local mappings = { local mappings = {
{ opts.mappings.add, desc = "Add Surrounding", mode = { "n", "v" } }, { opts.mappings.add, desc = "Add Surrounding", mode = { "n", "x" } },
{ opts.mappings.delete, desc = "Delete Surrounding" }, { opts.mappings.delete, desc = "Delete Surrounding" },
{ opts.mappings.find, desc = "Find Right Surrounding" }, { opts.mappings.find, desc = "Find Right Surrounding" },
{ opts.mappings.find_left, desc = "Find Left Surrounding" }, { opts.mappings.find_left, desc = "Find Left Surrounding" },

View file

@ -52,7 +52,7 @@ return {
fallback() fallback()
end, end,
["<tab>"] = function(fallback) ["<tab>"] = function(fallback)
return LazyVim.cmp.map({ "snippet_forward", "ai_accept" }, fallback)() return LazyVim.cmp.map({ "snippet_forward", "ai_nes", "ai_accept" }, fallback)()
end, end,
}), }),
sources = cmp.config.sources({ sources = cmp.config.sources({

View file

@ -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

View file

@ -84,7 +84,7 @@ return {
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ "<leader>du", function() require("dapui").toggle({ }) end, desc = "Dap UI" }, { "<leader>du", function() require("dapui").toggle({ }) end, desc = "Dap UI" },
{ "<leader>de", function() require("dapui").eval() end, desc = "Eval", mode = {"n", "v"} }, { "<leader>de", function() require("dapui").eval() end, desc = "Eval", mode = {"n", "x"} },
}, },
opts = {}, opts = {},
config = function(_, opts) config = function(_, opts)

View file

@ -19,8 +19,8 @@ return {
keys = { keys = {
{ "<C-a>", function() return M.dial(true) end, expr = true, desc = "Increment", mode = {"n", "v"} }, { "<C-a>", function() return M.dial(true) end, expr = true, desc = "Increment", mode = {"n", "v"} },
{ "<C-x>", function() return M.dial(false) end, expr = true, desc = "Decrement", mode = {"n", "v"} }, { "<C-x>", function() return M.dial(false) end, expr = true, desc = "Decrement", mode = {"n", "v"} },
{ "g<C-a>", function() return M.dial(true, true) end, expr = true, desc = "Increment", mode = {"n", "v"} }, { "g<C-a>", function() return M.dial(true, true) end, expr = true, desc = "Increment", mode = {"n", "x"} },
{ "g<C-x>", function() return M.dial(false, true) end, expr = true, desc = "Decrement", mode = {"n", "v"} }, { "g<C-x>", function() return M.dial(false, true) end, expr = true, desc = "Decrement", mode = {"n", "x"} },
}, },
opts = function() opts = function()
local augend = require("dial.augend") local augend = require("dial.augend")

View file

@ -120,7 +120,7 @@ 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(vim.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",
@ -135,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,
@ -218,6 +218,7 @@ return {
{ "<leader><space>", LazyVim.pick("files"), desc = "Find Files (Root Dir)" }, { "<leader><space>", LazyVim.pick("files"), desc = "Find Files (Root Dir)" },
-- find -- find
{ "<leader>fb", "<cmd>FzfLua buffers sort_mru=true sort_lastused=true<cr>", desc = "Buffers" }, { "<leader>fb", "<cmd>FzfLua buffers sort_mru=true sort_lastused=true<cr>", desc = "Buffers" },
{ "<leader>fB", "<cmd>FzfLua buffers<cr>", desc = "Buffers (all)" },
{ "<leader>fc", LazyVim.pick.config_files(), desc = "Find Config File" }, { "<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"), desc = "Find Files (Root Dir)" },
{ "<leader>fF", LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" }, { "<leader>fF", LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" },
@ -226,15 +227,19 @@ return {
{ "<leader>fR", LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" }, { "<leader>fR", LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" },
-- git -- git
{ "<leader>gc", "<cmd>FzfLua git_commits<CR>", desc = "Commits" }, { "<leader>gc", "<cmd>FzfLua git_commits<CR>", desc = "Commits" },
{ "<leader>gd", "<cmd>FzfLua git_diff<cr>", desc = "Git Diff (hunks)" },
{ "<leader>gl", "<cmd>FzfLua git_commits<CR>", desc = "Commits" },
{ "<leader>gs", "<cmd>FzfLua git_status<CR>", desc = "Status" }, { "<leader>gs", "<cmd>FzfLua git_status<CR>", desc = "Status" },
{ "<leader>gS", "<cmd>FzfLua git_stash<cr>", desc = "Git Stash" },
-- search -- search
{ '<leader>s"', "<cmd>FzfLua registers<cr>", desc = "Registers" }, { '<leader>s"', "<cmd>FzfLua registers<cr>", desc = "Registers" },
{ "<leader>s/", "<cmd>FzfLua search_history<cr>", desc = "Search History" },
{ "<leader>sa", "<cmd>FzfLua autocmds<cr>", desc = "Auto Commands" }, { "<leader>sa", "<cmd>FzfLua autocmds<cr>", desc = "Auto Commands" },
{ "<leader>sb", "<cmd>FzfLua grep_curbuf<cr>", desc = "Buffer" }, { "<leader>sb", "<cmd>FzfLua lines<cr>", desc = "Buffer Lines" },
{ "<leader>sc", "<cmd>FzfLua command_history<cr>", desc = "Command History" }, { "<leader>sc", "<cmd>FzfLua command_history<cr>", desc = "Command History" },
{ "<leader>sC", "<cmd>FzfLua commands<cr>", desc = "Commands" }, { "<leader>sC", "<cmd>FzfLua commands<cr>", desc = "Commands" },
{ "<leader>sd", "<cmd>FzfLua diagnostics_document<cr>", desc = "Document Diagnostics" }, { "<leader>sd", "<cmd>FzfLua diagnostics_workspace<cr>", desc = "Diagnostics" },
{ "<leader>sD", "<cmd>FzfLua diagnostics_workspace<cr>", desc = "Workspace Diagnostics" }, { "<leader>sD", "<cmd>FzfLua diagnostics_document<cr>", desc = "Buffer Diagnostics" },
{ "<leader>sg", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" }, { "<leader>sg", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" },
{ "<leader>sG", LazyVim.pick("live_grep", { root = false }), desc = "Grep (cwd)" }, { "<leader>sG", LazyVim.pick("live_grep", { root = false }), desc = "Grep (cwd)" },
{ "<leader>sh", "<cmd>FzfLua help_tags<cr>", desc = "Help Pages" }, { "<leader>sh", "<cmd>FzfLua help_tags<cr>", desc = "Help Pages" },
@ -248,8 +253,8 @@ return {
{ "<leader>sq", "<cmd>FzfLua quickfix<cr>", desc = "Quickfix List" }, { "<leader>sq", "<cmd>FzfLua quickfix<cr>", desc = "Quickfix List" },
{ "<leader>sw", LazyVim.pick("grep_cword"), desc = "Word (Root Dir)" }, { "<leader>sw", LazyVim.pick("grep_cword"), desc = "Word (Root Dir)" },
{ "<leader>sW", LazyVim.pick("grep_cword", { root = false }), desc = "Word (cwd)" }, { "<leader>sW", LazyVim.pick("grep_cword", { root = false }), desc = "Word (cwd)" },
{ "<leader>sw", LazyVim.pick("grep_visual"), mode = "v", desc = "Selection (Root Dir)" }, { "<leader>sw", LazyVim.pick("grep_visual"), mode = "x", desc = "Selection (Root Dir)" },
{ "<leader>sW", LazyVim.pick("grep_visual", { root = false }), mode = "v", desc = "Selection (cwd)" }, { "<leader>sW", LazyVim.pick("grep_visual", { root = false }), mode = "x", desc = "Selection (cwd)" },
{ "<leader>uC", LazyVim.pick("colorschemes"), desc = "Colorscheme with Preview" }, { "<leader>uC", LazyVim.pick("colorschemes"), desc = "Colorscheme with Preview" },
{ {
"<leader>ss", "<leader>ss",

View file

@ -101,6 +101,7 @@ return {
"<cmd>Telescope buffers sort_mru=true sort_lastused=true ignore_current_buffer=true<cr>", "<cmd>Telescope buffers sort_mru=true sort_lastused=true ignore_current_buffer=true<cr>",
desc = "Buffers", desc = "Buffers",
}, },
{ "<leader>fB", "<cmd>Telescope buffers<cr>", desc = "Buffers (all)" },
{ "<leader>fc", LazyVim.pick.config_files(), desc = "Find Config File" }, { "<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"), desc = "Find Files (Root Dir)" },
{ "<leader>fF", LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" }, { "<leader>fF", LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" },
@ -109,15 +110,18 @@ return {
{ "<leader>fR", LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" }, { "<leader>fR", LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" },
-- git -- git
{ "<leader>gc", "<cmd>Telescope git_commits<CR>", desc = "Commits" }, { "<leader>gc", "<cmd>Telescope git_commits<CR>", desc = "Commits" },
{ "<leader>gl", "<cmd>Telescope git_commits<CR>", desc = "Commits" },
{ "<leader>gs", "<cmd>Telescope git_status<CR>", desc = "Status" }, { "<leader>gs", "<cmd>Telescope git_status<CR>", desc = "Status" },
{ "<leader>gS", "<cmd>Telescope git_stash<cr>", desc = "Git Stash" },
-- search -- search
{ '<leader>s"', "<cmd>Telescope registers<cr>", desc = "Registers" }, { '<leader>s"', "<cmd>Telescope registers<cr>", desc = "Registers" },
{ "<leader>s/", "<cmd>Telescope search_history<cr>", desc = "Search History" },
{ "<leader>sa", "<cmd>Telescope autocommands<cr>", desc = "Auto Commands" }, { "<leader>sa", "<cmd>Telescope autocommands<cr>", desc = "Auto Commands" },
{ "<leader>sb", "<cmd>Telescope current_buffer_fuzzy_find<cr>", desc = "Buffer" }, { "<leader>sb", "<cmd>Telescope current_buffer_fuzzy_find<cr>", desc = "Buffer Lines" },
{ "<leader>sc", "<cmd>Telescope command_history<cr>", desc = "Command History" }, { "<leader>sc", "<cmd>Telescope command_history<cr>", desc = "Command History" },
{ "<leader>sC", "<cmd>Telescope commands<cr>", desc = "Commands" }, { "<leader>sC", "<cmd>Telescope commands<cr>", desc = "Commands" },
{ "<leader>sd", "<cmd>Telescope diagnostics bufnr=0<cr>", desc = "Document Diagnostics" }, { "<leader>sd", "<cmd>Telescope diagnostics<cr>", desc = "Diagnostics" },
{ "<leader>sD", "<cmd>Telescope diagnostics<cr>", desc = "Workspace Diagnostics" }, { "<leader>sD", "<cmd>Telescope diagnostics bufnr=0<cr>", desc = "Buffer Diagnostics" },
{ "<leader>sg", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" }, { "<leader>sg", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" },
{ "<leader>sG", LazyVim.pick("live_grep", { root = false }), desc = "Grep (cwd)" }, { "<leader>sG", LazyVim.pick("live_grep", { root = false }), desc = "Grep (cwd)" },
{ "<leader>sh", "<cmd>Telescope help_tags<cr>", desc = "Help Pages" }, { "<leader>sh", "<cmd>Telescope help_tags<cr>", desc = "Help Pages" },
@ -132,8 +136,8 @@ return {
{ "<leader>sq", "<cmd>Telescope quickfix<cr>", desc = "Quickfix List" }, { "<leader>sq", "<cmd>Telescope quickfix<cr>", desc = "Quickfix List" },
{ "<leader>sw", LazyVim.pick("grep_string", { word_match = "-w" }), desc = "Word (Root Dir)" }, { "<leader>sw", LazyVim.pick("grep_string", { word_match = "-w" }), desc = "Word (Root Dir)" },
{ "<leader>sW", LazyVim.pick("grep_string", { root = false, word_match = "-w" }), desc = "Word (cwd)" }, { "<leader>sW", LazyVim.pick("grep_string", { root = false, word_match = "-w" }), desc = "Word (cwd)" },
{ "<leader>sw", LazyVim.pick("grep_string"), mode = "v", desc = "Selection (Root Dir)" }, { "<leader>sw", LazyVim.pick("grep_string"), mode = "x", desc = "Selection (Root Dir)" },
{ "<leader>sW", LazyVim.pick("grep_string", { root = false }), mode = "v", desc = "Selection (cwd)" }, { "<leader>sW", LazyVim.pick("grep_string", { root = false }), mode = "x", desc = "Selection (cwd)" },
{ "<leader>uC", LazyVim.pick("colorscheme", { enable_preview = true }), desc = "Colorscheme with Preview" }, { "<leader>uC", LazyVim.pick("colorscheme", { enable_preview = true }), desc = "Colorscheme with Preview" },
{ {
"<leader>ss", "<leader>ss",

View file

@ -19,13 +19,14 @@ return {
}, },
{ {
"mfussenegger/nvim-ansible", "mfussenegger/nvim-ansible",
ft = {}, ft = { "yaml" },
keys = { keys = {
{ {
"<leader>ta", "<leader>ta",
function() function()
require("ansible").run() require("ansible").run()
end, end,
ft = "yaml.ansible",
desc = "Ansible Run Playbook/Role", desc = "Ansible Run Playbook/Role",
silent = true, silent = true,
}, },

View file

@ -60,7 +60,7 @@ return {
-- Ensure mason installs the server -- Ensure mason installs the server
clangd = { clangd = {
keys = { keys = {
{ "<leader>ch", "<cmd>ClangdSwitchSourceHeader<cr>", desc = "Switch Source/Header (C/C++)" }, { "<leader>ch", "<cmd>LspClangdSwitchSourceHeader<cr>", desc = "Switch Source/Header (C/C++)" },
}, },
root_markers = { root_markers = {
"compile_commands.json", "compile_commands.json",

View file

@ -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
{ {
@ -76,13 +76,13 @@ return {
end end
vim.keymap.set( vim.keymap.set(
{ "n", "v" }, { "n", "x" },
"[c", "[c",
"<CMD>call search('^; -\\+$', 'bw')<CR>", "<CMD>call search('^; -\\+$', 'bw')<CR>",
{ silent = true, buffer = true, desc = "Jumps to the begining of previous evaluation output." } { silent = true, buffer = true, desc = "Jumps to the begining of previous evaluation output." }
) )
vim.keymap.set( vim.keymap.set(
{ "n", "v" }, { "n", "x" },
"]c", "]c",
"<CMD>call search('^; -\\+$', 'w')<CR>", "<CMD>call search('^; -\\+$', 'w')<CR>",
{ silent = true, buffer = true, desc = "Jumps to the begining of next evaluation output." } { silent = true, buffer = true, desc = "Jumps to the begining of next evaluation output." }

View file

@ -0,0 +1,45 @@
return {
recommended = function()
return LazyVim.extras.wants({
ft = "dart",
root = { "pubspec.yaml" },
})
end,
{
"neovim/nvim-lspconfig",
opts = {
servers = {
dartls = {},
},
},
},
{
"nvim-treesitter/nvim-treesitter",
opts = { ensure_installed = { "dart" } },
},
{
"stevearc/conform.nvim",
opts = {
formatters = {
dart_format = {
args = { "format", "--line-length", "120" },
},
},
formatters_by_ft = {
dart = { "dart_format" },
},
},
},
{
"nvim-neotest/neotest",
optional = true,
dependencies = {
"sidlatau/neotest-dart",
},
opts = {
adapters = {
["neotest-dart"] = {},
},
},
},
}

View file

@ -2,7 +2,14 @@ return {
recommended = function() recommended = function()
return LazyVim.extras.wants({ return LazyVim.extras.wants({
ft = "dockerfile", ft = "dockerfile",
root = { "Dockerfile", "docker-compose.yml", "compose.yml", "docker-compose.yaml", "compose.yaml" }, root = {
"Dockerfile",
"Containerfile",
"docker-compose.yml",
"compose.yml",
"docker-compose.yaml",
"compose.yaml",
},
}) })
end, end,
{ {

View file

@ -1,15 +1,15 @@
return { return {
recommended = function() recommended = function()
return LazyVim.extras.wants({ return LazyVim.extras.wants({
ft = { "cs", "vb" }, ft = { "cs", "vb", "fsharp" },
root = { "*.sln", "*.csproj", "omnisharp.json", "function.json" }, root = { "*.sln", "*.csproj", "*.fsproj", "omnisharp.json", "function.json", "paket.dependencies", "paket.lock" },
}) })
end, end,
{ "Hoffs/omnisharp-extended-lsp.nvim", lazy = true }, { "Hoffs/omnisharp-extended-lsp.nvim", lazy = true },
{ {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
opts = { ensure_installed = { "c_sharp" } }, opts = { ensure_installed = { "c_sharp", "fsharp" } },
}, },
{ {
"nvimtools/none-ls.nvim", "nvimtools/none-ls.nvim",
@ -18,6 +18,7 @@ return {
local nls = require("null-ls") local nls = require("null-ls")
opts.sources = opts.sources or {} opts.sources = opts.sources or {}
table.insert(opts.sources, nls.builtins.formatting.csharpier) table.insert(opts.sources, nls.builtins.formatting.csharpier)
table.insert(opts.sources, nls.builtins.formatting.fantomas)
end, end,
}, },
{ {
@ -26,23 +27,19 @@ return {
opts = { opts = {
formatters_by_ft = { formatters_by_ft = {
cs = { "csharpier" }, cs = { "csharpier" },
}, fsharp = { "fantomas" },
formatters = {
csharpier = {
command = "dotnet-csharpier",
args = { "--write-stdout" },
},
}, },
}, },
}, },
{ {
"mason-org/mason.nvim", "mason-org/mason.nvim",
opts = { ensure_installed = { "csharpier", "netcoredbg" } }, opts = { ensure_installed = { "csharpier", "netcoredbg", "fantomas" } },
}, },
{ {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
opts = { opts = {
servers = { servers = {
fsautocomplete = {},
omnisharp = { omnisharp = {
handlers = { handlers = {
["textDocument/definition"] = function(...) ["textDocument/definition"] = function(...)
@ -109,12 +106,12 @@ return {
"nvim-neotest/neotest", "nvim-neotest/neotest",
optional = true, optional = true,
dependencies = { dependencies = {
"Issafalcon/neotest-dotnet", "Nsidorenco/neotest-vstest",
}, },
opts = { opts = {
adapters = { adapters = {
["neotest-dotnet"] = { ["neotest-vstest"] = {
-- Here we can set options for neotest-dotnet -- Here we can set options for neotest-vstest
}, },
}, },
}, },

View file

@ -0,0 +1,29 @@
return {
recommended = function()
return LazyVim.extras.wants({
ft = { "handlebars", "typescript", "javascript", "typescript.glimmer", "javascript.glimmer" },
root = { "ember-cli-build.js", ".git" },
})
end,
{
"nvim-treesitter/nvim-treesitter",
opts = { ensure_installed = { "css", "glimmer", "glimmer_javascript", "glimmer_typescript" } },
},
{
"neovim/nvim-lspconfig",
opts = {
servers = {
ember = {},
},
},
},
{
"conform.nvim",
opts = function(_, opts)
if LazyVim.has_extra("formatting.prettier") then
opts.formatters_by_ft = opts.formatters_by_ft or {}
opts.formatters_by_ft.glimmer = { "prettier" }
end
end,
},
}

View file

@ -17,4 +17,13 @@ return {
}, },
}, },
}, },
{
"conform.nvim",
optional = true,
opts = {
formatters_by_ft = {
gleam = { "gleam" },
},
},
},
} }

View file

@ -97,6 +97,22 @@ return {
}) })
end, end,
}, },
-- Add linting
{
"mfussenegger/nvim-lint",
optional = true,
dependencies = {
{
"mason-org/mason.nvim",
opts = { ensure_installed = { "golangci-lint" } },
},
},
opts = {
linters_by_ft = {
go = { "golangcilint" },
},
},
},
{ {
"stevearc/conform.nvim", "stevearc/conform.nvim",
optional = true, optional = true,

View file

@ -14,17 +14,40 @@ return {
{ {
"mrcjkb/haskell-tools.nvim", "mrcjkb/haskell-tools.nvim",
version = "^3", version = false,
ft = { "haskell", "lhaskell", "cabal", "cabalproject" }, ft = { "haskell", "lhaskell", "cabal", "cabalproject" },
dependencies = { keys = {
{ "nvim-telescope/telescope.nvim", optional = true }, {
"<localleader>e",
"<cmd>HlsEvalAll<cr>",
ft = "haskell",
desc = "Evaluate All",
}, },
config = function() {
local ok, telescope = pcall(require, "telescope") "<localleader>h",
if ok then function()
telescope.load_extension("ht") require("haskell-tools").hoogle.hoogle_signature()
end
end, end,
ft = "haskell",
desc = "Hoogle Signature",
},
{
"<localleader>r",
function()
require("haskell-tools").repl.toggle()
end,
ft = "haskell",
desc = "REPL (Package)",
},
{
"<localleader>R",
function()
require("haskell-tools").repl.toggle(vim.api.nvim_buf_get_name(0))
end,
ft = "haskell",
desc = "REPL (Buffer)",
},
},
}, },
{ {
@ -66,18 +89,49 @@ return {
end, end,
}, },
{
"nvim-telescope/telescope.nvim",
optional = true,
specs = {
{ {
"luc-tielen/telescope_hoogle", "luc-tielen/telescope_hoogle",
ft = { "haskell", "lhaskell", "cabal", "cabalproject" }, ft = { "haskell", "lhaskell", "cabal", "cabalproject" },
dependencies = { opts = function()
{ "nvim-telescope/telescope.nvim", optional = true }, LazyVim.on_load("telescope.nvim", function()
}, require("telescope").load_extension("ht")
config = function() end)
local ok, telescope = pcall(require, "telescope")
if ok then
telescope.load_extension("hoogle")
end
end, end,
keys = {
{
"<localleader>H",
"<cmd>Telescope hoogle<cr>",
ft = "haskell",
desc = "Hoogle",
},
},
},
},
},
{
"stevearc/conform.nvim",
optional = true,
opts = {
formatters_by_ft = {
haskell = { "fourmolu" },
cabal = { "cabal_fmt" },
},
},
},
{
"mfussenegger/nvim-lint",
optional = true,
opts = {
linters_by_ft = {
haskell = { "hlint" },
},
},
}, },
-- Make sure lspconfig doesn't start hls, -- Make sure lspconfig doesn't start hls,

View file

@ -6,7 +6,8 @@ return {
}) })
end, end,
{ "towolf/vim-helm", ft = "helm" }, { "qvalentin/helm-ls.nvim", ft = "helm" },
{ {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
opts = { ensure_installed = { "helm" } }, opts = { ensure_installed = { "helm" } },
@ -18,17 +19,6 @@ return {
servers = { servers = {
helm_ls = {}, helm_ls = {},
}, },
setup = {
yamlls = function()
LazyVim.lsp.on_attach(function(client, buffer)
if vim.bo[buffer].filetype == "helm" then
vim.schedule(function()
vim.cmd("LspStop ++force yamlls")
end)
end
end, "yamlls")
end,
},
}, },
}, },
} }

View file

@ -91,7 +91,9 @@ return {
table.insert(cmd, string.format("--jvm-arg=-javaagent:%s", lombok_jar)) table.insert(cmd, string.format("--jvm-arg=-javaagent:%s", lombok_jar))
end end
return { return {
root_dir = require("lspconfig.util").root_pattern(vim.lsp.config.jdtls.root_markers), root_dir = function(path)
return vim.fs.root(path, vim.lsp.config.jdtls.root_markers)
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)
@ -148,19 +150,10 @@ return {
if LazyVim.has("mason.nvim") then if LazyVim.has("mason.nvim") then
local mason_registry = require("mason-registry") local mason_registry = require("mason-registry")
if opts.dap and LazyVim.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then 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)
vim.fn.expand("$MASON/share/java-debug-adapter/com.microsoft.java.debug.plugin-*.jar"),
}
-- java-test also depends on java-debug-adapter. -- java-test also depends on java-debug-adapter.
if opts.test and mason_registry.is_installed("java-test") then if opts.test and mason_registry.is_installed("java-test") then
vim.list_extend(jar_patterns, { vim.list_extend(bundles, vim.fn.glob("$MASON/share/java-test/*.jar", false, true))
vim.fn.expand("$MASON/share/java-test/*.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 end
@ -176,7 +169,9 @@ return {
}, },
settings = opts.settings, settings = opts.settings,
-- enable CMP capabilities -- enable CMP capabilities
capabilities = LazyVim.has("cmp-nvim-lsp") and require("cmp_nvim_lsp").default_capabilities() or nil, capabilities = LazyVim.has("blink.cmp") and require("blink.cmp").get_lsp_capabilities() or LazyVim.has(
"cmp-nvim-lsp"
) and require("cmp_nvim_lsp").default_capabilities() or nil,
}, opts.jdtls) }, opts.jdtls)
-- Existing server will be reused if the root_dir matches. -- Existing server will be reused if the root_dir matches.
@ -214,7 +209,7 @@ return {
}) })
wk.add({ wk.add({
{ {
mode = "v", mode = "x",
buffer = args.buf, buffer = args.buf,
{ "<leader>cx", group = "extract" }, { "<leader>cx", group = "extract" },
{ {

View file

@ -0,0 +1,66 @@
return {
recommended = function()
return LazyVim.extras.wants({
ft = { "julia" },
root = { "Project.toml" },
})
end,
{
"nvim-treesitter/nvim-treesitter",
opts = { ensure_installed = { "julia" } },
},
{
"neovim/nvim-lspconfig",
opts = {
servers = {
julials = {
settings = {
-- use the same default settings as the Julia VS Code extension
julia = {
completionmode = "qualify",
lint = { missingrefs = "none" },
},
},
},
},
},
},
-- cmp integration
{
"hrsh7th/nvim-cmp",
optional = true,
dependencies = { "kdheepak/cmp-latex-symbols" },
opts = function(_, opts)
table.insert(opts.sources, {
name = "latex_symbols",
option = {
strategy = 0, -- mixed
},
})
end,
},
-- blink.cmp integration
{
"saghen/blink.cmp",
optional = true,
dependencies = { "kdheepak/cmp-latex-symbols", "saghen/blink.compat" },
opts = {
sources = {
compat = { "latex_symbols" },
providers = {
latex_symbols = {
kind = "LatexSymbols",
async = true,
opts = {
strategy = 0, -- mixed
},
},
},
},
},
},
}

View file

@ -108,7 +108,7 @@ return {
priority = 10, priority = 10,
}, },
-- Redirect Lean's stderr messages somehwere (to a buffer by default) -- Redirect Lean's stderr messages somewhere (to a buffer by default)
stderr = { stderr = {
enable = true, enable = true,
-- height of the window -- height of the window

View file

@ -113,17 +113,8 @@ return {
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,
}, },

View file

@ -24,4 +24,13 @@ return {
}, },
}, },
}, },
{
"mfussenegger/nvim-lint",
optional = true,
opts = {
linters_by_ft = {
nix = { "statix" },
},
},
},
} }

View file

@ -26,14 +26,21 @@ return {
"reason", "reason",
"dune", "dune",
}, },
root_dir = function(bufnr, on_dir) root_markers = {
local util = require("lspconfig.util") function(name)
local fname = vim.api.nvim_buf_get_name(bufnr) return name:match(".*%.opam$")
--stylua: ignore end,
on_dir(util.root_pattern("*.opam", "esy.json", "package.json", ".git", "dune-project", "dune-workspace", "*.ml")( fname)) "esy.json",
"package.json",
".git",
"dune-project",
"dune-workspace",
function(name)
return name:match(".*%.ml$")
end, end,
}, },
}, },
}, },
}, },
},
} }

View file

@ -93,4 +93,21 @@ return {
}, },
}, },
}, },
{
"nvim-neotest/neotest",
optional = true,
dependencies = {
"V13Axel/neotest-pest",
"olimorris/neotest-phpunit",
},
opts = {
adapters = {
"neotest-pest",
["neotest-phpunit"] = {
root_ignore_files = { "tests/Pest.php" },
},
},
},
},
} }

View file

@ -103,11 +103,7 @@ return {
{ "<leader>dPc", function() require('dap-python').test_class() end, desc = "Debug Class", ft = "python" }, { "<leader>dPc", function() require('dap-python').test_class() end, desc = "Debug Class", ft = "python" },
}, },
config = function() config = function()
if vim.fn.has("win32") == 1 then require("dap-python").setup("debugpy-adapter")
require("dap-python").setup(LazyVim.get_pkg_path("debugpy", "/venv/Scripts/pythonw.exe"))
else
require("dap-python").setup(LazyVim.get_pkg_path("debugpy", "/venv/bin/python"))
end
end, end,
}, },
}, },

View file

@ -17,12 +17,12 @@ return {
-- of files supported by R.nvim. This is an -- of files supported by R.nvim. This is an
-- opportunity to create mappings local to buffers. -- opportunity to create mappings local to buffers.
vim.keymap.set("n", "<Enter>", "<Plug>RDSendLine", { buffer = true }) vim.keymap.set("n", "<Enter>", "<Plug>RDSendLine", { buffer = true })
vim.keymap.set("v", "<Enter>", "<Plug>RSendSelection", { buffer = true }) vim.keymap.set("x", "<Enter>", "<Plug>RSendSelection", { buffer = true })
local wk = require("which-key") local wk = require("which-key")
wk.add({ wk.add({
buffer = true, buffer = true,
mode = { "n", "v" }, mode = { "n", "x" },
{ "<localleader>a", group = "all" }, { "<localleader>a", group = "all" },
{ "<localleader>b", group = "between marks" }, { "<localleader>b", group = "between marks" },
{ "<localleader>c", group = "chunks" }, { "<localleader>c", group = "chunks" },

View file

@ -85,16 +85,12 @@ return {
}, },
procMacro = { procMacro = {
enable = true, enable = true,
ignored = {
["async-trait"] = { "async_trait" },
["napi-derive"] = { "napi" },
["async-recursion"] = { "async_recursion" },
},
}, },
files = { files = {
excludeDirs = { exclude = {
".direnv", ".direnv",
".git", ".git",
".jj",
".github", ".github",
".gitlab", ".gitlab",
"bin", "bin",
@ -103,6 +99,8 @@ return {
"venv", "venv",
".venv", ".venv",
}, },
-- Avoid Roots Scanned hanging, see https://github.com/rust-lang/rust-analyzer/issues/12613#issuecomment-2096386344
watcher = "client",
}, },
}, },
}, },

View file

@ -11,14 +11,9 @@ return {
}, },
{ {
"scalameta/nvim-metals", "scalameta/nvim-metals",
ft = { "scala", "sbt" }, dependencies = {
config = function() end, "nvim-lua/plenary.nvim",
}, },
{
"neovim/nvim-lspconfig",
opts = {
servers = {
metals = {
keys = { keys = {
{ {
"<leader>me", "<leader>me",
@ -42,35 +37,44 @@ return {
desc = "Metals hover worksheet", desc = "Metals hover worksheet",
}, },
}, },
init_options = { ft = { "scala", "sbt", "java" },
statusBarProvider = "off", opts = function()
}, local metals_config = require("metals").bare_config()
settings = {
showImplicitArguments = true,
excludedPackages = { "akka.actor.typed.javadsl", "com.github.swagger.akka.javadsl" },
},
},
},
setup = {
metals = function(_, opts)
local metals = require("metals")
local metals_config = vim.tbl_deep_extend("force", metals.bare_config(), opts)
metals_config.on_attach = LazyVim.has("nvim-dap") and metals.setup_dap or nil
metals_config.init_options.statusBarProvider = "off"
metals_config.settings = {
verboseCompilation = true,
showImplicitArguments = true,
showImplicitConversionsAndClasses = true,
showInferredType = true,
superMethodLensesEnabled = true,
excludedPackages = {
"akka.actor.typed.javadsl",
"org.apache.pekko.actor.typed.javadsl",
"com.github.swagger.akka.javadsl",
},
testUserInterface = "Test Explorer",
}
metals_config.on_attach = function(client, bufnr)
-- your on_attach function
require("metals").setup_dap()
end
return metals_config
end,
config = function(self, metals_config)
local nvim_metals_group = vim.api.nvim_create_augroup("nvim-metals", { clear = true }) local nvim_metals_group = vim.api.nvim_create_augroup("nvim-metals", { clear = true })
vim.api.nvim_create_autocmd("FileType", { vim.api.nvim_create_autocmd("FileType", {
pattern = { "scala", "sbt" }, pattern = self.ft,
callback = function() callback = function()
metals.initialize_or_attach(metals_config) require("metals").initialize_or_attach(metals_config)
end, end,
group = nvim_metals_group, group = nvim_metals_group,
}) })
return true
end, end,
}, },
},
},
{ {
"mfussenegger/nvim-dap", "mfussenegger/nvim-dap",
optional = true, optional = true,

View file

@ -0,0 +1,43 @@
return {
recommended = function()
return LazyVim.extras.wants({
ft = "solidity",
root = {
"foundry.toml",
"hardhat.config.js",
"hardhat.config.ts",
},
})
end,
-- Add Solidity & related to treesitter
{
"nvim-treesitter/nvim-treesitter",
opts = { ensure_installed = { "solidity" } },
},
-- Correctly setup lspconfig for Solidity
{
"neovim/nvim-lspconfig",
opts = {
servers = {
solidity_ls = {},
},
},
},
-- Formatter for Solidity
{
"stevearc/conform.nvim",
optional = true,
opts = {
formatters_by_ft = {
solidity = { "forge_fmt" },
},
formatters = {
forge_fmt = {
command = "forge",
args = { "fmt" },
},
},
},
},
}

View file

@ -28,6 +28,11 @@ end
local sql_ft = { "sql", "mysql", "plsql" } local sql_ft = { "sql", "mysql", "plsql" }
-- disable nvim default `sql_completion` plugin to be compatible with blink.cmp's omni
-- while still showing some keywords from the syntax autocomplete sources
vim.g.omni_sql_default_compl_type = "syntax"
vim.g.loaded_sql_completion = true
return { return {
recommended = function() recommended = function()
return LazyVim.extras.wants({ return LazyVim.extras.wants({

View file

@ -24,6 +24,20 @@ return {
filetypes_include = {}, filetypes_include = {},
-- to fully override the default_config, change the below -- to fully override the default_config, change the below
-- filetypes = {} -- filetypes = {}
-- additional settings for the server, e.g:
-- tailwindCSS = { includeLanguages = { someLang = "html" } }
-- can be addeded to the settings table and will be merged with
-- this defaults for Phoenix projects
settings = {
tailwindCSS = {
includeLanguages = {
elixir = "html-eex",
eelixir = "html-eex",
heex = "html-eex",
},
},
},
}, },
}, },
setup = { setup = {
@ -39,17 +53,6 @@ return {
return not vim.tbl_contains(opts.filetypes_exclude or {}, ft) return not vim.tbl_contains(opts.filetypes_exclude or {}, ft)
end, opts.filetypes) end, opts.filetypes)
-- Additional settings for Phoenix projects
opts.settings = {
tailwindCSS = {
includeLanguages = {
elixir = "html-eex",
eelixir = "html-eex",
heex = "html-eex",
},
},
}
-- Add additional filetypes -- Add additional filetypes
vim.list_extend(opts.filetypes, opts.filetypes_include or {}) vim.list_extend(opts.filetypes, opts.filetypes_include or {})
end, end,

View file

@ -12,7 +12,7 @@ return {
opts = function(_, opts) opts = function(_, opts)
opts.highlight = opts.highlight or {} opts.highlight = opts.highlight or {}
if type(opts.ensure_installed) == "table" then if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, { "bibtex" }) vim.list_extend(opts.ensure_installed, { "bibtex", "latex" })
end end
if type(opts.highlight.disable) == "table" then if type(opts.highlight.disable) == "table" then
vim.list_extend(opts.highlight.disable, { "latex" }) vim.list_extend(opts.highlight.disable, { "latex" })

View file

@ -0,0 +1,58 @@
return {
recommended = function()
return LazyVim.extras.wants({
ft = "twig",
})
end,
{
"nvim-treesitter/nvim-treesitter",
opts = { ensure_installed = { "twig" } },
},
{
"mason-org/mason.nvim",
opts = {
ensure_installed = {
"twigcs",
"twig-cs-fixer",
},
},
},
{
"neovim/nvim-lspconfig",
opts = {
servers = {
twiggy_language_server = {
enabled = true,
},
},
},
},
{
"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.diagnostics.twigcs)
-- Twig-CS-Fixer builtin not available in none-ls
end,
},
{
"mfussenegger/nvim-lint",
optional = true,
opts = {
linters_by_ft = {
twig = { "twigcs" },
},
},
},
{
"stevearc/conform.nvim",
optional = true,
opts = {
formatters_by_ft = {
twig = { "twig-cs-fixer" },
},
},
},
}

View file

@ -86,7 +86,8 @@ return {
{ {
"gD", "gD",
function() function()
local params = vim.lsp.util.make_position_params() local win = vim.api.nvim_get_current_win()
local params = vim.lsp.util.make_position_params(win, "utf-16")
LazyVim.lsp.execute({ LazyVim.lsp.execute({
command = "typescript.goToSourceDefinition", command = "typescript.goToSourceDefinition",
arguments = { params.textDocument.uri, params.position }, arguments = { params.textDocument.uri, params.position },
@ -148,6 +149,28 @@ 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)
-- Auto-organize imports and remove unused on save -- Auto-organize imports and remove unused on save
if client.name == "vtsls" then if client.name == "vtsls" then
@ -247,27 +270,29 @@ return {
}, },
opts = function() opts = function()
local dap = require("dap") local dap = require("dap")
if not dap.adapters["pwa-node"] then
require("dap").adapters["pwa-node"] = { for _, adapterType in ipairs({ "node", "chrome", "msedge" }) do
local pwaType = "pwa-" .. adapterType
if not dap.adapters[pwaType] then
dap.adapters[pwaType] = {
type = "server", type = "server",
host = "localhost", host = "localhost",
port = "${port}", port = "${port}",
executable = { executable = {
command = "node", command = "js-debug-adapter",
-- 💀 Make sure to update this path to point to your installation args = { "${port}" },
args = {
LazyVim.get_pkg_path("js-debug-adapter", "/js-debug/src/dapDebugServer.js"),
"${port}",
},
}, },
} }
end end
if not dap.adapters["node"] then
dap.adapters["node"] = function(cb, config) -- Define adapters without the "pwa-" prefix for VSCode compatibility
if config.type == "node" then if not dap.adapters[adapterType] then
config.type = "pwa-node" dap.adapters[adapterType] = function(cb, config)
end local nativeAdapter = dap.adapters[pwaType]
local nativeAdapter = dap.adapters["pwa-node"]
config.type = pwaType
if type(nativeAdapter) == "function" then if type(nativeAdapter) == "function" then
nativeAdapter(cb, config) nativeAdapter(cb, config)
else else
@ -275,6 +300,7 @@ return {
end end
end end
end end
end
local js_filetypes = { "typescript", "javascript", "typescriptreact", "javascriptreact" } local js_filetypes = { "typescript", "javascript", "typescriptreact", "javascriptreact" }
@ -284,6 +310,10 @@ return {
for _, language in ipairs(js_filetypes) do for _, language in ipairs(js_filetypes) do
if not dap.configurations[language] then if not dap.configurations[language] then
local runtimeExecutable = nil
if language:find("typescript") then
runtimeExecutable = vim.fn.executable("tsx") == 1 and "tsx" or "ts-node"
end
dap.configurations[language] = { dap.configurations[language] = {
{ {
type = "pwa-node", type = "pwa-node",
@ -291,6 +321,16 @@ return {
name = "Launch file", name = "Launch file",
program = "${file}", program = "${file}",
cwd = "${workspaceFolder}", cwd = "${workspaceFolder}",
sourceMaps = true,
runtimeExecutable = runtimeExecutable,
skipFiles = {
"<node_internals>/**",
"node_modules/**",
},
resolveSourceMapLocations = {
"${workspaceFolder}/**",
"!**/node_modules/**",
},
}, },
{ {
type = "pwa-node", type = "pwa-node",
@ -298,6 +338,16 @@ return {
name = "Attach", name = "Attach",
processId = require("dap.utils").pick_process, processId = require("dap.utils").pick_process,
cwd = "${workspaceFolder}", cwd = "${workspaceFolder}",
sourceMaps = true,
runtimeExecutable = runtimeExecutable,
skipFiles = {
"<node_internals>/**",
"node_modules/**",
},
resolveSourceMapLocations = {
"${workspaceFolder}/**",
"!**/node_modules/**",
},
}, },
} }
end end
@ -305,6 +355,15 @@ return {
end, end,
}, },
{
"jay-babu/mason-nvim-dap.nvim",
optional = true,
opts = {
-- chrome adapter is deprecated, use js-debug-adapter instead
automatic_installation = { exclude = { "chrome" } },
},
},
-- Filetype icons -- Filetype icons
{ {
"nvim-mini/mini.icons", "nvim-mini/mini.icons",

View file

@ -0,0 +1,80 @@
return {
recommended = function()
return LazyVim.extras.wants({
ft = { "typst" },
})
end,
{
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = { "typst" },
},
},
{
"neovim/nvim-lspconfig",
opts = {
servers = {
tinymist = {
keys = {
{
"<leader>cP",
function()
local buf_name = vim.api.nvim_buf_get_name(0)
local file_name = vim.fn.fnamemodify(buf_name, ":t")
LazyVim.lsp.execute({
command = "tinymist.pinMain",
arguments = { buf_name },
})
LazyVim.info("Tinymist: Pinned " .. file_name)
end,
desc = "Pin main file",
},
},
single_file_support = true, -- Fixes LSP attachment in non-Git directories
settings = {
formatterMode = "typstyle",
},
},
},
},
},
{
"stevearc/conform.nvim",
optional = true,
opts = {
formatters_by_ft = {
typst = { "typstyle", lsp_format = "prefer" },
},
},
},
{
"chomosuke/typst-preview.nvim",
cmd = { "TypstPreview", "TypstPreviewToggle", "TypstPreviewUpdate" },
keys = {
{
"<leader>cp",
ft = "typst",
"<cmd>TypstPreviewToggle<cr>",
desc = "Toggle Typst Preview",
},
},
opts = {
dependencies_bin = {
tinymist = "tinymist",
},
},
},
{
"folke/ts-comments.nvim",
opts = {
lang = {
typst = { "// %s", "/* %s */" },
},
},
},
}

View file

@ -106,6 +106,7 @@ return {
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{"<leader>t", "", desc = "+test"}, {"<leader>t", "", desc = "+test"},
{ "<leader>ta", function() require("neotest").run.attach() end, desc = "Attach to Test (Neotest)" },
{ "<leader>tt", function() require("neotest").run.run(vim.fn.expand("%")) end, desc = "Run File (Neotest)" }, { "<leader>tt", function() require("neotest").run.run(vim.fn.expand("%")) end, desc = "Run File (Neotest)" },
{ "<leader>tT", function() require("neotest").run.run(vim.uv.cwd()) end, desc = "Run All Test Files (Neotest)" }, { "<leader>tT", function() require("neotest").run.run(vim.uv.cwd()) end, desc = "Run All Test Files (Neotest)" },
{ "<leader>tr", function() require("neotest").run.run() end, desc = "Run Nearest (Neotest)" }, { "<leader>tr", function() require("neotest").run.run() end, desc = "Run Nearest (Neotest)" },

View file

@ -32,6 +32,9 @@ return {
end, end,
}) })
-- schedule setting the mapping to override the default mapping from `keymaps.lua`
-- seems `keymaps.lua` is the last event to execute on `VeryLazy` and it overwrites it
vim.schedule(function()
Snacks.toggle({ Snacks.toggle({
name = "Mini Animate", name = "Mini Animate",
get = function() get = function()
@ -41,6 +44,7 @@ return {
vim.g.minianimate_disable = not state vim.g.minianimate_disable = not state
end, end,
}):map("<leader>ua") }):map("<leader>ua")
end)
local animate = require("mini.animate") local animate = require("mini.animate")
return vim.tbl_deep_extend("force", opts, { return vim.tbl_deep_extend("force", opts, {

View file

@ -23,6 +23,7 @@ return {
"mason", "mason",
"neo-tree", "neo-tree",
"notify", "notify",
"sidekick_terminal",
"snacks_dashboard", "snacks_dashboard",
"snacks_notif", "snacks_notif",
"snacks_terminal", "snacks_terminal",
@ -44,7 +45,7 @@ return {
end, end,
}, },
-- disable inent-blankline scope when mini-indentscope is enabled -- disable indent-blankline scope when mini-indentscope is enabled
{ {
"lukas-reineke/indent-blankline.nvim", "lukas-reineke/indent-blankline.nvim",
optional = true, optional = true,

View file

@ -8,7 +8,7 @@ local pick_chezmoi = function()
fzf_lua.actions.vimcmd_entry("ChezmoiEdit", selected, { cwd = os.getenv("HOME") }) fzf_lua.actions.vimcmd_entry("ChezmoiEdit", selected, { cwd = os.getenv("HOME") })
end, end,
} }
fzf_lua.files({ cmd = "chezmoi managed --include=files,symlinks", actions = actions }) fzf_lua.files({ cmd = "chezmoi managed --include=files,symlinks", actions = actions, hidden = false })
elseif LazyVim.pick.picker.name == "snacks" then elseif LazyVim.pick.picker.name == "snacks" then
local results = require("chezmoi.commands").list({ local results = require("chezmoi.commands").list({
args = { args = {

View file

@ -0,0 +1,51 @@
return {
-- depends on the git extra for highlighting and auto-completion of github issues/prs
{ import = "lazyvim.plugins.extras.lang.git" },
{ "ldelossa/litee.nvim", lazy = true },
-- gh.nvim
{
"ldelossa/gh.nvim",
opts = {},
config = function(_, opts)
require("litee.lib").setup()
require("litee.gh").setup(opts)
end,
keys = {
{ "<leader>G", "", desc = "+Github" },
{ "<leader>Gc", "", desc = "+Commits" },
{ "<leader>Gcc", "<cmd>GHCloseCommit<cr>", desc = "Close" },
{ "<leader>Gce", "<cmd>GHExpandCommit<cr>", desc = "Expand" },
{ "<leader>Gco", "<cmd>GHOpenToCommit<cr>", desc = "Open To" },
{ "<leader>Gcp", "<cmd>GHPopOutCommit<cr>", desc = "Pop Out" },
{ "<leader>Gcz", "<cmd>GHCollapseCommit<cr>", desc = "Collapse" },
{ "<leader>Gi", "", desc = "+Issues" },
{ "<leader>Gip", "<cmd>GHPreviewIssue<cr>", desc = "Preview" },
{ "<leader>Gio", "<cmd>GHOpenIssue<cr>", desc = "Open" },
{ "<leader>Gl", "", desc = "+Litee" },
{ "<leader>Glt", "<cmd>LTPanel<cr>", desc = "Toggle Panel" },
{ "<leader>Gp", "", desc = "+Pull Request" },
{ "<leader>Gpc", "<cmd>GHClosePR<cr>", desc = "Close" },
{ "<leader>Gpd", "<cmd>GHPRDetails<cr>", desc = "Details" },
{ "<leader>Gpe", "<cmd>GHExpandPR<cr>", desc = "Expand" },
{ "<leader>Gpo", "<cmd>GHOpenPR<cr>", desc = "Open" },
{ "<leader>Gpp", "<cmd>GHPopOutPR<cr>", desc = "PopOut" },
{ "<leader>Gpr", "<cmd>GHRefreshPR<cr>", desc = "Refresh" },
{ "<leader>Gpt", "<cmd>GHOpenToPR<cr>", desc = "Open To" },
{ "<leader>Gpz", "<cmd>GHCollapsePR<cr>", desc = "Collapse" },
{ "<leader>Gr", "", desc = "+Review" },
{ "<leader>Grb", "<cmd>GHStartReview<cr>", desc = "Begin" },
{ "<leader>Grc", "<cmd>GHCloseReview<cr>", desc = "Close" },
{ "<leader>Grd", "<cmd>GHDeleteReview<cr>", desc = "Delete" },
{ "<leader>Gre", "<cmd>GHExpandReview<cr>", desc = "Expand" },
{ "<leader>Grs", "<cmd>GHSubmitReview<cr>", desc = "Submit" },
{ "<leader>Grz", "<cmd>GHCollapseReview<cr>", desc = "Collapse" },
{ "<leader>Gt", "", desc = "+Threads" },
{ "<leader>Gtc", "<cmd>GHCreateThread<cr>", desc = "Create" },
{ "<leader>Gtn", "<cmd>GHNextThread<cr>", desc = "Next" },
{ "<leader>Gtt", "<cmd>GHToggleThread<cr>", desc = "Toggle" },
},
},
}

View file

@ -126,7 +126,7 @@ return {
"goolord/alpha-nvim", "goolord/alpha-nvim",
optional = true, optional = true,
opts = function(_, dashboard) opts = function(_, dashboard)
local button = dashboard.button("p", "" .. " Projects", pick) local button = dashboard.button("P", "" .. " Projects (util.project)", pick)
button.opts.hl = "AlphaButtons" button.opts.hl = "AlphaButtons"
button.opts.hl_shortcut = "AlphaShortcut" button.opts.hl_shortcut = "AlphaShortcut"
table.insert(dashboard.section.buttons.val, 4, button) table.insert(dashboard.section.buttons.val, 4, button)
@ -139,7 +139,7 @@ return {
opts = function(_, opts) opts = function(_, opts)
local items = { local items = {
{ {
name = "Projects", name = "Projects (util.project)",
action = pick, action = pick,
section = string.rep(" ", 22) .. "Telescope", section = string.rep(" ", 22) .. "Telescope",
}, },
@ -157,9 +157,9 @@ return {
end end
local projects = { local projects = {
action = pick, action = pick,
desc = " Projects", desc = " Projects (util.project)",
icon = "", icon = "",
key = "p", key = "P",
} }
projects.desc = projects.desc .. string.rep(" ", 43 - #projects.desc) projects.desc = projects.desc .. string.rep(" ", 43 - #projects.desc)
@ -175,9 +175,9 @@ return {
opts = function(_, opts) opts = function(_, opts)
table.insert(opts.dashboard.preset.keys, 3, { table.insert(opts.dashboard.preset.keys, 3, {
action = pick, action = pick,
desc = "Projects", desc = "Projects (util.project)",
icon = "", icon = "",
key = "p", key = "P",
}) })
end, end,
}, },

View file

@ -8,10 +8,11 @@ return {
"mistweaverco/kulala.nvim", "mistweaverco/kulala.nvim",
ft = "http", ft = "http",
keys = { keys = {
{ "<leader>R", "", desc = "+Rest", ft = "http" }, { "<leader>R", "", desc = "+Rest" },
{ "<leader>Rb", "<cmd>lua require('kulala').scratchpad()<cr>", desc = "Open scratchpad", ft = "http" }, { "<leader>Rb", "<cmd>lua require('kulala').scratchpad()<cr>", desc = "Open scratchpad" },
{ "<leader>Rc", "<cmd>lua require('kulala').copy()<cr>", desc = "Copy as cURL", ft = "http" }, { "<leader>Rc", "<cmd>lua require('kulala').copy()<cr>", desc = "Copy as cURL", ft = "http" },
{ "<leader>RC", "<cmd>lua require('kulala').from_curl()<cr>", desc = "Paste from curl", ft = "http" }, { "<leader>RC", "<cmd>lua require('kulala').from_curl()<cr>", desc = "Paste from curl", ft = "http" },
{ "<leader>Re", "<cmd>lua require('kulala').set_selected_env()<cr>", desc = "Set environment", ft = "http" },
{ {
"<leader>Rg", "<leader>Rg",
"<cmd>lua require('kulala').download_graphql_schema()<cr>", "<cmd>lua require('kulala').download_graphql_schema()<cr>",
@ -22,7 +23,7 @@ return {
{ "<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>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>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>Rr", "<cmd>lua require('kulala').replay()<cr>", desc = "Replay the last request" },
{ "<leader>Rs", "<cmd>lua require('kulala').run()<cr>", desc = "Send the 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>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" }, { "<leader>Rt", "<cmd>lua require('kulala').toggle_view()<cr>", desc = "Toggle headers/body", ft = "http" },

View file

@ -23,6 +23,7 @@ local enabled = {
} }
local Config = require("lazy.core.config") local Config = require("lazy.core.config")
local vscode = require("vscode")
Config.options.checker.enabled = false Config.options.checker.enabled = false
Config.options.change_detection.enabled = false Config.options.change_detection.enabled = false
Config.options.defaults.cond = function(plugin) Config.options.defaults.cond = function(plugin)
@ -36,23 +37,30 @@ vim.api.nvim_create_autocmd("User", {
callback = function() callback = function()
-- VSCode-specific keymaps for search and navigation -- 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>/", function()
vim.keymap.set("n", "<leader>ss", [[<cmd>lua require('vscode').action('workbench.action.gotoSymbol')<cr>]]) vscode.call("workbench.action.findInFiles")
end)
vim.keymap.set("n", "<leader>ss", function()
vscode.call("workbench.action.gotoSymbol")
end)
-- Keep undo/redo lists in sync with VsCode -- Toggle VS Code integrated terminal
vim.keymap.set("n", "u", "<Cmd>call VSCodeNotify('undo')<CR>") for _, lhs in ipairs({ "<leader>ft", "<leader>fT", "<c-/>" }) do
vim.keymap.set("n", "<C-r>", "<Cmd>call VSCodeNotify('redo')<CR>") vim.keymap.set("n", lhs, function()
vscode.call("workbench.action.terminal.toggleTerminal")
end)
end
-- Navigate VSCode tabs like lazyvim buffers -- Navigate VSCode tabs like lazyvim buffers
vim.keymap.set("n", "<S-h>", "<Cmd>call VSCodeNotify('workbench.action.previousEditor')<CR>") vim.keymap.set("n", "<S-h>", function()
vim.keymap.set("n", "<S-l>", "<Cmd>call VSCodeNotify('workbench.action.nextEditor')<CR>") vscode.call("workbench.action.previousEditor")
end)
vim.keymap.set("n", "<S-l>", function()
vscode.call("workbench.action.nextEditor")
end)
end, end,
}) })
function LazyVim.terminal()
require("vscode").action("workbench.action.terminal.toggleTerminal")
end
return { return {
{ {
"snacks.nvim", "snacks.nvim",

View file

@ -29,7 +29,7 @@ return {
function() function()
require("conform").format({ formatters = { "injected" }, timeout_ms = 3000 }) require("conform").format({ formatters = { "injected" }, timeout_ms = 3000 })
end, end,
mode = { "n", "v" }, mode = { "n", "x" },
desc = "Format Injected Langs", desc = "Format Injected Langs",
}, },
}, },

View file

@ -7,6 +7,14 @@ if vim.fn.has("nvim-0.11.2") == 0 then
vim.fn.getchar() vim.fn.getchar()
vim.cmd([[quit]]) vim.cmd([[quit]])
return {} return {}
elseif not vim.lsp.is_enabled then
vim.schedule(function()
LazyVim.warn({
"You're using an **old** `nightly` version of **Neovim**",
"Please update to a recent `nightly`,",
"or a stable version (`>= 0.11.2`).",
})
end)
end end
require("lazyvim.config").init() require("lazyvim.config").init()

View file

@ -2,7 +2,7 @@ return {
-- lspconfig -- lspconfig
{ {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
event = { "BufReadPre", "BufNewFile", "BufWritePre" }, event = "LazyFile",
dependencies = { dependencies = {
"mason.nvim", "mason.nvim",
{ "mason-org/mason-lspconfig.nvim", config = function() end }, { "mason-org/mason-lspconfig.nvim", config = function() end },
@ -68,8 +68,10 @@ return {
timeout_ms = nil, timeout_ms = nil,
}, },
-- LSP Server Settings -- LSP Server Settings
---@type table<string, vim.lsp.Config|{mason?:boolean, enabled?:boolean}|boolean> ---@alias lazyvim.lsp.Config vim.lsp.Config|{mason?:boolean, enabled?:boolean}
---@type table<string, lazyvim.lsp.Config|boolean>
servers = { servers = {
stylua = { enabled = false },
lua_ls = { lua_ls = {
-- mason = false, -- set to false if you don't want this server to be installed with mason -- mason = false, -- set to false if you don't want this server to be installed with mason
-- Use this to add any additional keymaps -- Use this to add any additional keymaps
@ -118,7 +120,7 @@ return {
return ret return ret
end, end,
---@param opts PluginLspOpts ---@param opts PluginLspOpts
config = function(_, opts) config = vim.schedule_wrap(function(_, opts)
-- setup autoformat -- setup autoformat
LazyVim.format.register(LazyVim.lsp.formatter()) LazyVim.format.register(LazyVim.lsp.formatter())
@ -146,9 +148,9 @@ return {
-- folds -- folds
if opts.folds.enabled then if opts.folds.enabled then
LazyVim.lsp.on_supports_method("textDocument/foldingRange", function(client, buffer) LazyVim.lsp.on_supports_method("textDocument/foldingRange", function(client, buffer)
local win = vim.api.nvim_get_current_win() if LazyVim.set_default("foldmethod", "expr") then
vim.wo[win][0].foldexpr = "v:lua.vim.lsp.foldexpr()" LazyVim.set_default("foldexpr", "v:lua.vim.lsp.foldexpr()")
vim.wo[win][0].foldmethod = "expr" end
end) end)
end end
@ -186,77 +188,39 @@ return {
local mason_all = have_mason local mason_all = have_mason
and vim.tbl_keys(require("mason-lspconfig.mappings").get_mason_map().lspconfig_to_package) and vim.tbl_keys(require("mason-lspconfig.mappings").get_mason_map().lspconfig_to_package)
or {} --[[ @as string[] ]] or {} --[[ @as string[] ]]
local mason_exclude = {} ---@type string[]
local exclude_automatic_enable = {} ---@type string[] ---@return boolean? exclude automatic setup
local function configure(server) local function configure(server)
local server_opts = opts.servers[server] or {} local sopts = opts.servers[server]
sopts = sopts == true and {} or (not sopts) and { enabled = false } or sopts --[[@as lazyvim.lsp.Config]]
if sopts.enabled == false then
mason_exclude[#mason_exclude + 1] = server
return
end
local use_mason = sopts.mason ~= false and vim.tbl_contains(mason_all, server)
local setup = opts.setup[server] or opts.setup["*"] local setup = opts.setup[server] or opts.setup["*"]
if setup and setup(server, server_opts) then if setup and setup(server, sopts) then
return true -- lsp will be setup by the setup function mason_exclude[#mason_exclude + 1] = server
end else
vim.lsp.config(server, sopts) -- configure the server
vim.lsp.config(server, server_opts) if not use_mason then
-- manually enable if mason=false or if this is a server that cannot be installed with mason-lspconfig
if server_opts.mason == false or not vim.tbl_contains(mason_all, server) then
vim.lsp.enable(server) vim.lsp.enable(server)
return true
end
return false
end
local ensure_installed = {} ---@type string[]
for server, server_opts in pairs(opts.servers) do
server_opts = server_opts == true and {} or server_opts or false
if server_opts and server_opts.enabled ~= false then
-- run manual setup if mason=false or if this is a server that cannot be installed with mason-lspconfig
if configure(server) then
exclude_automatic_enable[#exclude_automatic_enable + 1] = server
else
ensure_installed[#ensure_installed + 1] = server
end
else
exclude_automatic_enable[#exclude_automatic_enable + 1] = server
end end
end end
return use_mason
end
local install = vim.tbl_filter(configure, vim.tbl_keys(opts.servers))
if have_mason then if have_mason then
require("mason-lspconfig").setup({ require("mason-lspconfig").setup({
ensure_installed = vim.tbl_deep_extend( ensure_installed = vim.list_extend(install, LazyVim.opts("mason-lspconfig.nvim").ensure_installed or {}),
"force", automatic_enable = { exclude = mason_exclude },
ensure_installed,
LazyVim.opts("mason-lspconfig.nvim").ensure_installed or {}
),
automatic_enable = {
exclude = exclude_automatic_enable,
},
}) })
end end
end),
if vim.lsp.is_enabled("denols") and vim.lsp.is_enabled("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
end,
}, },
-- cmdline tools and lsp servers -- cmdline tools and lsp servers

View file

@ -22,8 +22,8 @@ function M.get()
{ "K", function() return vim.lsp.buf.hover() end, desc = "Hover" }, { "K", function() return vim.lsp.buf.hover() end, desc = "Hover" },
{ "gK", function() return vim.lsp.buf.signature_help() end, desc = "Signature Help", has = "signatureHelp" }, { "gK", function() return vim.lsp.buf.signature_help() end, desc = "Signature Help", has = "signatureHelp" },
{ "<c-k>", function() return vim.lsp.buf.signature_help() end, mode = "i", desc = "Signature Help", has = "signatureHelp" }, { "<c-k>", function() return vim.lsp.buf.signature_help() end, mode = "i", desc = "Signature Help", has = "signatureHelp" },
{ "<leader>ca", vim.lsp.buf.code_action, desc = "Code Action", mode = { "n", "v" }, has = "codeAction" }, { "<leader>ca", vim.lsp.buf.code_action, desc = "Code Action", mode = { "n", "x" }, has = "codeAction" },
{ "<leader>cc", vim.lsp.codelens.run, desc = "Run Codelens", mode = { "n", "v" }, has = "codeLens" }, { "<leader>cc", vim.lsp.codelens.run, desc = "Run Codelens", mode = { "n", "x" }, has = "codeLens" },
{ "<leader>cC", vim.lsp.codelens.refresh, desc = "Refresh & Display Codelens", mode = { "n" }, has = "codeLens" }, { "<leader>cC", vim.lsp.codelens.refresh, desc = "Refresh & Display Codelens", mode = { "n" }, has = "codeLens" },
{ "<leader>cR", function() Snacks.rename.rename_file() end, desc = "Rename File", mode ={"n"}, has = { "workspace/didRenameFiles", "workspace/willRenameFiles" } }, { "<leader>cR", function() Snacks.rename.rename_file() end, desc = "Rename File", mode ={"n"}, has = { "workspace/didRenameFiles", "workspace/willRenameFiles" } },
{ "<leader>cr", vim.lsp.buf.rename, desc = "Rename", has = "rename" }, { "<leader>cr", vim.lsp.buf.rename, desc = "Rename", has = "rename" },

View file

@ -13,20 +13,22 @@ return {
LazyVim.error("Please restart Neovim and run `:TSUpdate` to use the `nvim-treesitter` **main** branch.") LazyVim.error("Please restart Neovim and run `:TSUpdate` to use the `nvim-treesitter` **main** branch.")
return return
end end
LazyVim.treesitter.ensure_treesitter_cli(function() -- make sure we're using the latest treesitter util
package.loaded["lazyvim.util.treesitter"] = nil
LazyVim.treesitter.build(function()
TS.update(nil, { summary = true }) TS.update(nil, { summary = true })
end) end)
end, end,
lazy = vim.fn.argc(-1) == 0, -- load treesitter early when opening a file from the cmdline
event = { "LazyFile", "VeryLazy" }, event = { "LazyFile", "VeryLazy" },
cmd = { "TSUpdate", "TSInstall", "TSLog", "TSUninstall" }, cmd = { "TSUpdate", "TSInstall", "TSLog", "TSUninstall" },
opts_extend = { "ensure_installed" }, opts_extend = { "ensure_installed" },
---@alias lazyvim.TSFeat { enable?: boolean, disable?: string[] }
---@class lazyvim.TSConfig: TSConfig ---@class lazyvim.TSConfig: TSConfig
opts = { opts = {
-- LazyVim config for treesitter -- LazyVim config for treesitter
indent = { enable = true }, indent = { enable = true }, ---@type lazyvim.TSFeat
highlight = { enable = true }, highlight = { enable = true }, ---@type lazyvim.TSFeat
folds = { enable = true }, folds = { enable = true }, ---@type lazyvim.TSFeat
ensure_installed = { ensure_installed = {
"bash", "bash",
"c", "c",
@ -58,6 +60,21 @@ return {
config = function(_, opts) config = function(_, opts)
local TS = require("nvim-treesitter") local TS = require("nvim-treesitter")
setmetatable(require("nvim-treesitter.install"), {
__newindex = function(_, k)
if k == "compilers" then
vim.schedule(function()
LazyVim.error({
"Setting custom compilers for `nvim-treesitter` is no longer supported.",
"",
"For more info, see:",
"- [compilers](https://docs.rs/cc/latest/cc/#compile-time-requirements)",
})
end)
end
end,
})
-- some quick sanity checks -- some quick sanity checks
if not TS.get_installed then if not TS.get_installed then
return LazyVim.error("Please use `:Lazy` and update `nvim-treesitter`") return LazyVim.error("Please use `:Lazy` and update `nvim-treesitter`")
@ -74,7 +91,7 @@ return {
return not LazyVim.treesitter.have(lang) return not LazyVim.treesitter.have(lang)
end, opts.ensure_installed or {}) end, opts.ensure_installed or {})
if #install > 0 then if #install > 0 then
LazyVim.treesitter.ensure_treesitter_cli(function() LazyVim.treesitter.build(function()
TS.install(install, { summary = true }):await(function() TS.install(install, { summary = true }):await(function()
LazyVim.treesitter.get_installed(true) -- refresh the installed langs LazyVim.treesitter.get_installed(true) -- refresh the installed langs
end) end)
@ -84,24 +101,35 @@ return {
vim.api.nvim_create_autocmd("FileType", { vim.api.nvim_create_autocmd("FileType", {
group = vim.api.nvim_create_augroup("lazyvim_treesitter", { clear = true }), group = vim.api.nvim_create_augroup("lazyvim_treesitter", { clear = true }),
callback = function(ev) callback = function(ev)
if not LazyVim.treesitter.have(ev.match) then local ft, lang = ev.match, vim.treesitter.language.get_lang(ev.match)
if not LazyVim.treesitter.have(ft) then
return return
end end
---@param feat string
---@param query string
local function enabled(feat, query)
local f = opts[feat] or {} ---@type lazyvim.TSFeat
return f.enable ~= false
and not (type(f.disable) == "table" and vim.tbl_contains(f.disable, lang))
and LazyVim.treesitter.have(ft, query)
end
-- highlighting -- highlighting
if vim.tbl_get(opts, "highlight", "enable") ~= false then if enabled("highlight", "highlights") then
pcall(vim.treesitter.start) pcall(vim.treesitter.start, ev.buf)
end end
-- indents -- indents
if vim.tbl_get(opts, "indent", "enable") ~= false then if enabled("indent", "indents") then
vim.bo[ev.buf].indentexpr = "v:lua.LazyVim.treesitter.indentexpr()" LazyVim.set_default("indentexpr", "v:lua.LazyVim.treesitter.indentexpr()")
end end
-- folds -- folds
if vim.tbl_get(opts, "folds", "enable") ~= false then if enabled("folds", "folds") then
vim.wo.foldmethod = "expr" if LazyVim.set_default("foldmethod", "expr") then
vim.wo.foldexpr = "v:lua.LazyVim.treesitter.foldexpr()" LazyVim.set_default("foldexpr", "v:lua.LazyVim.treesitter.foldexpr()")
end
end end
end, end,
}) })
@ -112,38 +140,19 @@ return {
"nvim-treesitter/nvim-treesitter-textobjects", "nvim-treesitter/nvim-treesitter-textobjects",
branch = "main", branch = "main",
event = "VeryLazy", event = "VeryLazy",
opts = {}, opts = {
keys = function() move = {
local moves = { enable = true,
set_jumps = true, -- whether to set jumps in the jumplist
-- LazyVim extention to create buffer-local keymaps
keys = {
goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer", ["]a"] = "@parameter.inner" }, goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer", ["]a"] = "@parameter.inner" },
goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer", ["]A"] = "@parameter.inner" }, goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer", ["]A"] = "@parameter.inner" },
goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer", ["[a"] = "@parameter.inner" }, goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer", ["[a"] = "@parameter.inner" },
goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer", ["[A"] = "@parameter.inner" }, goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer", ["[A"] = "@parameter.inner" },
} },
local ret = {} ---@type LazyKeysSpec[] },
for method, keymaps in pairs(moves) do },
for key, query in pairs(keymaps) do
local desc = query:gsub("@", ""):gsub("%..*", "")
desc = desc:sub(1, 1):upper() .. desc:sub(2)
desc = (key:sub(1, 1) == "[" and "Prev " or "Next ") .. desc
desc = desc .. (key:sub(2, 2) == key:sub(2, 2):upper() and " End" or " Start")
ret[#ret + 1] = {
key,
function()
-- don't use treesitter if in diff mode and the key is one of the c/C keys
if vim.wo.diff and key:find("[cC]") then
return vim.cmd("normal! " .. key)
end
require("nvim-treesitter-textobjects.move")[method](query, "textobjects")
end,
desc = desc,
mode = { "n", "x", "o" },
silent = true,
}
end
end
return ret
end,
config = function(_, opts) config = function(_, opts)
local TS = require("nvim-treesitter-textobjects") local TS = require("nvim-treesitter-textobjects")
if not TS.setup then if not TS.setup then
@ -151,6 +160,41 @@ return {
return return
end end
TS.setup(opts) TS.setup(opts)
local function attach(buf)
local ft = vim.bo[buf].filetype
if not (vim.tbl_get(opts, "move", "enable") and LazyVim.treesitter.have(ft, "textobjects")) then
return
end
---@type table<string, table<string, string>>
local moves = vim.tbl_get(opts, "move", "keys") or {}
for method, keymaps in pairs(moves) do
for key, query in pairs(keymaps) do
local desc = query:gsub("@", ""):gsub("%..*", "")
desc = desc:sub(1, 1):upper() .. desc:sub(2)
desc = (key:sub(1, 1) == "[" and "Prev " or "Next ") .. desc
desc = desc .. (key:sub(2, 2) == key:sub(2, 2):upper() and " End" or " Start")
if not (vim.wo.diff and key:find("[cC]")) then
vim.keymap.set({ "n", "x", "o" }, key, function()
require("nvim-treesitter-textobjects.move")[method](query, "textobjects")
end, {
buffer = buf,
desc = desc,
silent = true,
})
end
end
end
end
vim.api.nvim_create_autocmd("FileType", {
group = vim.api.nvim_create_augroup("lazyvim_treesitter_textobjects", { clear = true }),
callback = function(ev)
attach(ev.buf)
end,
})
vim.tbl_map(attach, vim.api.nvim_list_bufs())
end, end,
}, },

View file

@ -23,6 +23,8 @@ return {
nav_j = { "<C-j>", term_nav("j"), desc = "Go to Lower Window", expr = true, mode = "t" }, nav_j = { "<C-j>", term_nav("j"), desc = "Go to Lower Window", expr = true, mode = "t" },
nav_k = { "<C-k>", term_nav("k"), desc = "Go to Upper Window", expr = true, mode = "t" }, nav_k = { "<C-k>", term_nav("k"), desc = "Go to Upper Window", expr = true, mode = "t" },
nav_l = { "<C-l>", term_nav("l"), desc = "Go to Right Window", expr = true, mode = "t" }, nav_l = { "<C-l>", term_nav("l"), desc = "Go to Right Window", expr = true, mode = "t" },
hide_slash = { "<C-/>", "hide", desc = "Hide Terminal", mode = { "t", "n" } },
hide_underscore = { "<c-_>", "hide", desc = "which_key_ignore", mode = { "t", "n" } },
}, },
}, },
}, },

View file

@ -5,8 +5,9 @@ local prios = {
["lazyvim.plugins.extras.coding.nvim-cmp"] = 2, ["lazyvim.plugins.extras.coding.nvim-cmp"] = 2,
["lazyvim.plugins.extras.editor.neo-tree"] = 2, ["lazyvim.plugins.extras.editor.neo-tree"] = 2,
["lazyvim.plugins.extras.ui.edgy"] = 3, ["lazyvim.plugins.extras.ui.edgy"] = 3,
["lazyvim.plugins.extras.lang.typescript"] = 5, ["lazyvim.plugins.extras.ai.copilot-native"] = 4,
["lazyvim.plugins.extras.coding.blink"] = 5, ["lazyvim.plugins.extras.coding.blink"] = 5,
["lazyvim.plugins.extras.lang.typescript"] = 5,
["lazyvim.plugins.extras.formatting.prettier"] = 10, ["lazyvim.plugins.extras.formatting.prettier"] = 10,
-- default core extra priority is 20 -- default core extra priority is 20
-- default priority is 50 -- default priority is 50
@ -24,13 +25,30 @@ end
local extras = {} ---@type string[] local extras = {} ---@type string[]
local defaults = LazyVim.config.get_defaults() local defaults = LazyVim.config.get_defaults()
local changed = false
local updated = {} ---@type string[]
-- Add extras from LazyExtras that are not disabled -- Add extras from LazyExtras that are not disabled
for _, extra in ipairs(LazyVim.config.json.data.extras) do for _, extra in ipairs(LazyVim.config.json.data.extras) do
if LazyVim.plugin.renamed_extras[extra] then
extra = LazyVim.plugin.renamed_extras[extra]
changed = true
end
if LazyVim.plugin.deprecated_extras[extra] then
changed = true
else
updated[#updated + 1] = extra
local def = defaults[extra] local def = defaults[extra]
if not (def and def.enabled == false) then if not (def and def.enabled == false) then
extras[#extras + 1] = extra extras[#extras + 1] = extra
end end
end end
end
if changed then
LazyVim.config.json.data.extras = updated
LazyVim.json.save()
end
-- Add default extras -- Add default extras
for name, extra in pairs(defaults) do for name, extra in pairs(defaults) do

View file

@ -304,4 +304,58 @@ function M.statuscolumn()
return package.loaded.snacks and require("snacks.statuscolumn").get() or "" return package.loaded.snacks and require("snacks.statuscolumn").get() or ""
end end
local _defaults = {} ---@type table<string, boolean>
-- Determines whether it's safe to set an option to a default value.
--
-- It will only set the option if:
-- * it is the same as the global value
-- * it's current value is a default value
-- * it was last set by a script in $VIMRUNTIME
---@param option string
---@param value string|number|boolean
---@return boolean was_set
function M.set_default(option, value)
local l = vim.api.nvim_get_option_value(option, { scope = "local" })
local g = LazyVim.config._options[option] or vim.api.nvim_get_option_value(option, { scope = "global" })
_defaults[("%s=%s"):format(option, value)] = true
local key = ("%s=%s"):format(option, l)
local source = ""
if l ~= g and not _defaults[key] then
-- Option does not match global and is not a default value
-- Check if it was set by a script in $VIMRUNTIME
local info = vim.api.nvim_get_option_info2(option, { scope = "local" })
---@param e vim.fn.getscriptinfo.ret
local scriptinfo = vim.tbl_filter(function(e)
return e.sid == info.last_set_sid
end, vim.fn.getscriptinfo())
source = scriptinfo[1] and scriptinfo[1].name or ""
local by_rtp = #scriptinfo == 1 and vim.startswith(scriptinfo[1].name, vim.fn.expand("$VIMRUNTIME"))
if not by_rtp then
if vim.g.lazyvim_debug_set_default then
LazyVim.warn(
("Not setting option `%s` to `%q` because it was changed by a plugin."):format(option, value),
{ title = "LazyVim", once = true }
)
end
return false
end
end
if vim.g.lazyvim_debug_set_default then
LazyVim.info({
("Setting option `%s` to `%q`"):format(option, value),
("Was: %q"):format(l),
("Global: %q"):format(g),
source ~= "" and ("Last set by: %s"):format(source) or "",
"buf: " .. vim.api.nvim_buf_get_name(0),
}, { title = "LazyVim", once = true })
end
vim.api.nvim_set_option_value(option, value, { scope = "local" })
return true
end
return M return M

View file

@ -101,9 +101,20 @@ function M.pretty_path(opts)
local root = LazyVim.root.get({ normalize = true }) local root = LazyVim.root.get({ normalize = true })
local cwd = LazyVim.root.cwd() local cwd = LazyVim.root.cwd()
if opts.relative == "cwd" and path:find(cwd, 1, true) == 1 then -- original path is preserved to provide user with expected result of pretty_path, not a normalized one,
-- which might be confusing
local norm_path = path
if LazyVim.is_win() then
-- in case any of the provided paths involved mixed case, an additional normalization step for windows
norm_path = norm_path:lower()
root = root:lower()
cwd = cwd:lower()
end
if opts.relative == "cwd" and norm_path:find(cwd, 1, true) == 1 then
path = path:sub(#cwd + 2) path = path:sub(#cwd + 2)
elseif path:find(root, 1, true) == 1 then elseif norm_path:find(root, 1, true) == 1 then
path = path:sub(#root + 2) path = path:sub(#root + 2)
end end

View file

@ -26,6 +26,9 @@ M.deprecated_extras = {
Either use `basedpyright`, or copy the [old extra](https://github.com/LazyVim/LazyVim/blob/c1f5fcf9c7ed2659c9d5ac41b3bb8a93e0a3c6a0/lua/lazyvim/plugins/extras/lang/python-semshi.lua#L1) to your own config. Either use `basedpyright`, or copy the [old extra](https://github.com/LazyVim/LazyVim/blob/c1f5fcf9c7ed2659c9d5ac41b3bb8a93e0a3c6a0/lua/lazyvim/plugins/extras/lang/python-semshi.lua#L1) to your own config.
]], ]],
} }
M.renamed_extras = {
["lazyvim.plugins.extras.lang.omnisharp"] = "lazyvim.plugins.extras.lang.dotnet",
}
M.deprecated_modules = {} M.deprecated_modules = {}
@ -94,6 +97,18 @@ function M.fix_imports()
return false return false
end end
end end
local rename = M.renamed_extras[spec.import]
if rename then
LazyVim.warn(
("The extra `%s` was renamed to `%s`.\nPlease update your config for `%s`"):format(
spec.import,
rename,
spec.importing or "LazyVim"
),
{ title = "LazyVim" }
)
spec.import = rename
end
local dep = M.deprecated_extras[spec and spec.import] local dep = M.deprecated_extras[spec and spec.import]
if dep then if dep then
dep = dep .. "\n" .. "Please remove the extra from `lazyvim.json` to hide this warning." dep = dep .. "\n" .. "Please remove the extra from `lazyvim.json` to hide this warning."

View file

@ -1,63 +1,135 @@
---@class lazyvim.util.treesitter ---@class lazyvim.util.treesitter
local M = {} local M = {}
M._installed = nil ---@type table<string,string>? M._installed = nil ---@type table<string,boolean>?
M._queries = {} ---@type table<string,boolean>
---@param update boolean? ---@param update boolean?
function M.get_installed(update) function M.get_installed(update)
if update then if update then
M._installed = {} M._installed, M._queries = {}, {}
for _, lang in ipairs(require("nvim-treesitter").get_installed("parsers")) do for _, lang in ipairs(require("nvim-treesitter").get_installed("parsers")) do
M._installed[lang] = lang M._installed[lang] = true
end end
end end
return M._installed or {} return M._installed or {}
end end
---@param lang string
---@param query string
function M.have_query(lang, query)
local key = lang .. ":" .. query
if M._queries[key] == nil then
M._queries[key] = vim.treesitter.query.get(lang, query) ~= nil
end
return M._queries[key]
end
---@param what string|number|nil ---@param what string|number|nil
---@param query? string
---@overload fun(buf?:number):boolean ---@overload fun(buf?:number):boolean
---@overload fun(ft:string):boolean ---@overload fun(ft:string):boolean
---@return boolean ---@return boolean
function M.have(what) function M.have(what, query)
what = what or vim.api.nvim_get_current_buf() what = what or vim.api.nvim_get_current_buf()
what = type(what) == "number" and vim.bo[what].filetype or what --[[@as string]] what = type(what) == "number" and vim.bo[what].filetype or what --[[@as string]]
local lang = vim.treesitter.language.get_lang(what) local lang = vim.treesitter.language.get_lang(what)
return lang ~= nil and M.get_installed()[lang] ~= nil if lang == nil or M.get_installed()[lang] == nil then
return false
end
if query and not M.have_query(lang, query) then
return false
end
return true
end end
function M.foldexpr() function M.foldexpr()
return M.have() and vim.treesitter.foldexpr() or "0" return M.have(nil, "folds") and vim.treesitter.foldexpr() or "0"
end end
function M.indentexpr() function M.indentexpr()
return M.have() and require("nvim-treesitter").indentexpr() or -1 return M.have(nil, "indents") and require("nvim-treesitter").indentexpr() or -1
end
---@return string?
local function win_find_cl()
local path = "C:/Program Files (x86)/Microsoft Visual Studio"
local pattern = "*/*/VC/Tools/MSVC/*/bin/Hostx64/x64/cl.exe"
return vim.fn.globpath(path, pattern, true, true)[1]
end
---@return boolean ok, lazyvim.util.treesitter.Health health
function M.check()
local is_win = vim.fn.has("win32") == 1
---@param tool string
---@param win boolean?
local function have(tool, win)
return (win == nil or is_win == win) and vim.fn.executable(tool) == 1
end
local have_cc = vim.env.CC ~= nil or have("cc", false) or have("cl", true) or (is_win and win_find_cl() ~= nil)
if not have_cc and is_win and vim.fn.executable("gcc") == 1 then
vim.env.CC = "gcc"
have_cc = true
end
---@class lazyvim.util.treesitter.Health: table<string,boolean>
local ret = {
["tree-sitter (CLI)"] = have("tree-sitter"),
["C compiler"] = have_cc,
tar = have("tar"),
curl = have("curl"),
node = have("node"),
}
local ok = true
for _, v in pairs(ret) do
ok = ok and v
end
return ok, ret
end end
---@param cb fun() ---@param cb fun()
function M.ensure_treesitter_cli(cb) function M.build(cb)
if vim.fn.executable("tree-sitter") == 1 then M.ensure_treesitter_cli(function(_, err)
local ok, health = M.check()
if ok then
return cb() return cb()
else
local lines = { "Unmet requirements for **nvim-treesitter** `main`:" }
local keys = vim.tbl_keys(health) ---@type string[]
table.sort(keys)
for _, k in pairs(keys) do
lines[#lines + 1] = ("- %s `%s`"):format(health[k] and "" or "", k)
end
vim.list_extend(lines, {
"",
"See the requirements at [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter/tree/main?tab=readme-ov-file#requirements)",
"Run `:checkhealth nvim-treesitter` for more information.",
})
if vim.fn.has("win32") == 1 and not health["C compiler"] then
lines[#lines + 1] = "Install a C compiler with `winget install --id=BrechtSanders.WinLibs.POSIX.UCRT -e`"
end
vim.list_extend(lines, err and { "", err } or {})
LazyVim.error(lines, { title = "LazyVim Treesitter" })
end
end)
end end
---@param msg? string ---@param cb fun(ok:boolean, err?:string)
local function fail(msg) function M.ensure_treesitter_cli(cb)
return LazyVim.error({ if vim.fn.executable("tree-sitter") == 1 then
"**treesitter-nvim** `main` requires the `tree-sitter` CLI executable to be installed.", return cb(true)
"Please install it manually from https://github.com/tree-sitter/tree-sitter/tree/master/crates/cli or",
"use your system package manager.",
"Run `:checkhealth nvim-treesitter` for more information.",
msg,
})
end end
-- try installing with mason -- try installing with mason
if not pcall(require, "mason") then if not pcall(require, "mason") then
return fail("`mason.nvim` is disabled in your config, so we cannot install it automatically.") return cb(false, "`mason.nvim` is disabled in your config, so we cannot install it automatically.")
end end
-- check again since we might have installed it already -- check again since we might have installed it already
if vim.fn.executable("tree-sitter") == 1 then if vim.fn.executable("tree-sitter") == 1 then
return cb() return cb(true)
end end
local mr = require("mason-registry") local mr = require("mason-registry")
@ -70,9 +142,9 @@ function M.ensure_treesitter_cli(cb)
vim.schedule_wrap(function(success) vim.schedule_wrap(function(success)
if success then if success then
LazyVim.info("Installed `tree-sitter-cli` with `mason.nvim`.") LazyVim.info("Installed `tree-sitter-cli` with `mason.nvim`.")
cb() cb(true)
else else
fail("Failed to install `tree-sitter-cli` with `mason.nvim`.") cb(false, "Failed to install `tree-sitter-cli` with `mason.nvim`.")
end end
end) end)
) )

View file

@ -1,3 +1,3 @@
#!/bin/env bash #!/usr/bin/env bash
nvim -l tests/minit.lua --minitest nvim -l tests/minit.lua --minitest "$@"

View file

@ -1,4 +1,5 @@
---@module 'luassert' ---@module 'luassert'
---@module 'lazy'
local Icons = require("mini.icons") local Icons = require("mini.icons")
@ -26,8 +27,15 @@ describe("Extra", function()
return not vim.tbl_contains(ignore, extra.modname) return not vim.tbl_contains(ignore, extra.modname)
end, extras) end, extras)
require("mason").setup()
local mr = require("mason-registry")
mr.refresh()
local lsp_to_pkg = {} local lsp_to_pkg = {}
lsp_to_pkg = require("mason-lspconfig.mappings").get_mason_map().lspconfig_to_package lsp_to_pkg = require("mason-lspconfig.mappings").get_mason_map().lspconfig_to_package
it("can get lspconfig to package map", function()
assert(not vim.tbl_isempty(lsp_to_pkg), "Could not get lspconfig to package map")
end)
local tsspec = Plugin.Spec.new({ local tsspec = Plugin.Spec.new({
import = "lazyvim.plugins.treesitter", import = "lazyvim.plugins.treesitter",
@ -65,6 +73,17 @@ describe("Extra", function()
{ "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = {} } }, { "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = {} } },
mod, mod,
}, { optional = true }) }, { optional = true })
it("it has no renamed plugins", function()
for _, p in pairs(spec.plugins) do
local short_url = p[1]
assert(
not LazyVim.plugin.renames[short_url],
"Plugin " .. short_url .. " has been renamed to " .. (LazyVim.plugin.renames[short_url] or "")
)
end
end)
local lspconfig = spec.plugins["nvim-lspconfig"] local lspconfig = spec.plugins["nvim-lspconfig"]
if lspconfig then if lspconfig then
it("does not install LSP servers with mason.nvim", function() it("does not install LSP servers with mason.nvim", function()

View file

@ -1,7 +1,13 @@
#!/usr/bin/env -S nvim -l #!/usr/bin/env -S nvim -l
vim.env.LAZY_STDPATH = ".tests" vim.env.LAZY_STDPATH = ".tests"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() vim.env.LAZY_PATH = vim.fs.normalize("~/projects/lazy.nvim")
if vim.fn.isdirectory(vim.env.LAZY_PATH) == 1 then
loadfile(vim.env.LAZY_PATH .. "/bootstrap.lua")()
else
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"), "bootstrap.lua")()
end
-- Setup lazy.nvim -- Setup lazy.nvim
require("lazy.minit").setup({ require("lazy.minit").setup({

View file

@ -1,21 +0,0 @@
[selene]
base = "lua51"
name = "vim"
[vim]
any = true
[jit]
any = true
[assert]
any = true
[describe]
any = true
[it]
any = true
[before_each.args]
any = true

19
vim.yml Normal file
View file

@ -0,0 +1,19 @@
base: lua51
lua_versions:
- luajit
globals:
Snacks:
any: true
vim:
any: true
jit:
any: true
assert:
any: true
describe:
any: true
it:
any: true
before_each:
any: true