Compare commits
107 Commits
Author | SHA1 | Date | |
---|---|---|---|
6f9adbd4fb | |||
ff5f5886db | |||
300350686f | |||
718c5c6036 | |||
31d913697b | |||
6bb0d1b66f | |||
0e5ff5c0ab | |||
886d49eb89 | |||
0f7a009d1c | |||
05f45bb720 | |||
9762e7e431 | |||
aab365a9f8 | |||
f61a243d1a | |||
6b05ed7dcd | |||
a7f68e5e37 | |||
3c448a1be1 | |||
7cac6f064c | |||
274649e923 | |||
a3011daf40 | |||
fa6cbfc602 | |||
d012a1acb8 | |||
d03f708cd3 | |||
017582c05a | |||
13bf7977a4 | |||
74786c21d7 | |||
7f5051ef72 | |||
b220e54159 | |||
b25559d397 | |||
ee068d8399 | |||
db86635e32 | |||
a1ab7c6e32 | |||
b30ff44af5 | |||
36d6a7fe4f | |||
50401d358b | |||
7c79cfe073 | |||
f1af34e885 | |||
5dc4ce3e4a | |||
ea930e3545 | |||
a7f971f30e | |||
e54d0dde62 | |||
0bff29c07a | |||
afdcec5b4a | |||
f892ba5cff | |||
a180c3097c | |||
b8d3a1c2cd | |||
a72a84972d | |||
6045a52d82 | |||
a910b871d1 | |||
15022f4892 | |||
f9dadc11b3 | |||
ec0ddd481c | |||
64c5848fe8 | |||
23e2b073e6 | |||
451bde5b41 | |||
377c0e397c | |||
971ed5c148 | |||
73dc5a503f | |||
566049aa4a | |||
c1fc996ccd | |||
a62a5942de | |||
9264c54ae9 | |||
549baee224 | |||
d7ca822d41 | |||
aa1cccf230 | |||
6dc66852b8 | |||
9fe89f5f8a | |||
76d33bba2c | |||
79619364bd | |||
2e09051472 | |||
9a0543531d | |||
f6d646a325 | |||
07f183516f | |||
b97ccb9e73 | |||
142e6bec20 | |||
fa898b7293 | |||
012ca50b28 | |||
6b2c648878 | |||
02d673d37c | |||
0411baab89 | |||
31b50e3a9c | |||
e5f53ee193 | |||
d71ebeab24 | |||
a184fc1c73 | |||
871e7fb0db | |||
fc50c055c3 | |||
df0818880e | |||
6323b419fd | |||
abaa6d90e4 | |||
f70f873355 | |||
258f339bcf | |||
4d0427e131 | |||
f2459bd70e | |||
e797e13bce | |||
489221f741 | |||
a28acf0ce7 | |||
fb1f29c32c | |||
b4b27e867c | |||
f46316af00 | |||
63e898599a | |||
3a07bd8d2e | |||
69bb89184f | |||
0801e52118 | |||
1b0b6eb0e1 | |||
8c0e39c826 | |||
bb2608ecd1 | |||
ae759b947b | |||
9387ab388e |
184
CHANGELOG.md
184
CHANGELOG.md
@ -1,5 +1,185 @@
|
||||
# Changelog
|
||||
|
||||
## [7.0.1](https://github.com/LazyVim/LazyVim/compare/v7.0.0...v7.0.1) (2023-09-29)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **nvim-lint:** dont use default configured linters from nvim-lint ([ff5f588](https://github.com/LazyVim/LazyVim/commit/ff5f5886db321679e3fdc5dbb82b12daf6075510))
|
||||
|
||||
## [7.0.0](https://github.com/LazyVim/LazyVim/compare/v6.4.3...v7.0.0) (2023-09-29)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* **typescript:** removed `typescript.nvim` since it's deprecated
|
||||
* **null-ls:** use none-ls instead of null-ls ([#1517](https://github.com/LazyVim/LazyVim/issues/1517))
|
||||
|
||||
### Features
|
||||
|
||||
* **extras:** added `conform.nvim` extra you can use instead of null-ls/none-ls ([f61a243](https://github.com/LazyVim/LazyVim/commit/f61a243d1aca582963aca3f2c2c7c2ae0be16b06))
|
||||
* **extras:** added extra for nvim-lint ([05f45bb](https://github.com/LazyVim/LazyVim/commit/05f45bb7200a6fd33ab7366553b957fa222e2cdf))
|
||||
* **neo-tree:** added support for LSP renaming to NeoTree ([9762e7e](https://github.com/LazyVim/LazyVim/commit/9762e7e43110013a0931b8470be2929b54b4b641))
|
||||
* **null-ls:** use none-ls instead of null-ls ([#1517](https://github.com/LazyVim/LazyVim/issues/1517)) ([7cac6f0](https://github.com/LazyVim/LazyVim/commit/7cac6f064c5b30f6b0ae4dffab62100aa6fe2568))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **conform:** use `formatters` for both custom and overriding formatters ([6bb0d1b](https://github.com/LazyVim/LazyVim/commit/6bb0d1b66ffe6d0a77ad96d0f945113ddcb9fdb3))
|
||||
* **docker:** put hadolint in its own spec ([718c5c6](https://github.com/LazyVim/LazyVim/commit/718c5c6036f2aff6534501e151dd3e5ff13a42fa))
|
||||
* **format:** wrap custom formatter with error handler ([0e5ff5c](https://github.com/LazyVim/LazyVim/commit/0e5ff5c0ab6930190122df086db5e3f91d8b38b8))
|
||||
* **nvim-lint:** use `linters` for both custom and overriding linters ([31d9136](https://github.com/LazyVim/LazyVim/commit/31d913697bc9b731bc941362021ce06617f627d3))
|
||||
* remove deprecated leap/flit code checks ([6b05ed7](https://github.com/LazyVim/LazyVim/commit/6b05ed7dcd729322e2e5b6752655a9491cd17f86))
|
||||
* **typescript:** removed `typescript.nvim` since it's deprecated ([aab365a](https://github.com/LazyVim/LazyVim/commit/aab365a9f8b6405c6c5a938cb4745e9b770f2261))
|
||||
|
||||
## [6.4.3](https://github.com/LazyVim/LazyVim/compare/v6.4.2...v6.4.3) (2023-09-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ibl:** use default hl groups ([74786c2](https://github.com/LazyVim/LazyVim/commit/74786c21d743db0fabed61b90bf7ecaab16bbf14))
|
||||
* **lsp:** don't install jsonls by default. It's part of the json extra ([fa6cbfc](https://github.com/LazyVim/LazyVim/commit/fa6cbfc6020efcd2168ffe09a209037599b91442))
|
||||
* **telescope:** add enums and consts to search symbols ([#1512](https://github.com/LazyVim/LazyVim/issues/1512)) ([b220e54](https://github.com/LazyVim/LazyVim/commit/b220e541594a0ef556d1515649cd99d45fe94058))
|
||||
* **telescope:** replace anonymous functions in mappings by named functions ([#1294](https://github.com/LazyVim/LazyVim/issues/1294)) ([13bf797](https://github.com/LazyVim/LazyVim/commit/13bf7977a4bae39a38ef6a3fad6303366c8b4bea))
|
||||
* **telescope:** typo ([017582c](https://github.com/LazyVim/LazyVim/commit/017582c05a2d87c73cfe794dd2e296cc0caf86cd))
|
||||
* **yamlls:** work-around for yaml formatting on Neovim < 0.10. Fixes [#1435](https://github.com/LazyVim/LazyVim/issues/1435) ([7f5051e](https://github.com/LazyVim/LazyVim/commit/7f5051ef72cfe66eb50ddb7c973714aa8aea04ec))
|
||||
|
||||
## [6.4.2](https://github.com/LazyVim/LazyVim/compare/v6.4.1...v6.4.2) (2023-09-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **indent-blankline:** upgrade ibl config to v3 ([db86635](https://github.com/LazyVim/LazyVim/commit/db86635e3276451f795da4f8af64eff94391fe48))
|
||||
|
||||
## [6.4.1](https://github.com/LazyVim/LazyVim/compare/v6.4.0...v6.4.1) (2023-09-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **dap:** revert loading vscode launch files. Add it to your own config when needed. Fixes [#1503](https://github.com/LazyVim/LazyVim/issues/1503) ([36d6a7f](https://github.com/LazyVim/LazyVim/commit/36d6a7fe4f4e7d5c9ffceca0496655a889df2ebc))
|
||||
|
||||
## [6.4.0](https://github.com/LazyVim/LazyVim/compare/v6.3.0...v6.4.0) (2023-09-26)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **autocmds:** close InspectTree window with q ([e54d0dd](https://github.com/LazyVim/LazyVim/commit/e54d0dde623c206c4f7ed9a512785c9fc0de3a22))
|
||||
* **extras:** added simple csharp extra ([afdcec5](https://github.com/LazyVim/LazyVim/commit/afdcec5b4adccd94ff64774340a3ffd33a9d4ecf))
|
||||
* **java:** support vscode launch json in Java ([#1422](https://github.com/LazyVim/LazyVim/issues/1422)) ([5dc4ce3](https://github.com/LazyVim/LazyVim/commit/5dc4ce3e4a452438838c271330df156fd3640c60))
|
||||
* **mini-pairs:** add toggle mini pairs keymap and function ([#1456](https://github.com/LazyVim/LazyVim/issues/1456)) ([a7f971f](https://github.com/LazyVim/LazyVim/commit/a7f971f30ec89473482db4ab820d2afb25fa6abf))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* always lazy load keymaps. fixes [#1485](https://github.com/LazyVim/LazyVim/issues/1485) ([f892ba5](https://github.com/LazyVim/LazyVim/commit/f892ba5cffe8fcac724ad6b801e0824b391fa037))
|
||||
* **dap:** move launchjs code from java to dap ([f1af34e](https://github.com/LazyVim/LazyVim/commit/f1af34e88525cc291b7bacc76d915b642aef192b))
|
||||
* disable context commentstring autocmd ([0bff29c](https://github.com/LazyVim/LazyVim/commit/0bff29c07a0d5fb4ef36ba4add2b9c4ee243f8a9))
|
||||
* **mini.comment:** better lua pattern for tags. Fixes [#1413](https://github.com/LazyVim/LazyVim/issues/1413) ([7c79cfe](https://github.com/LazyVim/LazyVim/commit/7c79cfe07314245decd73ec67e7247bba22abaa9))
|
||||
* **python:** use venv for DAP Python ([#1457](https://github.com/LazyVim/LazyVim/issues/1457)) ([ea930e3](https://github.com/LazyVim/LazyVim/commit/ea930e35457df4a367b537c472af8d5c6e8ae7eb))
|
||||
|
||||
## [6.3.0](https://github.com/LazyVim/LazyVim/compare/v6.2.0...v6.3.0) (2023-09-04)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **clangd:** remove CMakelists root_dir search ([#1230](https://github.com/LazyVim/LazyVim/issues/1230)) ([9264c54](https://github.com/LazyVim/LazyVim/commit/9264c54ae96d1d56f029ad9b561326c7b991c53b))
|
||||
* **python:** add more venv names ([#1381](https://github.com/LazyVim/LazyVim/issues/1381)) ([377c0e3](https://github.com/LazyVim/LazyVim/commit/377c0e397c3585cf7bae6afb8bd279a47954be0a))
|
||||
* **treesitter:** add jsdoc to ensure_installed ([#1252](https://github.com/LazyVim/LazyVim/issues/1252)) ([566049a](https://github.com/LazyVim/LazyVim/commit/566049aa4a26a86219dd1ad1624f9a1bf18831b6))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* [#1305](https://github.com/LazyVim/LazyVim/issues/1305) rust debugging not working on windows due to missing liblldb path ([#1390](https://github.com/LazyVim/LazyVim/issues/1390)) ([6045a52](https://github.com/LazyVim/LazyVim/commit/6045a52d82ba4b0dcd0b050688302a22c2fc3991))
|
||||
* **autocmds:** restore tabpage on resize ([#1260](https://github.com/LazyVim/LazyVim/issues/1260)) ([f9dadc1](https://github.com/LazyVim/LazyVim/commit/f9dadc11b39fb0b027473caaab2200b35c9f0c8b))
|
||||
* **clangd:** update setup from upstream changes ([#1308](https://github.com/LazyVim/LazyVim/issues/1308)) ([73dc5a5](https://github.com/LazyVim/LazyVim/commit/73dc5a503f1f42fc12869688df1359ffd80da5d1))
|
||||
* **java:** don't accumulate on_attach, and make more configurable ([#1388](https://github.com/LazyVim/LazyVim/issues/1388)) ([15022f4](https://github.com/LazyVim/LazyVim/commit/15022f4892726f9899ce5eb3aed7a19df29f62ef))
|
||||
* **keymaps:** change `v` mode to `x` mode for `save file` ([#1262](https://github.com/LazyVim/LazyVim/issues/1262)) ([ec0ddd4](https://github.com/LazyVim/LazyVim/commit/ec0ddd481c785833c5caac9c9d22889b9e963883))
|
||||
* **keymaps:** remove gw keymap ([23e2b07](https://github.com/LazyVim/LazyVim/commit/23e2b073e6fa75dacaa58dc1fe63392af7f54598))
|
||||
* **python:** disable ruff hover correctly ([#1365](https://github.com/LazyVim/LazyVim/issues/1365)) ([451bde5](https://github.com/LazyVim/LazyVim/commit/451bde5b41ec410afbb2b5e75e339a3fc44c5587))
|
||||
* **yaml:** yaml validate and enable line folding ([#1251](https://github.com/LazyVim/LazyVim/issues/1251)) ([a62a594](https://github.com/LazyVim/LazyVim/commit/a62a5942deb281b9edce3673e656854805297199))
|
||||
* **yaml:** yaml: Fix TypeError undefined length ([#1229](https://github.com/LazyVim/LazyVim/issues/1229)) ([d7ca822](https://github.com/LazyVim/LazyVim/commit/d7ca822d41bc65e31dc1019a64d5d3518c8e2470))
|
||||
|
||||
## [6.2.0](https://github.com/LazyVim/LazyVim/compare/v6.1.0...v6.2.0) (2023-07-25)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Enable flash.nvim highlight on catppuccin integration ([#1206](https://github.com/LazyVim/LazyVim/issues/1206)) ([76d33bb](https://github.com/LazyVim/LazyVim/commit/76d33bba2cc8bd691979ee8bc66f8ac36236c3ba))
|
||||
* **extra:** add yaml language extension ([#1198](https://github.com/LazyVim/LazyVim/issues/1198)) ([6dc6685](https://github.com/LazyVim/LazyVim/commit/6dc66852b8851f02b372e8a2882fddf04b3b6966))
|
||||
* **java:** add test and debug support for Java extension ([#1192](https://github.com/LazyVim/LazyVim/issues/1192)) ([f6d646a](https://github.com/LazyVim/LazyVim/commit/f6d646a3251efb39f7cb5de38b529c5dd1324f28))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* [#1194](https://github.com/LazyVim/LazyVim/issues/1194) use cmakelang instead of cmakelint ([#1197](https://github.com/LazyVim/LazyVim/issues/1197)) ([b97ccb9](https://github.com/LazyVim/LazyVim/commit/b97ccb9e7390b6e73e3f1a4d63a443f6cec67f07))
|
||||
* fixes [#1207](https://github.com/LazyVim/LazyVim/issues/1207) ([#1213](https://github.com/LazyVim/LazyVim/issues/1213)) ([2e09051](https://github.com/LazyVim/LazyVim/commit/2e0905147269d92d58627303bcae60bbcb3807dd))
|
||||
* **lang_java:** fixes [#1215](https://github.com/LazyVim/LazyVim/issues/1215) other two entries of `vim.fs.joinpath` as well that were not changed in [#1213](https://github.com/LazyVim/LazyVim/issues/1213) ([#1216](https://github.com/LazyVim/LazyVim/issues/1216)) ([9fe89f5](https://github.com/LazyVim/LazyVim/commit/9fe89f5f8a5a50438276a4d2f757549ea2496ca0))
|
||||
* **lsp:** supports_method for checking inlay hint support ([#1195](https://github.com/LazyVim/LazyVim/issues/1195)) ([9a05435](https://github.com/LazyVim/LazyVim/commit/9a0543531d05a417ba63f3dd710530ba5765aca5))
|
||||
|
||||
## [6.1.0](https://github.com/LazyVim/LazyVim/compare/v6.0.0...v6.1.0) (2023-07-22)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **clangd:** better clangd root detection ([#1165](https://github.com/LazyVim/LazyVim/issues/1165)) ([d71ebea](https://github.com/LazyVim/LazyVim/commit/d71ebeab24565bb109adc68253c2da6614eb5dda))
|
||||
* **lang:** add cmake support ([#1032](https://github.com/LazyVim/LazyVim/issues/1032)) ([fa898b7](https://github.com/LazyVim/LazyVim/commit/fa898b7293c6c67b0ae2bae1d3be70413bcadd8d))
|
||||
* **lang:** add debug adapter plugin for go ([#1115](https://github.com/LazyVim/LazyVim/issues/1115)) ([02d673d](https://github.com/LazyVim/LazyVim/commit/02d673d37c6a097a43db877644e20db84f0880b1))
|
||||
* **lang:** add java ([#1132](https://github.com/LazyVim/LazyVim/issues/1132)) ([0411baa](https://github.com/LazyVim/LazyVim/commit/0411baab8985450a15a54a46c48197b704bc24cc))
|
||||
* **python:** add semantic highlighting ([#1149](https://github.com/LazyVim/LazyVim/issues/1149)) ([012ca50](https://github.com/LazyVim/LazyVim/commit/012ca50b2801cc1c4e5b886cc26ebe0da532e31d))
|
||||
* **telescope:** allow word and selection searches ([#1096](https://github.com/LazyVim/LazyVim/issues/1096)) ([6b2c648](https://github.com/LazyVim/LazyVim/commit/6b2c648878b8df538d719c06394bc430cc3ed48c))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **terraform:** configure commentstring ([#1171](https://github.com/LazyVim/LazyVim/issues/1171)) ([e5f53ee](https://github.com/LazyVim/LazyVim/commit/e5f53ee1931fdc8c0f0d3150cbb5742dcb8ff477))
|
||||
|
||||
## [6.0.0](https://github.com/LazyVim/LazyVim/compare/v5.1.1...v6.0.0) (2023-07-20)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* **options:** set default localleader to \
|
||||
|
||||
### Features
|
||||
|
||||
* add a keybind to search register ([#1170](https://github.com/LazyVim/LazyVim/issues/1170)) ([fc50c05](https://github.com/LazyVim/LazyVim/commit/fc50c055c3db561043e23b53afc270de2231fbb2))
|
||||
* **keymaps:** added leader-K to run keywordprg ([a28acf0](https://github.com/LazyVim/LazyVim/commit/a28acf0ce7d00af11e7268c9edff579bd06abf56))
|
||||
* **lang:** add tex support ([#1156](https://github.com/LazyVim/LazyVim/issues/1156)) ([abaa6d9](https://github.com/LazyVim/LazyVim/commit/abaa6d90e4fe2c658b869e81a140a74f624d9299))
|
||||
* **options:** set default localleader to \ ([258f339](https://github.com/LazyVim/LazyVim/commit/258f339bcf8197ece54d66bf6ed6f351cb6e98cb))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **util:** fixed line number toggling. Closes [#1173](https://github.com/LazyVim/LazyVim/issues/1173) ([df08188](https://github.com/LazyVim/LazyVim/commit/df0818880e66086f10982827ea11332b46c3b74f))
|
||||
|
||||
## [5.1.1](https://github.com/LazyVim/LazyVim/compare/v5.1.0...v5.1.1) (2023-07-16)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **mason:** add MasonUpdate to build ([b4b27e8](https://github.com/LazyVim/LazyVim/commit/b4b27e867c4d2ba2bddd1df4c144ccdf1b4bfabc))
|
||||
|
||||
## [5.1.0](https://github.com/LazyVim/LazyVim/compare/v5.0.0...v5.1.0) (2023-07-16)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **lang:** add null-ls tools to mason's ensure_installed ([#1133](https://github.com/LazyVim/LazyVim/issues/1133)) ([63e8985](https://github.com/LazyVim/LazyVim/commit/63e898599a00d8b1832de650ed67f63a44bf22e0))
|
||||
* **lsp:** add 'reuse_win' for reuse window in lsp definition keymap ([#1131](https://github.com/LazyVim/LazyVim/issues/1131)) ([1b0b6eb](https://github.com/LazyVim/LazyVim/commit/1b0b6eb0e13018196f0110b06149f00f2df5162f))
|
||||
* **neo-tree:** update to v3.x and change `follow_current_file` to a … ([#1143](https://github.com/LazyVim/LazyVim/issues/1143)) ([69bb891](https://github.com/LazyVim/LazyVim/commit/69bb89184f9297f1377f77a8b6bee2487df6ac00))
|
||||
|
||||
## [5.0.0](https://github.com/LazyVim/LazyVim/compare/v4.28.1...v5.0.0) (2023-07-13)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* **flash:** Make flash.nvim the default jump plugin for LazyVim
|
||||
|
||||
### Features
|
||||
|
||||
* added `leader-L` to show the LazyVim changelog ([9387ab3](https://github.com/LazyVim/LazyVim/commit/9387ab388ec43cae0689405fcb21bb4ecf67322c))
|
||||
* **flash:** Make flash.nvim the default jump plugin for LazyVim ([ae759b9](https://github.com/LazyVim/LazyVim/commit/ae759b947b1ef16d9814fcddfcafe2cdd767bc6a))
|
||||
|
||||
## [4.28.1](https://github.com/LazyVim/LazyVim/compare/v4.28.0...v4.28.1) (2023-07-12)
|
||||
|
||||
|
||||
@ -558,7 +738,7 @@
|
||||
|
||||
### Features
|
||||
|
||||
* **noice:** enable the inc_rename preset when inc_rename is availble ([a43d1b7](https://github.com/LazyVim/LazyVim/commit/a43d1b79f29deecc694bd409ab497f8a62091b11))
|
||||
* **noice:** enable the inc_rename preset when inc_rename is available ([a43d1b7](https://github.com/LazyVim/LazyVim/commit/a43d1b79f29deecc694bd409ab497f8a62091b11))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
@ -615,7 +795,7 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **format:** only do null-ls formatting logic when null-ls is availble. Fixes [#684](https://github.com/LazyVim/LazyVim/issues/684) ([eb143eb](https://github.com/LazyVim/LazyVim/commit/eb143ebe110995fb208fc480958a55858944c5f9))
|
||||
* **format:** only do null-ls formatting logic when null-ls is available. Fixes [#684](https://github.com/LazyVim/LazyVim/issues/684) ([eb143eb](https://github.com/LazyVim/LazyVim/commit/eb143ebe110995fb208fc480958a55858944c5f9))
|
||||
|
||||
## [2.12.0](https://github.com/LazyVim/LazyVim/compare/v2.11.0...v2.12.0) (2023-04-24)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 July 12
|
||||
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 September 29
|
||||
|
||||
==============================================================================
|
||||
Table of Contents *LazyVim-table-of-contents*
|
||||
|
@ -22,7 +22,9 @@ vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
vim.api.nvim_create_autocmd({ "VimResized" }, {
|
||||
group = augroup("resize_splits"),
|
||||
callback = function()
|
||||
local current_tab = vim.fn.tabpagenr()
|
||||
vim.cmd("tabdo wincmd =")
|
||||
vim.cmd("tabnext " .. current_tab)
|
||||
end,
|
||||
})
|
||||
|
||||
@ -53,6 +55,7 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||
"man",
|
||||
"notify",
|
||||
"qf",
|
||||
"query",
|
||||
"spectre_panel",
|
||||
"startuptime",
|
||||
"tsplayground",
|
||||
|
@ -79,6 +79,8 @@ local defaults = {
|
||||
|
||||
M.renames = {
|
||||
["windwp/nvim-spectre"] = "nvim-pack/nvim-spectre",
|
||||
["jose-elias-alvarez/null-ls.nvim"] = "nvimtools/none-ls.nvim",
|
||||
["null-ls.nvim"] = "none-ls.nvim",
|
||||
}
|
||||
|
||||
---@type LazyVimConfig
|
||||
@ -98,22 +100,23 @@ function M.setup(opts)
|
||||
error("Exiting")
|
||||
end
|
||||
|
||||
if vim.fn.argc(-1) == 0 then
|
||||
-- autocmds and keymaps can wait to load
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
group = vim.api.nvim_create_augroup("LazyVim", { clear = true }),
|
||||
pattern = "VeryLazy",
|
||||
callback = function()
|
||||
M.load("autocmds")
|
||||
M.load("keymaps")
|
||||
end,
|
||||
})
|
||||
else
|
||||
-- load them now so they affect the opened buffers
|
||||
-- autocmds can be loaded lazily when not opening a file
|
||||
local lazy_autocmds = vim.fn.argc(-1) == 0
|
||||
if not lazy_autocmds then
|
||||
M.load("autocmds")
|
||||
M.load("keymaps")
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
group = vim.api.nvim_create_augroup("LazyVim", { clear = true }),
|
||||
pattern = "VeryLazy",
|
||||
callback = function()
|
||||
if lazy_autocmds then
|
||||
M.load("autocmds")
|
||||
end
|
||||
M.load("keymaps")
|
||||
end,
|
||||
})
|
||||
|
||||
require("lazy.core.util").try(function()
|
||||
if type(M.colorscheme) == "function" then
|
||||
M.colorscheme()
|
||||
@ -180,6 +183,14 @@ function M.init()
|
||||
local add = Plugin.Spec.add
|
||||
Plugin.Spec.add = function(self, plugin, ...)
|
||||
if type(plugin) == "table" and M.renames[plugin[1]] then
|
||||
require("lazy.core.util").warn(
|
||||
("Plugin `%s` was renamed to `%s`.\nPlease update your config for `%s`"):format(
|
||||
plugin[1],
|
||||
M.renames[plugin[1]],
|
||||
self.importing or "LazyVim"
|
||||
),
|
||||
{ title = "LazyVim" }
|
||||
)
|
||||
plugin[1] = M.renames[plugin[1]]
|
||||
end
|
||||
return add(self, plugin, ...)
|
||||
|
@ -66,8 +66,6 @@ map(
|
||||
{ desc = "Redraw / clear hlsearch / diff update" }
|
||||
)
|
||||
|
||||
map({ "n", "x" }, "gw", "*N", { desc = "Search word under cursor" })
|
||||
|
||||
-- https://github.com/mhinz/vim-galore#saner-behavior-of-n-and-n
|
||||
map("n", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
|
||||
map("x", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
|
||||
@ -82,7 +80,10 @@ map("i", ".", ".<c-g>u")
|
||||
map("i", ";", ";<c-g>u")
|
||||
|
||||
-- save file
|
||||
map({ "i", "v", "n", "s" }, "<C-s>", "<cmd>w<cr><esc>", { desc = "Save file" })
|
||||
map({ "i", "x", "n", "s" }, "<C-s>", "<cmd>w<cr><esc>", { desc = "Save file" })
|
||||
|
||||
--keywordprg
|
||||
map("n", "<leader>K", "<cmd>norm! K<cr>", { desc = "Keywordprg" })
|
||||
|
||||
-- better indenting
|
||||
map("v", "<", "<gv")
|
||||
@ -108,7 +109,7 @@ end
|
||||
map("n", "<leader>uf", require("lazyvim.plugins.lsp.format").toggle, { desc = "Toggle format on Save" })
|
||||
map("n", "<leader>us", function() Util.toggle("spell") end, { desc = "Toggle Spelling" })
|
||||
map("n", "<leader>uw", function() Util.toggle("wrap") end, { desc = "Toggle Word Wrap" })
|
||||
map("n", "<leader>ul", function() Util.toggle("relativenumber", true) Util.toggle("number") end, { desc = "Toggle Line Numbers" })
|
||||
map("n", "<leader>ul", function() Util.toggle_number() end, { desc = "Toggle Line Numbers" })
|
||||
map("n", "<leader>ud", Util.toggle_diagnostics, { desc = "Toggle Diagnostics" })
|
||||
local conceallevel = vim.o.conceallevel > 0 and vim.o.conceallevel or 3
|
||||
map("n", "<leader>uc", function() Util.toggle("conceallevel", false, {0, conceallevel}) end, { desc = "Toggle Conceal" })
|
||||
@ -128,6 +129,9 @@ if vim.fn.has("nvim-0.9.0") == 1 then
|
||||
map("n", "<leader>ui", vim.show_pos, { desc = "Inspect Pos" })
|
||||
end
|
||||
|
||||
-- LazyVim Changelog
|
||||
map("n", "<leader>L", Util.changelog, {desc = "LazyVim Changelog"})
|
||||
|
||||
-- floating terminal
|
||||
local lazyterm = function() Util.float_term(nil, { cwd = Util.get_root() }) end
|
||||
map("n", "<leader>ft", lazyterm, { desc = "Terminal (root dir)" })
|
||||
|
@ -1,6 +1,6 @@
|
||||
-- This file is automatically loaded by plugins.core
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
vim.g.maplocalleader = "\\"
|
||||
|
||||
local opt = vim.opt
|
||||
|
||||
|
@ -97,9 +97,27 @@ return {
|
||||
"echasnovski/mini.pairs",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
keys = {
|
||||
{
|
||||
"<leader>up",
|
||||
function()
|
||||
local Util = require("lazy.core.util")
|
||||
vim.g.minipairs_disable = not vim.g.minipairs_disable
|
||||
if vim.g.minipairs_disable then
|
||||
Util.warn("Disabled auto pairs", { title = "Option" })
|
||||
else
|
||||
Util.info("Enabled auto pairs", { title = "Option" })
|
||||
end
|
||||
end,
|
||||
desc = "Toggle auto pairs",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- surround
|
||||
-- Fast and feature-rich surround actions. For text that includes
|
||||
-- surrounding characters like brackets or quotes, this allows you
|
||||
-- to select the text inside, change or modify the surrounding characters,
|
||||
-- and more.
|
||||
{
|
||||
"echasnovski/mini.surround",
|
||||
keys = function(_, keys)
|
||||
@ -134,7 +152,13 @@ return {
|
||||
},
|
||||
|
||||
-- comments
|
||||
{ "JoosepAlviste/nvim-ts-context-commentstring", lazy = true },
|
||||
{
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
lazy = true,
|
||||
opts = {
|
||||
enable_autocmd = false,
|
||||
},
|
||||
},
|
||||
{
|
||||
"echasnovski/mini.comment",
|
||||
event = "VeryLazy",
|
||||
@ -147,7 +171,7 @@ return {
|
||||
},
|
||||
},
|
||||
|
||||
-- better text-objects
|
||||
-- Better text-objects
|
||||
{
|
||||
"echasnovski/mini.ai",
|
||||
-- keys = {
|
||||
@ -167,6 +191,7 @@ return {
|
||||
}, {}),
|
||||
f = ai.gen_spec.treesitter({ a = "@function.outer", i = "@function.inner" }, {}),
|
||||
c = ai.gen_spec.treesitter({ a = "@class.outer", i = "@class.inner" }, {}),
|
||||
t = { "<([%p%w]-)%f[^<%w][^<>]->.-</%1>", "^<.->().*()</[^/]->$" },
|
||||
},
|
||||
}
|
||||
end,
|
||||
|
@ -16,6 +16,7 @@ return {
|
||||
integrations = {
|
||||
alpha = true,
|
||||
cmp = true,
|
||||
flash = true,
|
||||
gitsigns = true,
|
||||
illuminate = true,
|
||||
indent_blankline = { enabled = true },
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -3,21 +3,10 @@ return {
|
||||
{
|
||||
"gbprod/yanky.nvim",
|
||||
dependencies = { { "kkharji/sqlite.lua", enabled = not jit.os:find("Windows") } },
|
||||
opts = function()
|
||||
local mapping = require("yanky.telescope.mapping")
|
||||
local mappings = mapping.get_defaults()
|
||||
mappings.i["<c-p>"] = nil
|
||||
return {
|
||||
highlight = { timer = 200 },
|
||||
ring = { storage = jit.os:find("Windows") and "shada" or "sqlite" },
|
||||
picker = {
|
||||
telescope = {
|
||||
use_default_mappings = false,
|
||||
mappings = mappings,
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
opts = {
|
||||
highlight = { timer = 250 },
|
||||
ring = { storage = jit.os:find("Windows") and "shada" or "sqlite" },
|
||||
},
|
||||
keys = {
|
||||
-- stylua: ignore
|
||||
{ "<leader>p", function() require("telescope").extensions.yank_history.yank_history({ }) end, desc = "Open Yank History" },
|
||||
|
@ -13,6 +13,8 @@ return {
|
||||
},
|
||||
opts = {},
|
||||
config = function(_, opts)
|
||||
-- setup dap config by VsCode launch.json file
|
||||
-- require("dap.ext.vscode").load_launchjs()
|
||||
local dap = require("dap")
|
||||
local dapui = require("dapui")
|
||||
dapui.setup(opts)
|
||||
|
@ -1,83 +0,0 @@
|
||||
return {
|
||||
{ "ggandor/leap.nvim", enabled = false },
|
||||
{ "ggandor/flit.nvim", enabled = false },
|
||||
{
|
||||
"folke/flash.nvim",
|
||||
event = "VeryLazy",
|
||||
vscode = true,
|
||||
---@type Flash.Config
|
||||
opts = {},
|
||||
keys = {
|
||||
{
|
||||
"s",
|
||||
mode = { "n", "x", "o" },
|
||||
function()
|
||||
require("flash").jump()
|
||||
end,
|
||||
desc = "Flash",
|
||||
},
|
||||
{
|
||||
"S",
|
||||
mode = { "n", "o", "x" },
|
||||
function()
|
||||
require("flash").treesitter()
|
||||
end,
|
||||
desc = "Flash Treesitter",
|
||||
},
|
||||
{
|
||||
"r",
|
||||
mode = "o",
|
||||
function()
|
||||
require("flash").remote()
|
||||
end,
|
||||
desc = "Remote Flash",
|
||||
},
|
||||
{
|
||||
"R",
|
||||
mode = { "o", "x" },
|
||||
function()
|
||||
require("flash").treesitter_search()
|
||||
end,
|
||||
desc = "Treesitter Search",
|
||||
},
|
||||
{
|
||||
"<c-s>",
|
||||
mode = { "c" },
|
||||
function()
|
||||
require("flash").toggle()
|
||||
end,
|
||||
desc = "Toggle Flash Search",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
local function flash(prompt_bufnr)
|
||||
require("flash").jump({
|
||||
pattern = "^",
|
||||
label = { after = { 0, 0 } },
|
||||
search = {
|
||||
mode = "search",
|
||||
exclude = {
|
||||
function(win)
|
||||
return vim.bo[vim.api.nvim_win_get_buf(win)].filetype ~= "TelescopeResults"
|
||||
end,
|
||||
},
|
||||
},
|
||||
action = function(match)
|
||||
local picker = require("telescope.actions.state").get_current_picker(prompt_bufnr)
|
||||
picker:set_selection(match.pos[1] - 1)
|
||||
end,
|
||||
})
|
||||
end
|
||||
opts.defaults = vim.tbl_deep_extend("force", opts.defaults or {}, {
|
||||
mappings = {
|
||||
n = { s = flash },
|
||||
i = { ["<c-s>"] = flash },
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
40
lua/lazyvim/plugins/extras/editor/leap.lua
Normal file
40
lua/lazyvim/plugins/extras/editor/leap.lua
Normal file
@ -0,0 +1,40 @@
|
||||
return {
|
||||
-- disable flash
|
||||
{ "folke/flash.nvim", enabled = false, optional = true },
|
||||
|
||||
-- easily jump to any location and enhanced f/t motions for Leap
|
||||
{
|
||||
"ggandor/flit.nvim",
|
||||
enabled = true,
|
||||
keys = function()
|
||||
---@type LazyKeys[]
|
||||
local ret = {}
|
||||
for _, key in ipairs({ "f", "F", "t", "T" }) do
|
||||
ret[#ret + 1] = { key, mode = { "n", "x", "o" }, desc = key }
|
||||
end
|
||||
return ret
|
||||
end,
|
||||
opts = { labeled_modes = "nx" },
|
||||
},
|
||||
{
|
||||
"ggandor/leap.nvim",
|
||||
enabled = true,
|
||||
keys = {
|
||||
{ "s", mode = { "n", "x", "o" }, desc = "Leap forward to" },
|
||||
{ "S", mode = { "n", "x", "o" }, desc = "Leap backward to" },
|
||||
{ "gs", mode = { "n", "x", "o" }, desc = "Leap from windows" },
|
||||
},
|
||||
config = function(_, opts)
|
||||
local leap = require("leap")
|
||||
for k, v in pairs(opts) do
|
||||
leap.opts[k] = v
|
||||
end
|
||||
leap.add_default_mappings(true)
|
||||
vim.keymap.del({ "x", "o" }, "x")
|
||||
vim.keymap.del({ "x", "o" }, "X")
|
||||
end,
|
||||
},
|
||||
|
||||
-- makes some plugins dot-repeatable like leap
|
||||
{ "tpope/vim-repeat", event = "VeryLazy" },
|
||||
}
|
42
lua/lazyvim/plugins/extras/formatting/conform.lua
Normal file
42
lua/lazyvim/plugins/extras/formatting/conform.lua
Normal file
@ -0,0 +1,42 @@
|
||||
return {
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
dependencies = { "mason.nvim" },
|
||||
lazy = true,
|
||||
cmd = "ConformInfo",
|
||||
init = function()
|
||||
-- Install the conform formatter on VeryLazy
|
||||
require("lazyvim.util").on_very_lazy(function()
|
||||
require("lazyvim.plugins.lsp.format").custom_format = function(buf)
|
||||
return require("conform").format({ bufnr = buf })
|
||||
end
|
||||
end)
|
||||
end,
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
fish = { "fish_indent" },
|
||||
sh = { "shfmt" },
|
||||
},
|
||||
-- LazyVim will merge the options you set here with builtin formatters.
|
||||
-- You can also define any custom formatters here.
|
||||
---@type table<string,table>
|
||||
formatters = {
|
||||
-- -- Example of using dprint only when a dprint.json file is present
|
||||
-- dprint = {
|
||||
-- condition = function(ctx)
|
||||
-- return vim.fs.find({ "dprint.json" }, { path = ctx.filename, upward = true })[1]
|
||||
-- end,
|
||||
-- },
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
opts.formatters = opts.formatters or {}
|
||||
for f, o in pairs(opts.formatters) do
|
||||
local ok, formatter = pcall(require, "conform.formatters." .. f)
|
||||
opts.formatters[f] = vim.tbl_deep_extend("force", {}, ok and formatter or {}, o)
|
||||
end
|
||||
require("conform").setup(opts)
|
||||
end,
|
||||
},
|
||||
}
|
@ -6,10 +6,35 @@ return {
|
||||
end,
|
||||
},
|
||||
{
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
"nvimtools/none-ls.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
local nls = require("null-ls")
|
||||
table.insert(opts.sources, nls.builtins.formatting.prettierd)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
optional = true,
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
["javascript"] = { { "prettierd", "prettier" } },
|
||||
["javascriptreact"] = { { "prettierd", "prettier" } },
|
||||
["typescript"] = { { "prettierd", "prettier" } },
|
||||
["typescriptreact"] = { { "prettierd", "prettier" } },
|
||||
["vue"] = { { "prettierd", "prettier" } },
|
||||
["css"] = { { "prettierd", "prettier" } },
|
||||
["scss"] = { { "prettierd", "prettier" } },
|
||||
["less"] = { { "prettierd", "prettier" } },
|
||||
["html"] = { { "prettierd", "prettier" } },
|
||||
["json"] = { { "prettierd", "prettier" } },
|
||||
["jsonc"] = { { "prettierd", "prettier" } },
|
||||
["yaml"] = { { "prettierd", "prettier" } },
|
||||
["markdown"] = { { "prettierd", "prettier" } },
|
||||
["markdown.mdx"] = { { "prettierd", "prettier" } },
|
||||
["graphql"] = { { "prettierd", "prettier" } },
|
||||
["handlebars"] = { { "prettierd", "prettier" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -15,29 +15,27 @@ return {
|
||||
lazy = true,
|
||||
config = function() end,
|
||||
opts = {
|
||||
extensions = {
|
||||
inlay_hints = {
|
||||
inline = false,
|
||||
inlay_hints = {
|
||||
inline = false,
|
||||
},
|
||||
ast = {
|
||||
--These require codicons (https://github.com/microsoft/vscode-codicons)
|
||||
role_icons = {
|
||||
type = "",
|
||||
declaration = "",
|
||||
expression = "",
|
||||
specifier = "",
|
||||
statement = "",
|
||||
["template argument"] = "",
|
||||
},
|
||||
ast = {
|
||||
--These require codicons (https://github.com/microsoft/vscode-codicons)
|
||||
role_icons = {
|
||||
type = "",
|
||||
declaration = "",
|
||||
expression = "",
|
||||
specifier = "",
|
||||
statement = "",
|
||||
["template argument"] = "",
|
||||
},
|
||||
kind_icons = {
|
||||
Compound = "",
|
||||
Recovery = "",
|
||||
TranslationUnit = "",
|
||||
PackExpansion = "",
|
||||
TemplateTypeParm = "",
|
||||
TemplateTemplateParm = "",
|
||||
TemplateParamObject = "",
|
||||
},
|
||||
kind_icons = {
|
||||
Compound = "",
|
||||
Recovery = "",
|
||||
TranslationUnit = "",
|
||||
PackExpansion = "",
|
||||
TemplateTypeParm = "",
|
||||
TemplateTemplateParm = "",
|
||||
TemplateParamObject = "",
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -53,14 +51,18 @@ return {
|
||||
keys = {
|
||||
{ "<leader>cR", "<cmd>ClangdSwitchSourceHeader<cr>", desc = "Switch Source/Header (C/C++)" },
|
||||
},
|
||||
root_dir = function(...)
|
||||
-- using a root .clang-format or .clang-tidy file messes up projects, so remove them
|
||||
root_dir = function(fname)
|
||||
return require("lspconfig.util").root_pattern(
|
||||
"compile_commands.json",
|
||||
"compile_flags.txt",
|
||||
"Makefile",
|
||||
"configure.ac",
|
||||
".git"
|
||||
)(...)
|
||||
"configure.in",
|
||||
"config.h.in",
|
||||
"meson.build",
|
||||
"meson_options.txt",
|
||||
"build.ninja"
|
||||
)(fname) or require("lspconfig.util").root_pattern("compile_commands.json", "compile_flags.txt")(
|
||||
fname
|
||||
) or require("lspconfig.util").find_git_ancestor(fname)
|
||||
end,
|
||||
capabilities = {
|
||||
offsetEncoding = { "utf-16" },
|
||||
@ -85,7 +87,7 @@ return {
|
||||
clangd = function(_, opts)
|
||||
local clangd_ext_opts = require("lazyvim.util").opts("clangd_extensions.nvim")
|
||||
require("clangd_extensions").setup(vim.tbl_deep_extend("force", clangd_ext_opts or {}, { server = opts }))
|
||||
return true
|
||||
return false
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
50
lua/lazyvim/plugins/extras/lang/cmake.lua
Normal file
50
lua/lazyvim/plugins/extras/lang/cmake.lua
Normal file
@ -0,0 +1,50 @@
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
if type(opts.ensure_installed) == "table" then
|
||||
vim.list_extend(opts.ensure_installed, { "cmake" })
|
||||
end
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvimtools/none-ls.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
local nls = require("null-ls")
|
||||
opts.sources = opts.sources or {}
|
||||
vim.list_extend(opts.sources, {
|
||||
nls.builtins.diagnostics.cmake_lint,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
optional = true,
|
||||
opts = {
|
||||
linters_by_ft = {
|
||||
cmake = { "cmakelint" },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"mason.nvim",
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, { "cmakelang" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
neocmake = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"Civitasv/cmake-tools.nvim",
|
||||
opts = {},
|
||||
event = "BufRead",
|
||||
},
|
||||
}
|
@ -8,7 +8,15 @@ return {
|
||||
end,
|
||||
},
|
||||
{
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
"mason.nvim",
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, { "hadolint" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvimtools/none-ls.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
local nls = require("null-ls")
|
||||
opts.sources = opts.sources or {}
|
||||
@ -16,12 +24,14 @@ return {
|
||||
nls.builtins.diagnostics.hadolint,
|
||||
})
|
||||
end,
|
||||
dependencies = {
|
||||
"mason.nvim",
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, { "hadolint" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
optional = true,
|
||||
opts = {
|
||||
linters_by_ft = {
|
||||
dockerfile = { "hadolint" },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -15,6 +15,10 @@ return {
|
||||
opts = {
|
||||
servers = {
|
||||
gopls = {
|
||||
keys = {
|
||||
-- Workaround for the lack of a DAP strategy in neotest-go: https://github.com/nvim-neotest/neotest-go/issues/12
|
||||
{ "<leader>td", "<cmd>lua require('dap-go').debug_test()<CR>", desc = "Debug Nearest (Go)" },
|
||||
},
|
||||
settings = {
|
||||
gopls = {
|
||||
gofumpt = true,
|
||||
@ -79,7 +83,8 @@ return {
|
||||
},
|
||||
-- Ensure Go tools are installed
|
||||
{
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
"nvimtools/none-ls.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
if type(opts.sources) == "table" then
|
||||
local nls = require("null-ls")
|
||||
@ -92,6 +97,15 @@ return {
|
||||
end
|
||||
end,
|
||||
},
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
optional = true,
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
go = { "goimports", "gofumpt" },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
optional = true,
|
||||
@ -100,9 +114,13 @@ return {
|
||||
"mason.nvim",
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
table.insert(opts.ensure_installed, "delve")
|
||||
vim.list_extend(opts.ensure_installed, { "gomodifytags", "impl", "gofumpt", "goimports-reviser", "delve" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"leoluz/nvim-dap-go",
|
||||
config = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
|
227
lua/lazyvim/plugins/extras/lang/java.lua
Normal file
227
lua/lazyvim/plugins/extras/lang/java.lua
Normal file
@ -0,0 +1,227 @@
|
||||
local Util = require("lazyvim.util")
|
||||
|
||||
-- This is the same as in lspconfig.server_configurations.jdtls, but avoids
|
||||
-- needing to require that when this module loads.
|
||||
local java_filetypes = { "java" }
|
||||
|
||||
-- Utility function to extend or override a config table, similar to the way
|
||||
-- that Plugin.opts works.
|
||||
---@param config table
|
||||
---@param custom function | table | nil
|
||||
local function extend_or_override(config, custom, ...)
|
||||
if type(custom) == "function" then
|
||||
config = custom(config, ...) or config
|
||||
elseif custom then
|
||||
config = vim.tbl_deep_extend("force", config, custom) --[[@as table]]
|
||||
end
|
||||
return config
|
||||
end
|
||||
|
||||
return {
|
||||
-- Add java to treesitter.
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, { "java" })
|
||||
end,
|
||||
},
|
||||
|
||||
-- Ensure java debugger and test packages are installed.
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
optional = true,
|
||||
dependencies = {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, { "java-test", "java-debug-adapter" })
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Configure nvim-lspconfig to install the server automatically via mason, but
|
||||
-- defer actually starting it to our configuration of nvim-jtdls below.
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
-- make sure mason installs the server
|
||||
servers = {
|
||||
jdtls = {},
|
||||
},
|
||||
setup = {
|
||||
jdtls = function()
|
||||
return true -- avoid duplicate servers
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Set up nvim-jdtls to attach to java files.
|
||||
{
|
||||
"mfussenegger/nvim-jdtls",
|
||||
dependencies = { "folke/which-key.nvim" },
|
||||
ft = java_filetypes,
|
||||
opts = function()
|
||||
return {
|
||||
-- How to find the root dir for a given filename. The default comes from
|
||||
-- lspconfig which provides a function specifically for java projects.
|
||||
root_dir = require("lspconfig.server_configurations.jdtls").default_config.root_dir,
|
||||
|
||||
-- How to find the project name for a given root dir.
|
||||
project_name = function(root_dir)
|
||||
return root_dir and vim.fs.basename(root_dir)
|
||||
end,
|
||||
|
||||
-- Where are the config and workspace dirs for a project?
|
||||
jdtls_config_dir = function(project_name)
|
||||
return vim.fn.stdpath("cache") .. "/jdtls/" .. project_name .. "/config"
|
||||
end,
|
||||
jdtls_workspace_dir = function(project_name)
|
||||
return vim.fn.stdpath("cache") .. "/jdtls/" .. project_name .. "/workspace"
|
||||
end,
|
||||
|
||||
-- How to run jdtls. This can be overridden to a full java command-line
|
||||
-- if the Python wrapper script doesn't suffice.
|
||||
cmd = { "jdtls" },
|
||||
full_cmd = function(opts)
|
||||
local fname = vim.api.nvim_buf_get_name(0)
|
||||
local root_dir = opts.root_dir(fname)
|
||||
local project_name = opts.project_name(root_dir)
|
||||
local cmd = vim.deepcopy(opts.cmd)
|
||||
if project_name then
|
||||
vim.list_extend(cmd, {
|
||||
"-configuration",
|
||||
opts.jdtls_config_dir(project_name),
|
||||
"-data",
|
||||
opts.jdtls_workspace_dir(project_name),
|
||||
})
|
||||
end
|
||||
return cmd
|
||||
end,
|
||||
|
||||
-- These depend on nvim-dap, but can additionally be disabled by setting false here.
|
||||
dap = { hotcodereplace = "auto", config_overrides = {} },
|
||||
test = true,
|
||||
}
|
||||
end,
|
||||
config = function()
|
||||
local opts = Util.opts("nvim-jdtls") or {}
|
||||
|
||||
-- Find the extra bundles that should be passed on the jdtls command-line
|
||||
-- if nvim-dap is enabled with java debug/test.
|
||||
local mason_registry = require("mason-registry")
|
||||
local bundles = {} ---@type string[]
|
||||
if opts.dap and Util.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then
|
||||
local java_dbg_pkg = mason_registry.get_package("java-debug-adapter")
|
||||
local java_dbg_path = java_dbg_pkg:get_install_path()
|
||||
local jar_patterns = {
|
||||
java_dbg_path .. "/extension/server/com.microsoft.java.debug.plugin-*.jar",
|
||||
}
|
||||
-- java-test also depends on java-debug-adapter.
|
||||
if opts.test and mason_registry.is_installed("java-test") then
|
||||
local java_test_pkg = mason_registry.get_package("java-test")
|
||||
local java_test_path = java_test_pkg:get_install_path()
|
||||
vim.list_extend(jar_patterns, {
|
||||
java_test_path .. "/extension/server/*.jar",
|
||||
})
|
||||
end
|
||||
for _, jar_pattern in ipairs(jar_patterns) do
|
||||
for _, bundle in ipairs(vim.split(vim.fn.glob(jar_pattern), "\n")) do
|
||||
table.insert(bundles, bundle)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function attach_jdtls()
|
||||
local fname = vim.api.nvim_buf_get_name(0)
|
||||
|
||||
-- Configuration can be augmented and overridden by opts.jdtls
|
||||
local config = extend_or_override({
|
||||
cmd = opts.full_cmd(opts),
|
||||
root_dir = opts.root_dir(fname),
|
||||
init_options = {
|
||||
bundles = bundles,
|
||||
},
|
||||
-- enable CMP capabilities
|
||||
capabilities = require("cmp_nvim_lsp").default_capabilities(),
|
||||
}, opts.jdtls)
|
||||
|
||||
-- Existing server will be reused if the root_dir matches.
|
||||
require("jdtls").start_or_attach(config)
|
||||
-- not need to require("jdtls.setup").add_commands(), start automatically adds commands
|
||||
end
|
||||
|
||||
-- Attach the jdtls for each java buffer. HOWEVER, this plugin loads
|
||||
-- depending on filetype, so this autocmd doesn't run for the first file.
|
||||
-- For that, we call directly below.
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = java_filetypes,
|
||||
callback = attach_jdtls,
|
||||
})
|
||||
|
||||
-- Setup keymap and dap after the lsp is fully attached.
|
||||
-- https://github.com/mfussenegger/nvim-jdtls#nvim-dap-configuration
|
||||
-- https://neovim.io/doc/user/lsp.html#LspAttach
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
callback = function(args)
|
||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||
if client and client.name == "jdtls" then
|
||||
local wk = require("which-key")
|
||||
wk.register({
|
||||
["<leader>cx"] = { name = "+extract" },
|
||||
["<leader>cxv"] = { require("jdtls").extract_variable_all, "Extract Variable" },
|
||||
["<leader>cxc"] = { require("jdtls").extract_constant, "Extract Constant" },
|
||||
["gs"] = { require("jdtls").super_implementation, "Goto Super" },
|
||||
["gS"] = { require("jdtls.tests").goto_subjects, "Goto Subjects" },
|
||||
["<leader>co"] = { require("jdtls").organize_imports, "Organize Imports" },
|
||||
}, { mode = "n", buffer = args.buf })
|
||||
wk.register({
|
||||
["<leader>c"] = { name = "+code" },
|
||||
["<leader>cx"] = { name = "+extract" },
|
||||
["<leader>cxm"] = {
|
||||
[[<ESC><CMD>lua require('jdtls').extract_method(true)<CR>]],
|
||||
"Extract Method",
|
||||
},
|
||||
["<leader>cxv"] = {
|
||||
[[<ESC><CMD>lua require('jdtls').extract_variable_all(true)<CR>]],
|
||||
"Extract Variable",
|
||||
},
|
||||
["<leader>cxc"] = {
|
||||
[[<ESC><CMD>lua require('jdtls').extract_constant(true)<CR>]],
|
||||
"Extract Constant",
|
||||
},
|
||||
}, { mode = "v", buffer = args.buf })
|
||||
|
||||
if opts.dap and Util.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then
|
||||
-- custom init for Java debugger
|
||||
require("jdtls").setup_dap(opts.dap)
|
||||
require("jdtls.dap").setup_dap_main_class_configs()
|
||||
|
||||
-- Java Test require Java debugger to work
|
||||
if opts.test and mason_registry.is_installed("java-test") then
|
||||
-- custom keymaps for Java test runner (not yet compatible with neotest)
|
||||
wk.register({
|
||||
["<leader>t"] = { name = "+test" },
|
||||
["<leader>tt"] = { require("jdtls.dap").test_class, "Run All Test" },
|
||||
["<leader>tr"] = { require("jdtls.dap").test_nearest_method, "Run Nearest Test" },
|
||||
["<leader>tT"] = { require("jdtls.dap").pick_test, "Run Test" },
|
||||
}, { mode = "n", buffer = args.buf })
|
||||
end
|
||||
end
|
||||
|
||||
-- User can set additional keymaps in opts.on_attach
|
||||
if opts.on_attach then
|
||||
opts.on_attach(args)
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- Avoid race condition by calling attach the first time, since the autocmd won't fire.
|
||||
attach_jdtls()
|
||||
end,
|
||||
},
|
||||
}
|
67
lua/lazyvim/plugins/extras/lang/omnisharp.lua
Normal file
67
lua/lazyvim/plugins/extras/lang/omnisharp.lua
Normal file
@ -0,0 +1,67 @@
|
||||
return {
|
||||
{ "Hoffs/omnisharp-extended-lsp.nvim", lazy = true },
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
if type(opts.ensure_installed) == "table" then
|
||||
vim.list_extend(opts.ensure_installed, { "c_sharp" })
|
||||
end
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvimtools/none-ls.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
local nls = require("null-ls")
|
||||
table.insert(opts.sources, nls.builtins.formatting.csharpier)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
optional = true,
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
cs = { "csharpier" },
|
||||
},
|
||||
formatters = {
|
||||
csharpier = {
|
||||
command = "dotnet-csharpier",
|
||||
args = { "--write-stdout" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
table.insert(opts.ensure_installed, "csharpier")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
omnisharp = {
|
||||
handlers = {
|
||||
["textDocument/definition"] = function(...)
|
||||
return require("omnisharp_extended").handler(...)
|
||||
end,
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"gd",
|
||||
function()
|
||||
require("omnisharp_extended").telescope_lsp_definitions()
|
||||
end,
|
||||
desc = "Goto Definition",
|
||||
},
|
||||
},
|
||||
enable_roslyn_analyzers = true,
|
||||
organize_imports_on_format = true,
|
||||
enable_import_completion = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
31
lua/lazyvim/plugins/extras/lang/python-semshi.lua
Normal file
31
lua/lazyvim/plugins/extras/lang/python-semshi.lua
Normal file
@ -0,0 +1,31 @@
|
||||
return {
|
||||
-- "numiras/semshi",
|
||||
"wookayin/semshi", -- use a maintained fork
|
||||
ft = "python",
|
||||
build = ":UpdateRemotePlugins",
|
||||
init = function()
|
||||
-- Disabled these features better provided by LSP or other more general plugins
|
||||
vim.g["semshi#error_sign"] = false
|
||||
vim.g["semshi#simplify_markup"] = false
|
||||
vim.g["semshi#mark_selected_nodes"] = false
|
||||
vim.g["semshi#update_delay_factor"] = 0.001
|
||||
|
||||
-- This autocmd must be defined in init to take effect
|
||||
vim.api.nvim_create_autocmd({ "VimEnter", "ColorScheme" }, {
|
||||
group = vim.api.nvim_create_augroup("SemanticHighlight", {}),
|
||||
callback = function()
|
||||
-- Only add style, inherit or link to the LSP's colors
|
||||
vim.cmd([[
|
||||
highlight! semshiGlobal gui=italic
|
||||
highlight! semshiImported gui=bold
|
||||
highlight! link semshiParameter @lsp.type.parameter
|
||||
highlight! link semshiParameterUnused DiagnosticUnnecessary
|
||||
highlight! link semshiBuiltin @function.builtin
|
||||
highlight! link semshiAttribute @attribute
|
||||
highlight! link semshiSelf @lsp.type.selfKeyword
|
||||
highlight! link semshiUnresolved @lsp.type.unresolvedReference
|
||||
]])
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
@ -14,16 +14,16 @@ return {
|
||||
pyright = {},
|
||||
ruff_lsp = {},
|
||||
},
|
||||
},
|
||||
setup = {
|
||||
ruff_lsp = function()
|
||||
require("lazyvim.util").on_attach(function(client, _)
|
||||
if client.name == "ruff_lsp" then
|
||||
-- Disable hover in favor of Pyright
|
||||
client.server_capabilities.hoverProvider = false
|
||||
end
|
||||
end)
|
||||
end,
|
||||
setup = {
|
||||
ruff_lsp = function()
|
||||
require("lazyvim.util").on_attach(function(client, _)
|
||||
if client.name == "ruff_lsp" then
|
||||
-- Disable hover in favor of Pyright
|
||||
client.server_capabilities.hoverProvider = false
|
||||
end
|
||||
end)
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -61,7 +61,15 @@ return {
|
||||
{
|
||||
"linux-cultist/venv-selector.nvim",
|
||||
cmd = "VenvSelect",
|
||||
opts = {},
|
||||
opts = {
|
||||
name = {
|
||||
"venv",
|
||||
".venv",
|
||||
"env",
|
||||
".env",
|
||||
},
|
||||
dap_enabled = true, -- Ensure that the venv selector affect PythonPath in nvim-dap as well!
|
||||
},
|
||||
keys = { { "<leader>cv", "<cmd>:VenvSelect<cr>", desc = "Select VirtualEnv" } },
|
||||
},
|
||||
}
|
||||
|
@ -51,8 +51,14 @@ return {
|
||||
local codelldb = mason_registry.get_package("codelldb")
|
||||
local extension_path = codelldb:get_install_path() .. "/extension/"
|
||||
local codelldb_path = extension_path .. "adapter/codelldb"
|
||||
local liblldb_path = vim.fn.has("mac") == 1 and extension_path .. "lldb/lib/liblldb.dylib"
|
||||
or extension_path .. "lldb/lib/liblldb.so"
|
||||
local liblldb_path = ""
|
||||
if vim.loop.os_uname().sysname:find("Windows") then
|
||||
liblldb_path = extension_path .. "lldb\\bin\\liblldb.dll"
|
||||
elseif vim.fn.has("mac") == 1 then
|
||||
liblldb_path = extension_path .. "lldb/lib/liblldb.dylib"
|
||||
else
|
||||
liblldb_path = extension_path .. "lldb/lib/liblldb.so"
|
||||
end
|
||||
adapter = require("rust-tools.dap").get_codelldb_adapter(codelldb_path, liblldb_path)
|
||||
end
|
||||
return {
|
||||
|
@ -1,3 +1,9 @@
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "hcl", "terraform" },
|
||||
desc = "terraform/hcl commentstring configuration",
|
||||
command = "setlocal commentstring=#\\ %s",
|
||||
})
|
||||
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
@ -19,7 +25,8 @@ return {
|
||||
},
|
||||
},
|
||||
{
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
"nvimtools/none-ls.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
if type(opts.sources) == "table" then
|
||||
local null_ls = require("null-ls")
|
||||
@ -30,4 +37,25 @@ return {
|
||||
end
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
optional = true,
|
||||
opts = {
|
||||
linters_by_ft = {
|
||||
terraform = { "terraform_validate" },
|
||||
tf = { "terraform_validate" },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
optional = true,
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
terraform = { "terraform_fmt" },
|
||||
tf = { "terraform_fmt" },
|
||||
["terraform-vars"] = { "terraform_fmt" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
58
lua/lazyvim/plugins/extras/lang/tex.lua
Normal file
58
lua/lazyvim/plugins/extras/lang/tex.lua
Normal file
@ -0,0 +1,58 @@
|
||||
return {
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
optional = true,
|
||||
opts = {
|
||||
defaults = {
|
||||
["<localLeader>l"] = { name = "+vimtex" },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Add BibTeX/LaTeX to treesitter
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
if type(opts.ensure_installed) == "table" then
|
||||
vim.list_extend(opts.ensure_installed, { "bibtex", "latex" })
|
||||
end
|
||||
if type(opts.highlight.disable) == "table" then
|
||||
vim.list_extend(opts.highlight.disable, { "latex" })
|
||||
else
|
||||
opts.highlight.disable = { "latex" }
|
||||
end
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"lervag/vimtex",
|
||||
lazy = false, -- lazy-loading will disable inverse search
|
||||
config = function()
|
||||
vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
group = vim.api.nvim_create_augroup("lazyvim_vimtex_conceal", { clear = true }),
|
||||
pattern = { "bib", "tex" },
|
||||
callback = function()
|
||||
vim.wo.conceallevel = 2
|
||||
end,
|
||||
})
|
||||
|
||||
vim.g.vimtex_mappings_disable = { ["n"] = { "K" } } -- disable `K` as it conflicts with LSP hover
|
||||
vim.g.vimtex_quickfix_method = vim.fn.executable("pplatex") == 1 and "pplatex" or "latexlog"
|
||||
end,
|
||||
},
|
||||
|
||||
-- Correctly setup lspconfig for LaTeX 🚀
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
optional = true,
|
||||
opts = {
|
||||
servers = {
|
||||
texlab = {
|
||||
keys = {
|
||||
{ "<Leader>K", "<plug>(vimtex-doc-package)", desc = "Vimtex Docs", silent = true },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
@ -13,15 +13,25 @@ return {
|
||||
-- correctly setup lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = { "jose-elias-alvarez/typescript.nvim" },
|
||||
opts = {
|
||||
-- make sure mason installs the server
|
||||
servers = {
|
||||
---@type lspconfig.options.tsserver
|
||||
tsserver = {
|
||||
keys = {
|
||||
{ "<leader>co", "<cmd>TypescriptOrganizeImports<CR>", desc = "Organize Imports" },
|
||||
{ "<leader>cR", "<cmd>TypescriptRenameFile<CR>", desc = "Rename File" },
|
||||
{
|
||||
"<leader>co",
|
||||
function()
|
||||
vim.lsp.buf.code_action({
|
||||
apply = true,
|
||||
context = {
|
||||
only = { "source.organizeImports.ts" },
|
||||
diagnostics = {},
|
||||
},
|
||||
})
|
||||
end,
|
||||
desc = "Organize Imports",
|
||||
},
|
||||
},
|
||||
settings = {
|
||||
typescript = {
|
||||
@ -44,20 +54,8 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
setup = {
|
||||
tsserver = function(_, opts)
|
||||
require("typescript").setup({ server = opts })
|
||||
return true
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sources, require("typescript.extensions.null-ls.code-actions"))
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
optional = true,
|
||||
|
71
lua/lazyvim/plugins/extras/lang/yaml.lua
Normal file
71
lua/lazyvim/plugins/extras/lang/yaml.lua
Normal file
@ -0,0 +1,71 @@
|
||||
return {
|
||||
|
||||
-- add yaml specific modules to treesitter
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
if type(opts.ensure_installed) == "table" then
|
||||
vim.list_extend(opts.ensure_installed, { "yaml" })
|
||||
end
|
||||
end,
|
||||
},
|
||||
|
||||
-- correctly setup lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"b0o/SchemaStore.nvim",
|
||||
version = false, -- last release is way too old
|
||||
},
|
||||
opts = {
|
||||
-- make sure mason installs the server
|
||||
servers = {
|
||||
yamlls = {
|
||||
-- Have to add this for yamlls to understand that we support line folding
|
||||
capabilities = {
|
||||
textDocument = {
|
||||
foldingRange = {
|
||||
dynamicRegistration = false,
|
||||
lineFoldingOnly = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
-- lazy-load schemastore when needed
|
||||
on_new_config = function(new_config)
|
||||
new_config.settings.yaml.schemas = new_config.settings.yaml.schemas or {}
|
||||
vim.list_extend(new_config.settings.yaml.schemas, require("schemastore").yaml.schemas())
|
||||
end,
|
||||
settings = {
|
||||
redhat = { telemetry = { enabled = false } },
|
||||
yaml = {
|
||||
keyOrdering = false,
|
||||
format = {
|
||||
enable = true,
|
||||
},
|
||||
validate = true,
|
||||
schemaStore = {
|
||||
-- Must disable built-in schemaStore support to use
|
||||
-- schemas from SchemaStore.nvim plugin
|
||||
enable = false,
|
||||
-- Avoid TypeError: Cannot read properties of undefined (reading 'length')
|
||||
url = "",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
setup = {
|
||||
yamlls = function()
|
||||
-- Neovim < 0.10 does not have dynamic registration for formatting
|
||||
if vim.fn.has("nvim-0.10") == 0 then
|
||||
require("lazyvim.util").on_attach(function(client, _)
|
||||
if client.name == "yamlls" then
|
||||
client.server_capabilities.documentFormattingProvider = true
|
||||
end
|
||||
end)
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
66
lua/lazyvim/plugins/extras/linting/nvim-lint.lua
Normal file
66
lua/lazyvim/plugins/extras/linting/nvim-lint.lua
Normal file
@ -0,0 +1,66 @@
|
||||
return {
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
event = "BufReadPost",
|
||||
opts = {
|
||||
-- Event to trigger linters
|
||||
events = { "BufWritePost", "BufReadPost", "InsertLeave" },
|
||||
linters_by_ft = {
|
||||
fish = { "fish" },
|
||||
},
|
||||
-- LazyVim extension to easily override linter options
|
||||
-- or add custom linters.
|
||||
---@type table<string,table>
|
||||
linters = {
|
||||
-- -- Example of using selene only when a selene.toml file is present
|
||||
-- selene = {
|
||||
-- -- `condition` is another LazyVim extension that allows you to
|
||||
-- -- dynamically enable/disable linters based on the context.
|
||||
-- condition = function(ctx)
|
||||
-- return vim.fs.find({ "selene.toml" }, { path = ctx.filename, upward = true })[1]
|
||||
-- end,
|
||||
-- },
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
local M = {}
|
||||
|
||||
local lint = require("lint")
|
||||
for name, linter in pairs(opts.linters) do
|
||||
lint.linters[name] = vim.tbl_deep_extend("force", lint.linters[name] or {}, linter)
|
||||
end
|
||||
lint.linters_by_ft = opts.linters_by_ft
|
||||
|
||||
function M.debounce(ms, fn)
|
||||
local timer = vim.loop.new_timer()
|
||||
return function(...)
|
||||
local argv = { ... }
|
||||
timer:start(ms, 0, function()
|
||||
timer:stop()
|
||||
vim.schedule_wrap(fn)(unpack(argv))
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
function M.lint()
|
||||
local lint = require("lint")
|
||||
local names = lint.linters_by_ft[vim.bo.filetype] or {}
|
||||
local ctx = { filename = vim.api.nvim_buf_get_name(0) }
|
||||
ctx.dirname = vim.fn.fnamemodify(ctx.filename, ":h")
|
||||
names = vim.tbl_filter(function(name)
|
||||
local linter = lint.linters[name]
|
||||
return linter and not (linter.condition and not linter.condition(ctx))
|
||||
end, names)
|
||||
|
||||
if #names > 0 then
|
||||
lint.try_lint(names)
|
||||
end
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd(opts.events, {
|
||||
group = vim.api.nvim_create_augroup("nvim-lint", { clear = true }),
|
||||
callback = M.debounce(100, M.lint),
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
@ -5,6 +5,11 @@ local M = {}
|
||||
---@type PluginLspOpts
|
||||
M.opts = nil
|
||||
|
||||
-- Allow plugins to set a custom formatter for a buffer.
|
||||
-- See the conform extra for an example.
|
||||
---@type fun(bufnr:number):boolean
|
||||
M.custom_format = nil
|
||||
|
||||
function M.enabled()
|
||||
return M.opts.autoformat
|
||||
end
|
||||
@ -30,6 +35,12 @@ function M.format(opts)
|
||||
return
|
||||
end
|
||||
|
||||
if M.custom_format and Util.try(function()
|
||||
M.custom_format(buf)
|
||||
end, { msg = "Custom formatter failed" }) then
|
||||
return
|
||||
end
|
||||
|
||||
local formatters = M.get_formatters(buf)
|
||||
local client_ids = vim.tbl_map(function(client)
|
||||
return client.id
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user