Compare commits

..

133 Commits

Author SHA1 Message Date
6b4c872f2d chore(main): release 9.2.0 (#1600)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-06 15:53:13 +02:00
6e0e01f5b4 fix(config): fixed issues related to LazyFile. Fixes #1601 2023-10-06 15:40:27 +02:00
a1c5886947 feat(conform): ignore formatting errors for injected languages and fix condition example 2023-10-06 09:26:14 +02:00
8a1de2b90a fix(elixir): only enable credo when installed. Fixes #1546 2023-10-06 09:18:07 +02:00
3823f177e9 chore(build): auto-generate vimdoc 2023-10-06 07:03:24 +00:00
f1ea518e29 fix(which-key): change surround group key (#1598) 2023-10-06 09:02:45 +02:00
cce46cd640 chore(main): release 9.1.1 (#1597)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-06 01:02:16 +02:00
337cfdbec4 fix(ui): include extmark signs in signcolumn. Fixes #1596 2023-10-05 23:34:32 +02:00
b2af941290 ci: disable blank issues 2023-10-05 16:33:01 +02:00
f219364656 chore(main): release 9.1.0 (#1592)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-05 16:03:46 +02:00
6f1cdfe4bd feat(dashboard): add projects if enabled (#1595) 2023-10-05 15:59:44 +02:00
1eb019274b fix(options): set default laststatus=3 and set it to 0 before loading dashboard to prevent flickering 2023-10-05 10:43:21 +02:00
d6b56c075e fix(dasboard): disable alpha only once 2023-10-05 09:53:50 +02:00
6f6d587998 chore(build): auto-generate vimdoc 2023-10-05 06:08:38 +00:00
d3e7f7717e fix(tailwind): allow overriding filetypes. Fixes #1590 2023-10-05 08:07:56 +02:00
49b91b6b1f chore(main): release 9.0.2 (#1589)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-04 21:10:17 +02:00
86de423ef0 fix(treesitter): dont enable ]c, [c, ... in diff-mode 2023-10-04 21:00:32 +02:00
0cc80b1b05 fix(autocmds): last_loc autocmd didn't work correctly for first opened file 2023-10-04 20:40:11 +02:00
7272b3e4b5 fix(bufferline): load bufferline on VeryLazy. Fixes #1587 2023-10-04 20:04:56 +02:00
b58446f7b3 chore(main): release 9.0.1 (#1585)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-04 18:09:31 +02:00
d989ecc943 fix(options): only enable treesitter foldexpr on nightly. Fixes #1581 2023-10-04 18:07:21 +02:00
3849e0150b fix(ui): show global marks in the correct buffer only 2023-10-04 17:53:00 +02:00
1abcffbfd9 fix(alpha): use <cmd> instead of : for shortcuts 2023-10-04 16:44:29 +02:00
c490c61d07 chore(main): release 9.0.0 (#1576)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-04 15:03:00 +02:00
79010ae671 fix(nvim-lint): dont try merging function linters 2023-10-04 14:45:45 +02:00
f4750859f2 fix(conform): dont try merging function formatters. Fixes #1582 2023-10-04 14:44:24 +02:00
9f034ab106 fix(conform): dont try to merge formatter functions 2023-10-04 14:41:00 +02:00
2f16a7b2d9 perf(config): add LazyVim to the rtp early for faster spec loading 2023-10-04 13:44:03 +02:00
3833a7d1ce style: removed dead code 2023-10-04 13:19:12 +02:00
bd2ac542a0 feat(ui): show alpha marks in statuscolumn 2023-10-04 12:48:37 +02:00
35053290bf fix(ui): use custom fold when treesitter foldtext returns a string 2023-10-04 12:47:24 +02:00
417de0193d feat(extras): added extra for dashboard.nvim 2023-10-04 12:44:01 +02:00
a12d4bd4e4 chore(build): auto-generate vimdoc 2023-10-04 08:49:22 +00:00
afc8e7f8ca fix(autocmds): retore last location for correct buffer 2023-10-04 10:48:20 +02:00
936d74bb61 perf: added support for LazyFile event that properly loads file based plugins without blocking the ui 2023-10-04 10:45:10 +02:00
f15dd301e5 style: fixed lua annotations 2023-10-04 10:43:44 +02:00
d28c69e49e feat(mini.surround)!: default surround mappings are now gs instead of gz (unless you enabled the leap extra) 2023-10-04 00:25:44 +02:00
0e66ef8393 feat(treesitter): added ]f, [f, ]F, [F, ]c, ]C, [c, [C for treesitter-textobjects 2023-10-04 00:21:47 +02:00
626ae1338a feat(typescript): add typescriptreact/javascriptreact to types (#1574)
* feat(typescript): add typescriptreact/javascriptreact to types

* remove unneeded values

* revert settings change
2023-10-03 23:40:32 +02:00
5f0713d2b6 feat(treesitter): map vim to @namespace.builtin 2023-10-03 20:17:33 +02:00
758520dcbb chore(main): release 8.4.4 (#1575)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-03 19:00:20 +02:00
ccff8683ba fix(ui): work-around for telescope issue with treesitter folds 2023-10-03 18:57:05 +02:00
0e16033e9c chore(main): release 8.4.3 (#1573)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-03 18:30:22 +02:00
6cf6b0a624 fix(ui): always pad to 2 cells for status column icons. Fixes #1571 2023-10-03 18:28:05 +02:00
e08813fa11 chore(main): release 8.4.2 (#1570)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-03 18:22:19 +02:00
e105c9daf6 perf(options): better detection for foldtext,statuscolumn,folexpr support 2023-10-03 18:19:32 +02:00
1b74d67a0d fix(ui): fixed foldtext on Neovim < 0.10 2023-10-03 17:35:14 +02:00
b1ad48067e fix(nvim-lint): dont evaluate conditions for linter functions. Fixes #1569 2023-10-03 16:32:05 +02:00
63467c1f21 chore(main): release 8.4.1 (#1568)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-03 15:55:11 +02:00
13e9f6e6b5 fix(ui): check folds of the statuscolumn win instead of current win 2023-10-03 15:53:11 +02:00
6428fc167c chore(main): release 8.4.0 (#1564)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-03 15:10:22 +02:00
762017dc35 fix(ui): better fallback for foldtext when buffer does not have TreeSitter 2023-10-03 15:05:01 +02:00
afbe2043a7 fix(ui): Neovim < 0.10 2023-10-03 14:59:26 +02:00
f1ce07510d feat(ui): fancy fold text 2023-10-03 14:57:59 +02:00
364bcf325d feat(ui): fancy status column 2023-10-03 14:56:55 +02:00
3f868aa825 feat(keymaps): added toggle for relative line numbers 2023-10-03 14:56:55 +02:00
fecc5faca2 chore(build): auto-generate vimdoc 2023-10-03 06:02:56 +00:00
19926d2848 feat(options): enabled treesitter folding and foldtext when available 2023-10-03 08:02:15 +02:00
450e0c6beb feat(options): enable smoothscroll on nightly 2023-10-03 08:02:15 +02:00
4e277fcb8f chore(main): release 8.3.0 (#1553)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-02 23:00:47 +02:00
86d3694672 feat(conform): added new keymap (leader-cF) to format injected languages 2023-10-02 20:59:00 +02:00
7c5a458761 fix(indent-blankline): set config.indent.tab_char (#1552)
See lukas-reineke/indent-blankline.nvim#665.
2023-10-02 12:23:08 +02:00
ecac59c982 chore(main): release 8.2.0 (#1551)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-02 11:27:12 +02:00
4ff51cd678 feat(mini.files): added lsp rename support to mini.files 2023-10-02 11:02:56 +02:00
fe341e6b97 chore(build): auto-generate vimdoc 2023-10-02 05:41:09 +00:00
0ca732e0ef chore(main): release 8.1.0 (#1547)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-02 07:40:30 +02:00
766d5e5bf7 feat(conform): set vim.opt.formatexpr 2023-10-01 23:36:26 +02:00
9b16770573 fix(format): moved formatting keymap to lua/lazyvim/config/keymaps.lua 2023-10-01 23:31:24 +02:00
e36f7d811c feat(format): show warning when no formatter ran when using the format keymap 2023-10-01 23:30:56 +02:00
0b04e3908c chore(format): removed format_notify option 2023-10-01 23:30:26 +02:00
e8ab2ff5b6 feat(go): add goimports (#1549) 2023-10-01 23:01:43 +02:00
3acdac917b docs: LazyVim now requires Neovim >= 0.9.0 (#1548)
See: bfe04222fe
2023-10-01 21:01:40 +02:00
2ffd629cc7 feat(elixir): Add credo if none-ls is used (#1546) 2023-10-01 19:48:09 +02:00
dd95de5dbe chore(main): release 8.0.0 (#1542)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-01 16:28:37 +02:00
9d17c43087 perf: dont't load schemastore as an lspconfig dep 2023-10-01 16:21:18 +02:00
2aea5c7210 feat: show error and exit Neovim when version is too old 2023-10-01 14:18:25 +02:00
9935dc3944 fix: cleanup all Neovim < 0.9.0 code 2023-10-01 14:18:25 +02:00
b8ffa5261a chore(build): auto-generate vimdoc 2023-10-01 12:01:59 +00:00
bfe04222fe docs!: LazyVim now requires Neovim >= 0.9.0 2023-10-01 14:01:12 +02:00
f7655a83c5 chore(build): auto-generate vimdoc 2023-10-01 08:22:12 +00:00
9bb4e8755f feat: replace Copilot icon with logo (#1539) 2023-10-01 10:21:35 +02:00
4a2c89cd1d chore(main): release 7.0.3 (#1536)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-01 00:29:14 +02:00
964dd6c4b2 fix(extras.go): remove unneeded formatters since gopls handles them (#1535)
* fix(extras.go): remove unneeded formatters since gopls handles them

* add optional back
2023-09-30 19:30:52 +02:00
0136bfa4b5 style: format 2023-09-30 18:10:29 +02:00
5eca3dc3bb chore(main): release 7.0.2 (#1532)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-30 18:08:39 +02:00
7821c0e851 fix(python): make venv-selector dap_enabled conditional on nvim-dap-python (#1529) 2023-09-30 17:51:47 +02:00
bd48536335 chore(build): auto-generate vimdoc 2023-09-30 15:48:50 +00:00
1c878b9d06 fix(format): allow custom_format to return early (#1531) 2023-09-30 17:48:19 +02:00
6f9adbd4fb chore(main): release 7.0.1 (#1523)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-29 16:52:39 +02:00
ff5f5886db fix(nvim-lint): dont use default configured linters from nvim-lint 2023-09-29 16:49:59 +02:00
300350686f chore(main): release 7.0.0 (#1521)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-29 16:14:13 +02:00
718c5c6036 fix(docker): put hadolint in its own spec 2023-09-29 16:09:33 +02:00
31d913697b fix(nvim-lint): use linters for both custom and overriding linters 2023-09-29 15:58:44 +02:00
6bb0d1b66f fix(conform): use formatters for both custom and overriding formatters 2023-09-29 15:56:20 +02:00
0e5ff5c0ab fix(format): wrap custom formatter with error handler 2023-09-29 15:55:29 +02:00
886d49eb89 style: comment the selene example 2023-09-29 15:15:38 +02:00
0f7a009d1c docs: added more docs to nvim-lint extensions 2023-09-29 15:07:29 +02:00
05f45bb720 feat(extras): added extra for nvim-lint 2023-09-29 15:05:01 +02:00
9762e7e431 feat(neo-tree): added support for LSP renaming to NeoTree 2023-09-29 14:14:57 +02:00
aab365a9f8 fix(typescript)!: removed typescript.nvim since it's deprecated 2023-09-29 13:57:04 +02:00
f61a243d1a feat(extras): added conform.nvim extra you can use instead of null-ls/none-ls 2023-09-29 13:37:00 +02:00
6b05ed7dcd fix: remove deprecated leap/flit code checks 2023-09-29 12:00:56 +02:00
a7f68e5e37 refactor(none-ls): make all null-ls usages in extras optional 2023-09-29 12:00:56 +02:00
3c448a1be1 chore(build): auto-generate vimdoc 2023-09-29 09:53:29 +00:00
7cac6f064c feat(null-ls)!: use none-ls instead of null-ls (#1517)
* FEATURE: use none-ls instead of null-ls

Fixes #1516

* fix(none-ls): automatically migrate null-ls to none-ls

* feat(config): show warning if user config contains renamed references

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2023-09-29 11:52:45 +02:00
274649e923 chore(main): release 6.4.3 (#1514)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-28 12:04:36 +02:00
a3011daf40 style: better plugin docs 2023-09-28 11:36:58 +02:00
fa6cbfc602 fix(lsp): don't install jsonls by default. It's part of the json extra 2023-09-28 11:33:45 +02:00
d012a1acb8 docs(telescope): documented Telescope find files. Fixes #1425 2023-09-28 11:24:20 +02:00
d03f708cd3 chore: removed flash extra since this is now the default 2023-09-28 11:22:19 +02:00
017582c05a fix(telescope): typo 2023-09-28 11:10:25 +02:00
13bf7977a4 fix(telescope): replace anonymous functions in mappings by named functions (#1294) 2023-09-28 11:08:43 +02:00
74786c21d7 fix(ibl): use default hl groups 2023-09-28 10:54:30 +02:00
7f5051ef72 fix(yamlls): work-around for yaml formatting on Neovim < 0.10. Fixes #1435 2023-09-28 09:00:58 +02:00
b220e54159 fix(telescope): add enums and consts to search symbols (#1512) 2023-09-28 08:41:55 +02:00
b25559d397 chore(main): release 6.4.2 (#1510)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-28 07:46:31 +02:00
ee068d8399 chore(build): auto-generate vimdoc 2023-09-28 05:41:46 +00:00
db86635e32 fix(indent-blankline): upgrade ibl config to v3 2023-09-28 07:41:00 +02:00
a1ab7c6e32 chore(main): release 6.4.1 (#1505)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-27 14:48:32 +02:00
b30ff44af5 chore(build): auto-generate vimdoc 2023-09-27 11:57:42 +00:00
36d6a7fe4f fix(dap): revert loading vscode launch files. Add it to your own config when needed. Fixes #1503 2023-09-27 13:56:53 +02:00
50401d358b chore(main): release 6.4.0 (#1495)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-26 14:59:08 +02:00
7c79cfe073 fix(mini.comment): better lua pattern for tags. Fixes #1413 2023-09-26 14:16:22 +02:00
f1af34e885 fix(dap): move launchjs code from java to dap 2023-09-26 13:38:48 +02:00
5dc4ce3e4a feat(java): support vscode launch json in Java (#1422)
* feat(java): support vscode launch json

* feat(java): support vscode launch json
2023-09-26 13:36:22 +02:00
ea930e3545 fix(python): use venv for DAP Python (#1457)
dap_enabled = true, -- Ensure that the venv selector affect PythonPath in nvim-dap as well! (in venv-selector.nvim)
2023-09-26 13:35:27 +02:00
a7f971f30e feat(mini-pairs): add toggle mini pairs keymap and function (#1456) 2023-09-26 13:34:28 +02:00
e54d0dde62 feat(autocmds): close InspectTree window with q 2023-09-26 13:27:18 +02:00
0bff29c07a fix: disable context commentstring autocmd 2023-09-26 13:24:03 +02:00
afdcec5b4a feat(extras): added simple csharp extra 2023-09-26 10:58:35 +02:00
f892ba5cff fix: always lazy load keymaps. fixes #1485 2023-09-26 10:57:50 +02:00
a180c3097c chore(build): auto-generate vimdoc 2023-09-26 08:14:33 +00:00
b8d3a1c2cd Revert "fix(yanky): don't override c-p insert mode telescope mapping. Fixes #1007"
This reverts commit 8b1e7976a004d7e0cbaec37546d2889ddab48bbb.
2023-09-26 10:13:00 +02:00
44 changed files with 1262 additions and 290 deletions

1
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1 @@
blank_issues_enabled: false

View File

@ -1,5 +1,293 @@
# Changelog
## [9.2.0](https://github.com/LazyVim/LazyVim/compare/v9.1.1...v9.2.0) (2023-10-06)
### Features
* **conform:** ignore formatting errors for injected languages and fix condition example ([a1c5886](https://github.com/LazyVim/LazyVim/commit/a1c5886947e20059ad7802e71e0a82b413af6657))
### Bug Fixes
* **config:** fixed issues related to LazyFile. Fixes [#1601](https://github.com/LazyVim/LazyVim/issues/1601) ([6e0e01f](https://github.com/LazyVim/LazyVim/commit/6e0e01f5b4dd7e97abbb50241a207d36d0ce9cd5))
* **elixir:** only enable credo when installed. Fixes [#1546](https://github.com/LazyVim/LazyVim/issues/1546) ([8a1de2b](https://github.com/LazyVim/LazyVim/commit/8a1de2b90a699bdfee704f3d4422e2ced18ae0f3))
* **which-key:** change surround group key ([#1598](https://github.com/LazyVim/LazyVim/issues/1598)) ([f1ea518](https://github.com/LazyVim/LazyVim/commit/f1ea518e29a601b773d9c9c94489fc9d273c2dea))
## [9.1.1](https://github.com/LazyVim/LazyVim/compare/v9.1.0...v9.1.1) (2023-10-05)
### Bug Fixes
* **ui:** include extmark signs in signcolumn. Fixes [#1596](https://github.com/LazyVim/LazyVim/issues/1596) ([337cfdb](https://github.com/LazyVim/LazyVim/commit/337cfdbec43003cb2c269e59b27167aa752bf41f))
## [9.1.0](https://github.com/LazyVim/LazyVim/compare/v9.0.2...v9.1.0) (2023-10-05)
### Features
* **dashboard:** add projects if enabled ([#1595](https://github.com/LazyVim/LazyVim/issues/1595)) ([6f1cdfe](https://github.com/LazyVim/LazyVim/commit/6f1cdfe4bd2ec9a85c92a312fa52ba86e02d1a9f))
### Bug Fixes
* **dasboard:** disable alpha only once ([d6b56c0](https://github.com/LazyVim/LazyVim/commit/d6b56c075e88ce12e9e16fb2eeeea38fb7853600))
* **options:** set default laststatus=3 and set it to 0 before loading dashboard to prevent flickering ([1eb0192](https://github.com/LazyVim/LazyVim/commit/1eb019274b5564e66ac6c7e119c140bae262e10c))
* **tailwind:** allow overriding filetypes. Fixes [#1590](https://github.com/LazyVim/LazyVim/issues/1590) ([d3e7f77](https://github.com/LazyVim/LazyVim/commit/d3e7f7717e960bb883b35e9a75badfd5b938cace))
## [9.0.2](https://github.com/LazyVim/LazyVim/compare/v9.0.1...v9.0.2) (2023-10-04)
### Bug Fixes
* **autocmds:** last_loc autocmd didn't work correctly for first opened file ([0cc80b1](https://github.com/LazyVim/LazyVim/commit/0cc80b1b0594516ccc2c1e6c9a60c84012a29abb))
* **bufferline:** load bufferline on VeryLazy. Fixes [#1587](https://github.com/LazyVim/LazyVim/issues/1587) ([7272b3e](https://github.com/LazyVim/LazyVim/commit/7272b3e4b5b626597658dabf774998057892d066))
* **treesitter:** dont enable ]c, [c, ... in diff-mode ([86de423](https://github.com/LazyVim/LazyVim/commit/86de423ef029abd085531e18b197a5f90e201d98))
## [9.0.1](https://github.com/LazyVim/LazyVim/compare/v9.0.0...v9.0.1) (2023-10-04)
### Bug Fixes
* **alpha:** use `&lt;cmd&gt;` instead of `:` for shortcuts ([1abcffb](https://github.com/LazyVim/LazyVim/commit/1abcffbfd940588fa67cc7438ce2115df1c58e92))
* **options:** only enable treesitter `foldexpr` on nightly. Fixes [#1581](https://github.com/LazyVim/LazyVim/issues/1581) ([d989ecc](https://github.com/LazyVim/LazyVim/commit/d989ecc943b3240db0be3aa0369b96089cee4b40))
* **ui:** show global marks in the correct buffer only ([3849e01](https://github.com/LazyVim/LazyVim/commit/3849e0150b0a616dbd6e7e12ec5025aff6c81d39))
## [9.0.0](https://github.com/LazyVim/LazyVim/compare/v8.4.4...v9.0.0) (2023-10-04)
### ⚠ BREAKING CHANGES
* **mini.surround:** default surround mappings are now gs instead of gz (unless you enabled the leap extra)
### Features
* **extras:** added extra for dashboard.nvim ([417de01](https://github.com/LazyVim/LazyVim/commit/417de0193dd0663100a8b1eaedc2bc4976712c61))
* **mini.surround:** default surround mappings are now gs instead of gz (unless you enabled the leap extra) ([d28c69e](https://github.com/LazyVim/LazyVim/commit/d28c69e49eab62b45f7d1562b3bc00afee5fbb65))
* **treesitter:** added ]f, [f, ]F, [F, ]c, ]C, [c, [C for treesitter-textobjects ([0e66ef8](https://github.com/LazyVim/LazyVim/commit/0e66ef83934eb62ee2237e331dcbc0a22b809aae))
* **treesitter:** map `vim` to `[@namespace](https://github.com/namespace).builtin` ([5f0713d](https://github.com/LazyVim/LazyVim/commit/5f0713d2b612a814586bffec39700ab6a30dc0ea))
* **typescript:** add typescriptreact/javascriptreact to types ([#1574](https://github.com/LazyVim/LazyVim/issues/1574)) ([626ae13](https://github.com/LazyVim/LazyVim/commit/626ae1338a88f6cd8962d6c20bd79953a67f0b72))
* **ui:** show alpha marks in statuscolumn ([bd2ac54](https://github.com/LazyVim/LazyVim/commit/bd2ac542a0bb4c58237cd6ca8848063bd20a5282))
### Bug Fixes
* **autocmds:** retore last location for correct buffer ([afc8e7f](https://github.com/LazyVim/LazyVim/commit/afc8e7f8cac06335efd12ec5f71cabb1f38a09b0))
* **conform:** dont try merging function formatters. Fixes [#1582](https://github.com/LazyVim/LazyVim/issues/1582) ([f475085](https://github.com/LazyVim/LazyVim/commit/f4750859f2c2c9a41b3974ac05962ce9648d6c16))
* **conform:** dont try to merge formatter functions ([9f034ab](https://github.com/LazyVim/LazyVim/commit/9f034ab10650e306e178d5189ee9214a52f2e8e5))
* **nvim-lint:** dont try merging function linters ([79010ae](https://github.com/LazyVim/LazyVim/commit/79010ae671035d8ed0040ce51df4fb59ec3962f8))
* **ui:** use custom fold when treesitter foldtext returns a string ([3505329](https://github.com/LazyVim/LazyVim/commit/35053290bf957a230c8758d31ba3997c0699f5f9))
### Performance Improvements
* added support for `LazyFile` event that properly loads file based plugins without blocking the ui ([936d74b](https://github.com/LazyVim/LazyVim/commit/936d74bb6127721eeefa62e5f697d9693ab04fdd))
* **config:** add LazyVim to the rtp early for faster spec loading ([2f16a7b](https://github.com/LazyVim/LazyVim/commit/2f16a7b2d96e912c9ab50ce99d9994413ff3678d))
## [8.4.4](https://github.com/LazyVim/LazyVim/compare/v8.4.3...v8.4.4) (2023-10-03)
### Bug Fixes
* **ui:** work-around for telescope issue with treesitter folds ([ccff868](https://github.com/LazyVim/LazyVim/commit/ccff8683ba957250d71ef66429fc877f0ee5cedb))
## [8.4.3](https://github.com/LazyVim/LazyVim/compare/v8.4.2...v8.4.3) (2023-10-03)
### Bug Fixes
* **ui:** always pad to 2 cells for status column icons. Fixes [#1571](https://github.com/LazyVim/LazyVim/issues/1571) ([6cf6b0a](https://github.com/LazyVim/LazyVim/commit/6cf6b0a6241c659113f5646ff64fba7dbf5161b9))
## [8.4.2](https://github.com/LazyVim/LazyVim/compare/v8.4.1...v8.4.2) (2023-10-03)
### Bug Fixes
* **nvim-lint:** dont evaluate conditions for linter functions. Fixes [#1569](https://github.com/LazyVim/LazyVim/issues/1569) ([b1ad480](https://github.com/LazyVim/LazyVim/commit/b1ad48067e2c18747bedd7b7054c3ce97ef32890))
* **ui:** fixed foldtext on Neovim &lt; 0.10 ([1b74d67](https://github.com/LazyVim/LazyVim/commit/1b74d67a0d5783e587dedc73a715cb0c9db6cd16))
### Performance Improvements
* **options:** better detection for foldtext,statuscolumn,folexpr support ([e105c9d](https://github.com/LazyVim/LazyVim/commit/e105c9daf6e973b4a294a17b4d2d1882f2188ac6))
## [8.4.1](https://github.com/LazyVim/LazyVim/compare/v8.4.0...v8.4.1) (2023-10-03)
### Bug Fixes
* **ui:** check folds of the statuscolumn win instead of current win ([13e9f6e](https://github.com/LazyVim/LazyVim/commit/13e9f6e6b5b085191b0ecf194ddf4c9e2d3ae6d7))
## [8.4.0](https://github.com/LazyVim/LazyVim/compare/v8.3.0...v8.4.0) (2023-10-03)
### Features
* **keymaps:** added toggle for relative line numbers ([3f868aa](https://github.com/LazyVim/LazyVim/commit/3f868aa8254efbd494f6bf100c86a59c5a002c1c))
* **options:** enable smoothscroll on nightly ([450e0c6](https://github.com/LazyVim/LazyVim/commit/450e0c6bebc5bb9a0c513cdffaf9c46d5f62d5fa))
* **options:** enabled treesitter folding and foldtext when available ([19926d2](https://github.com/LazyVim/LazyVim/commit/19926d284862b5e58f29e73b71ec532ac29c54ba))
* **ui:** fancy fold text ([f1ce075](https://github.com/LazyVim/LazyVim/commit/f1ce07510d2048e33fec2b609814d68a7175d591))
* **ui:** fancy status column ([364bcf3](https://github.com/LazyVim/LazyVim/commit/364bcf325d91a06e6bd6516bdfed84399566cdb6))
### Bug Fixes
* **ui:** better fallback for foldtext when buffer does not have TreeSitter ([762017d](https://github.com/LazyVim/LazyVim/commit/762017dc35fc961bdcc7879a5527dbccced27792))
* **ui:** Neovim &lt; 0.10 ([afbe204](https://github.com/LazyVim/LazyVim/commit/afbe2043a73b6c90476812f9cc0ca4759814e5ac))
## [8.3.0](https://github.com/LazyVim/LazyVim/compare/v8.2.0...v8.3.0) (2023-10-02)
### Features
* **conform:** added new keymap (leader-cF) to format injected languages ([86d3694](https://github.com/LazyVim/LazyVim/commit/86d36946727bade57918c6a358c6b6bae52d441b))
### Bug Fixes
* **indent-blankline:** set `config.indent.tab_char` ([#1552](https://github.com/LazyVim/LazyVim/issues/1552)) ([7c5a458](https://github.com/LazyVim/LazyVim/commit/7c5a458761fe7002c6603d602e8d130b9a62dd68))
## [8.2.0](https://github.com/LazyVim/LazyVim/compare/v8.1.0...v8.2.0) (2023-10-02)
### Features
* **mini.files:** added lsp rename support to mini.files ([4ff51cd](https://github.com/LazyVim/LazyVim/commit/4ff51cd678343ea32668eaf0c1103caacb4334a2))
## [8.1.0](https://github.com/LazyVim/LazyVim/compare/v8.0.0...v8.1.0) (2023-10-01)
### Features
* **conform:** set vim.opt.formatexpr ([766d5e5](https://github.com/LazyVim/LazyVim/commit/766d5e5bf7a8e40910a00aef4dc30f36376e5652))
* **elixir:** Add credo if none-ls is used ([#1546](https://github.com/LazyVim/LazyVim/issues/1546)) ([2ffd629](https://github.com/LazyVim/LazyVim/commit/2ffd629cc7a68e6e4a721ac8babe6b7cf612868e))
* **format:** show warning when no formatter ran when using the format keymap ([e36f7d8](https://github.com/LazyVim/LazyVim/commit/e36f7d811c396b60bcbf65f962b3f52d2f75b0b3))
* **go:** add goimports ([#1549](https://github.com/LazyVim/LazyVim/issues/1549)) ([e8ab2ff](https://github.com/LazyVim/LazyVim/commit/e8ab2ff5b6a75952943d3ba44586c7de5588be33))
### Bug Fixes
* **format:** moved formatting keymap to lua/lazyvim/config/keymaps.lua ([9b16770](https://github.com/LazyVim/LazyVim/commit/9b1677057377400ab292c51bbc085c82637a39d4))
## [8.0.0](https://github.com/LazyVim/LazyVim/compare/v7.0.3...v8.0.0) (2023-10-01)
### ⚠ BREAKING CHANGES
* LazyVim now requires Neovim >= 0.9.0
### Features
* replace Copilot icon with logo ([#1539](https://github.com/LazyVim/LazyVim/issues/1539)) ([9bb4e87](https://github.com/LazyVim/LazyVim/commit/9bb4e8755f5a822659ca1d8cb3689732435d90d0))
* show error and exit Neovim when version is too old ([2aea5c7](https://github.com/LazyVim/LazyVim/commit/2aea5c7210882a2f98526ee29115fe2e1a41d7b4))
### Bug Fixes
* cleanup all Neovim &lt; 0.9.0 code ([9935dc3](https://github.com/LazyVim/LazyVim/commit/9935dc3944c4724d7ee7f70b6bc450f8c3b34a08))
### Performance Improvements
* dont't load schemastore as an lspconfig dep ([9d17c43](https://github.com/LazyVim/LazyVim/commit/9d17c4308713e8db7ec03871ba62ff80a3bfb79c))
### Documentation
* LazyVim now requires Neovim &gt;= 0.9.0 ([bfe0422](https://github.com/LazyVim/LazyVim/commit/bfe04222fe5585179f03197b01a6f6ed711d4421))
## [7.0.3](https://github.com/LazyVim/LazyVim/compare/v7.0.2...v7.0.3) (2023-09-30)
### Bug Fixes
* **extras.go:** remove unneeded formatters since gopls handles them ([#1535](https://github.com/LazyVim/LazyVim/issues/1535)) ([964dd6c](https://github.com/LazyVim/LazyVim/commit/964dd6c4b2135399758c87afed7e1f3c8e30b487))
## [7.0.2](https://github.com/LazyVim/LazyVim/compare/v7.0.1...v7.0.2) (2023-09-30)
### Bug Fixes
* **format:** allow `custom_format` to return early ([#1531](https://github.com/LazyVim/LazyVim/issues/1531)) ([1c878b9](https://github.com/LazyVim/LazyVim/commit/1c878b9d06fb116135419d098fe5dfde5304b709))
* **python:** make venv-selector `dap_enabled` conditional on `nvim-dap-python` ([#1529](https://github.com/LazyVim/LazyVim/issues/1529)) ([7821c0e](https://github.com/LazyVim/LazyVim/commit/7821c0e85199205af98ceedfb2c4990c96900e46))
## [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 &lt; 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)

View File

@ -54,7 +54,7 @@ LazyVim 提供了两全其美的方式 - 根据需要调整配置的灵活性,
## ⚡️ 要求
- Neovim >= **0.8.0** (需要用 **LuaJIT** 构建)
- Neovim >= **0.9.0** (需要用 **LuaJIT** 构建)
- Git >= **2.19.0** (用于部分克隆支持)
- 一个 [Nerd Font](https://www.nerdfonts.com/) 字体 **_(可选)_**
- 一个用于 `nvim-treesitter`**C** 编译器。看 [这里](https://github.com/nvim-treesitter/nvim-treesitter#requirements)

View File

@ -56,7 +56,7 @@ to tweak your config as needed, along with the convenience of a pre-configured s
## ⚡️ Requirements
- Neovim >= **0.8.0** (needs to be built with **LuaJIT**)
- Neovim >= **0.9.0** (needs to be built with **LuaJIT**)
- Git >= **2.19.0** (for partial clones support)
- a [Nerd Font](https://www.nerdfonts.com/) **_(optional)_**
- a **C** compiler for `nvim-treesitter`. See [here](https://github.com/nvim-treesitter/nvim-treesitter#requirements)

View File

@ -1,4 +1,4 @@
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 September 04
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 October 06
==============================================================================
Table of Contents *LazyVim-table-of-contents*
@ -52,7 +52,7 @@ FEATURES *LazyVim-features*
REQUIREMENTS *LazyVim-requirements*
- Neovim >= **0.8.0** (needs to be built with **LuaJIT**)
- Neovim >= **0.9.0** (needs to be built with **LuaJIT**)
- Git >= **2.19.0** (for partial clones support)
- a Nerd Font <https://www.nerdfonts.com/> **(optional)**
- a **C** compiler for `nvim-treesitter`. See here <https://github.com/nvim-treesitter/nvim-treesitter#requirements>

View File

@ -31,9 +31,9 @@ vim.api.nvim_create_autocmd({ "VimResized" }, {
-- go to last loc when opening a buffer
vim.api.nvim_create_autocmd("BufReadPost", {
group = augroup("last_loc"),
callback = function()
callback = function(event)
local exclude = { "gitcommit" }
local buf = vim.api.nvim_get_current_buf()
local buf = event.buf
if vim.tbl_contains(exclude, vim.bo[buf].filetype) then
return
end
@ -55,6 +55,7 @@ vim.api.nvim_create_autocmd("FileType", {
"man",
"notify",
"qf",
"query",
"spectre_panel",
"startuptime",
"tsplayground",
@ -90,3 +91,16 @@ vim.api.nvim_create_autocmd({ "BufWritePre" }, {
vim.fn.mkdir(vim.fn.fnamemodify(file, ":p:h"), "p")
end,
})
-- HACK: re-caclulate folds when entering a buffer through Telescope
-- @see https://github.com/nvim-telescope/telescope.nvim/issues/699
vim.api.nvim_create_autocmd("BufEnter", {
group = augroup("fix_folds"),
callback = function()
if vim.opt.foldmethod:get() == "expr" then
vim.schedule(function()
vim.opt.foldmethod = "expr"
end)
end
end,
})

View File

@ -1,9 +1,10 @@
---@type LazyVimConfig
---@class LazyVimConfig: LazyVimOptions
local M = {}
M.lazy_version = ">=9.1.0"
M.use_lazy_file = true
---@class LazyVimConfig
---@class LazyVimOptions
local defaults = {
-- colorscheme can be a string like `catppuccin` or a function that will load the colorscheme
---@type string|fun()
@ -19,6 +20,9 @@ local defaults = {
},
-- icons used by other plugins
icons = {
misc = {
dots = "󰇘",
},
dap = {
Stopped = { "󰁕 ", "DiagnosticWarn", "DapStoppedLine" },
Breakpoint = "",
@ -44,7 +48,7 @@ local defaults = {
Color = "",
Constant = "",
Constructor = "",
Copilot = " ",
Copilot = " ",
Enum = "",
EnumMember = "",
Event = "",
@ -79,14 +83,31 @@ 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
---@type LazyVimOptions
local options
---@param opts? LazyVimConfig
---@param opts? LazyVimOptions
function M.setup(opts)
options = vim.tbl_deep_extend("force", defaults, opts or {})
options = vim.tbl_deep_extend("force", defaults, opts or {}) or {}
if vim.fn.has("nvim-0.9.0") == 0 then
vim.api.nvim_echo({
{
"LazyVim requires Neovim >= 0.9.0\n",
"ErrorMsg",
},
{ "Press any key to exit", "MoreMsg" },
}, true, {})
vim.fn.getchar()
vim.cmd([[quit]])
return
end
if not M.has() then
require("lazy.core.util").error(
"**LazyVim** needs **lazy.nvim** version "
@ -98,20 +119,27 @@ 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
local group = vim.api.nvim_create_augroup("LazyVim", { clear = true })
vim.api.nvim_create_autocmd("User", {
group = group,
pattern = "VeryLazy",
callback = function()
if lazy_autocmds then
M.load("autocmds")
end
M.load("keymaps")
end,
})
M.use_lazy_file = M.use_lazy_file and require("lazy.core.handler.event").trigger_events == nil
if M.use_lazy_file then
M.lazy_file()
end
require("lazy.core.util").try(function()
@ -129,6 +157,60 @@ function M.setup(opts)
})
end
-- Properly load file based plugins without blocking the UI
function M.lazy_file()
local events = {} ---@type {event: string, buf: number, data?: any}[]
local function load()
if #events == 0 then
return
end
local Event = require("lazy.core.handler.event")
local Util = require("lazy.core.util")
vim.api.nvim_del_augroup_by_name("lazy_file")
Util.track({ event = "LazyFile" })
---@type table<string,string[]>
local skips = { FileType = Event.get_augroups("FileType") }
for _, event in ipairs(events) do
skips[event.event] = skips[event.event] or Event.get_augroups(event.event)
end
vim.api.nvim_exec_autocmds("User", { pattern = "LazyFile", modeline = false })
for _, event in ipairs(events) do
Event.trigger({
event = event.event,
exclude = skips[event.event],
data = event.data,
buf = event.buf,
})
if vim.bo[event.buf].filetype then
Event.trigger({
event = "FileType",
exclude = skips.FileType,
buf = event.buf,
})
end
end
vim.api.nvim_exec_autocmds("CursorMoved", { modeline = false })
events = {}
Util.track()
end
-- schedule wrap so that nested autocmds are executed
-- and the UI can continue rendering without blocking
load = vim.schedule_wrap(load)
vim.api.nvim_create_autocmd({ "BufReadPost", "BufNewFile" }, {
group = vim.api.nvim_create_augroup("lazy_file", { clear = true }),
callback = function(event)
table.insert(events, event)
load()
end,
})
end
---@param range? string
function M.has(range)
local Semver = require("lazy.manage.semver")
@ -169,6 +251,7 @@ M.did_init = false
function M.init()
if not M.did_init then
M.did_init = true
vim.opt.rtp:append(require("lazy.core.config").spec.plugins.LazyVim.dir)
-- delay notifications till vim.notify was replaced or after 500ms
require("lazyvim.util").lazy_notify()
@ -178,12 +261,32 @@ function M.init()
require("lazyvim.config").load("options")
local Plugin = require("lazy.core.plugin")
local add = Plugin.Spec.add
---@diagnostic disable-next-line: duplicate-set-field
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
if not M.use_lazy_file and type(plugin) == "table" and plugin.event == "LazyFile" then
plugin.event = { "BufReadPost", "BufNewFile" }
end
return add(self, plugin, ...)
end
-- Add support for the LazyFile event
local Event = require("lazy.core.handler.event")
local _event = Event._event
---@diagnostic disable-next-line: duplicate-set-field
Event._event = function(self, value)
return value == "LazyFile" and "User LazyFile" or _event(self, value)
end
end
end

View File

@ -103,12 +103,18 @@ if not Util.has("trouble.nvim") then
map("n", "]q", vim.cmd.cnext, { desc = "Next quickfix" })
end
-- formatting
map({ "n", "v" }, "<leader>cf", function()
require("lazyvim.plugins.lsp.format").format({ force = true })
end, { desc = "Format" })
-- stylua: ignore start
-- toggle options
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") end, { desc = "Toggle Relative 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
@ -125,9 +131,7 @@ map("n", "<leader>gG", function() Util.float_term({ "lazygit" }, {esc_esc = fals
map("n", "<leader>qq", "<cmd>qa<cr>", { desc = "Quit all" })
-- highlights under cursor
if vim.fn.has("nvim-0.9.0") == 1 then
map("n", "<leader>ui", vim.show_pos, { desc = "Inspect Pos" })
end
map("n", "<leader>ui", vim.show_pos, { desc = "Inspect Pos" })
-- LazyVim Changelog
map("n", "<leader>L", Util.changelog, {desc = "LazyVim Changelog"})

View File

@ -16,7 +16,7 @@ opt.grepformat = "%f:%l:%c:%m"
opt.grepprg = "rg --vimgrep"
opt.ignorecase = true -- Ignore case
opt.inccommand = "nosplit" -- preview incremental substitute
opt.laststatus = 0
opt.laststatus = 3 -- global statusline
opt.list = true -- Show some invisible characters (tabs...
opt.mouse = "a" -- Enable mouse mode
opt.number = true -- Print line number
@ -27,7 +27,7 @@ opt.scrolloff = 4 -- Lines of context
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" }
opt.shiftround = true -- Round indent
opt.shiftwidth = 2 -- Size of an indent
opt.shortmess:append({ W = true, I = true, c = true })
opt.shortmess:append({ W = true, I = true, c = true, C = true })
opt.showmode = false -- Dont show mode since we have a statusline
opt.sidescrolloff = 8 -- Columns of context
opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
@ -35,6 +35,7 @@ opt.smartcase = true -- Don't ignore case with capitals
opt.smartindent = true -- Insert indents automatically
opt.spelllang = { "en" }
opt.splitbelow = true -- Put new windows below current
opt.splitkeep = "screen"
opt.splitright = true -- Put new windows right of current
opt.tabstop = 2 -- Number of spaces tabs count for
opt.termguicolors = true -- True color support
@ -45,10 +46,34 @@ opt.updatetime = 200 -- Save swap file and trigger CursorHold
opt.wildmode = "longest:full,full" -- Command-line completion mode
opt.winminwidth = 5 -- Minimum window width
opt.wrap = false -- Disable line wrap
opt.fillchars = {
foldopen = "",
foldclose = "",
-- fold = "⸱",
fold = " ",
foldsep = " ",
diff = "",
eob = " ",
}
if vim.fn.has("nvim-0.10") == 1 then
opt.smoothscroll = true
end
-- Folding
vim.opt.foldlevel = 99
vim.opt.foldtext = "v:lua.require'lazyvim.util.ui'.foldtext()"
if vim.fn.has("nvim-0.9.0") == 1 then
opt.splitkeep = "screen"
opt.shortmess:append({ C = true })
vim.opt.statuscolumn = [[%!v:lua.require'lazyvim.util.ui'.statuscolumn()]]
end
-- HACK: causes freezes on <= 0.9, so only enable on >= 0.10 for now
if vim.fn.has("nvim-0.10") == 1 then
vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()"
else
vim.opt.foldmethod = "indent"
end
-- Fix markdown indentation settings

View File

@ -8,10 +8,10 @@ local error = vim.health.error or vim.health.report_error
function M.check()
start("LazyVim")
if vim.fn.has("nvim-0.8.0") == 1 then
ok("Using Neovim >= 0.8.0")
if vim.fn.has("nvim-0.9.0") == 1 then
ok("Using Neovim >= 0.9.0")
else
error("Neovim >= 0.8.0 is required")
error("Neovim >= 0.9.0 is required")
end
for _, cmd in ipairs({ "git", "rg", { "fd", "fdfind" }, "lazygit" }) do

View File

@ -97,6 +97,21 @@ 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",
},
},
},
-- Fast and feature-rich surround actions. For text that includes
@ -125,19 +140,25 @@ return {
end,
opts = {
mappings = {
add = "gza", -- Add surrounding in Normal and Visual modes
delete = "gzd", -- Delete surrounding
find = "gzf", -- Find surrounding (to the right)
find_left = "gzF", -- Find surrounding (to the left)
highlight = "gzh", -- Highlight surrounding
replace = "gzr", -- Replace surrounding
update_n_lines = "gzn", -- Update `n_lines`
add = "gsa", -- Add surrounding in Normal and Visual modes
delete = "gsd", -- Delete surrounding
find = "gsf", -- Find surrounding (to the right)
find_left = "gsF", -- Find surrounding (to the left)
highlight = "gsh", -- Highlight surrounding
replace = "gsr", -- Replace surrounding
update_n_lines = "gsn", -- Update `n_lines`
},
},
},
-- comments
{ "JoosepAlviste/nvim-ts-context-commentstring", lazy = true },
{
"JoosepAlviste/nvim-ts-context-commentstring",
lazy = true,
opts = {
enable_autocmd = false,
},
},
{
"echasnovski/mini.comment",
event = "VeryLazy",
@ -158,7 +179,6 @@ return {
-- { "i", mode = { "x", "o" } },
-- },
event = "VeryLazy",
dependencies = { "nvim-treesitter-textobjects" },
opts = function()
local ai = require("mini.ai")
return {
@ -170,6 +190,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,

View File

@ -59,6 +59,16 @@ return {
},
},
config = function(_, opts)
local function on_move(data)
Util.on_rename(data.source, data.destination)
end
local events = require("neo-tree.events")
opts.event_handlers = opts.event_handlers or {}
vim.list_extend(opts.event_handlers, {
{ event = events.FILE_MOVED, handler = on_move },
{ event = events.FILE_RENAMED, handler = on_move },
})
require("neo-tree").setup(opts)
vim.api.nvim_create_autocmd("TermClose", {
pattern = "*lazygit",
@ -82,10 +92,12 @@ return {
},
},
-- fuzzy finder
-- Fuzzy finder.
-- The default key bindings to find files will use Telescope's
-- `find_files` or `git_files` depending on whether the
-- directory is a git repo.
{
"nvim-telescope/telescope.nvim",
commit = vim.fn.has("nvim-0.9.0") == 0 and "057ee0f8783" or nil,
cmd = "Telescope",
version = false, -- telescope did only one release, so use HEAD for now
keys = {
@ -138,6 +150,8 @@ return {
"Trait",
"Field",
"Property",
"Enum",
"Constant",
},
}),
desc = "Goto Symbol",
@ -156,79 +170,56 @@ return {
"Trait",
"Field",
"Property",
"Enum",
"Constant",
},
}),
desc = "Goto Symbol (Workspace)",
},
},
opts = {
defaults = {
prompt_prefix = "",
selection_caret = "",
mappings = {
i = {
["<c-t>"] = function(...)
return require("trouble.providers.telescope").open_with_trouble(...)
end,
["<a-t>"] = function(...)
return require("trouble.providers.telescope").open_selected_with_trouble(...)
end,
["<a-i>"] = function()
local action_state = require("telescope.actions.state")
local line = action_state.get_current_line()
Util.telescope("find_files", { no_ignore = true, default_text = line })()
end,
["<a-h>"] = function()
local action_state = require("telescope.actions.state")
local line = action_state.get_current_line()
Util.telescope("find_files", { hidden = true, default_text = line })()
end,
["<C-Down>"] = function(...)
return require("telescope.actions").cycle_history_next(...)
end,
["<C-Up>"] = function(...)
return require("telescope.actions").cycle_history_prev(...)
end,
["<C-f>"] = function(...)
return require("telescope.actions").preview_scrolling_down(...)
end,
["<C-b>"] = function(...)
return require("telescope.actions").preview_scrolling_up(...)
end,
},
n = {
["q"] = function(...)
return require("telescope.actions").close(...)
end,
opts = function()
local actions = require("telescope.actions")
local open_with_trouble = function(...)
return require("trouble.providers.telescope").open_with_trouble(...)
end
local open_selected_with_trouble = function(...)
return require("trouble.providers.telescope").open_selected_with_trouble(...)
end
local find_files_no_ignore = function()
local action_state = require("telescope.actions.state")
local line = action_state.get_current_line()
Util.telescope("find_files", { no_ignore = true, default_text = line })()
end
local find_files_with_hidden = function()
local action_state = require("telescope.actions.state")
local line = action_state.get_current_line()
Util.telescope("find_files", { hidden = true, default_text = line })()
end
return {
defaults = {
prompt_prefix = "",
selection_caret = "",
mappings = {
i = {
["<c-t>"] = open_with_trouble,
["<a-t>"] = open_selected_with_trouble,
["<a-i>"] = find_files_no_ignore,
["<a-h>"] = find_files_with_hidden,
["<C-Down>"] = actions.cycle_history_next,
["<C-Up>"] = actions.cycle_history_prev,
["<C-f>"] = actions.preview_scrolling_down,
["<C-b>"] = actions.preview_scrolling_up,
},
n = {
["q"] = actions.close,
},
},
},
},
},
},
-- disable old installations of leap and flit. Optional so it doesn't appear under disabled plugins
{
"ggandor/leap.nvim",
enabled = function()
vim.schedule(function()
local Config = require("lazy.core.config")
if Config.spec.disabled["leap.nvim"] or Config.spec.disabled["flit.nvim"] then
require("lazy.core.util").warn(
[[`flash.nvim` is now the default **LazyVim** jump plugin.
**leap.nvim** and **flit.nvim** have been disabled.
Please remove the plugins from your config.
If you rather use leap/flit instead, you can add the leap extra:
`lazyvim.plugins.extras.editor.leap`
]],
{ title = "LazyVim" }
)
end
end)
return false
}
end,
optional = true,
},
{ "ggandor/flit.nvim", enabled = false, optional = true },
-- Flash enhances the built-in search functionality by showing labels
-- at the end of each match, letting you quickly jump to a specific
@ -291,7 +282,7 @@ If you rather use leap/flit instead, you can add the leap extra:
defaults = {
mode = { "n", "v" },
["g"] = { name = "+goto" },
["gz"] = { name = "+surround" },
["gs"] = { name = "+surround" },
["]"] = { name = "+next" },
["["] = { name = "+prev" },
["<leader><tab>"] = { name = "+tabs" },
@ -319,7 +310,7 @@ If you rather use leap/flit instead, you can add the leap extra:
-- hunks in a commit.
{
"lewis6991/gitsigns.nvim",
event = { "BufReadPre", "BufNewFile" },
event = "LazyFile",
opts = {
signs = {
add = { text = "" },
@ -358,7 +349,7 @@ If you rather use leap/flit instead, you can add the leap extra:
-- instances.
{
"RRethy/vim-illuminate",
event = { "BufReadPost", "BufNewFile" },
event = "LazyFile",
opts = {
delay = 200,
large_file_cutoff = 2000,
@ -449,7 +440,7 @@ If you rather use leap/flit instead, you can add the leap extra:
{
"folke/todo-comments.nvim",
cmd = { "TodoTrouble", "TodoTelescope" },
event = { "BufReadPost", "BufNewFile" },
event = "LazyFile",
config = true,
-- stylua: ignore
keys = {

View File

@ -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" },

View File

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

View File

@ -1,6 +0,0 @@
require("lazy.core.util").warn(
"`flash.nvim` is now the default jump plugin for **LazyVim**.\nPlease remove the `lazyvim.plugins.extras.editor.flash` import from your **lazy** config.",
{ title = "LazyVim" }
)
return {}

View File

@ -35,6 +35,22 @@ return {
end,
},
-- rename surround mappings from gs to gz to prevent conflict with leap
{
"echasnovski/mini.surround",
opts = {
mappings = {
add = "gza", -- Add surrounding in Normal and Visual modes
delete = "gzd", -- Delete surrounding
find = "gzf", -- Find surrounding (to the right)
find_left = "gzF", -- Find surrounding (to the left)
highlight = "gzh", -- Highlight surrounding
replace = "gzr", -- Replace surrounding
update_n_lines = "gzn", -- Update `n_lines`
},
},
},
-- makes some plugins dot-repeatable like leap
{ "tpope/vim-repeat", event = "VeryLazy" },
}

View File

@ -53,5 +53,12 @@ return {
vim.keymap.set("n", "g.", toggle_dotfiles, { buffer = buf_id })
end,
})
vim.api.nvim_create_autocmd("User", {
pattern = "MiniFilesActionRename",
callback = function(event)
require("lazyvim.util").on_rename(event.data.from, event.data.to)
end,
})
end,
}

View File

@ -0,0 +1,58 @@
return {
{
"stevearc/conform.nvim",
dependencies = { "mason.nvim" },
lazy = true,
cmd = "ConformInfo",
keys = {
{
"<leader>cF",
function()
require("conform").format({ formatters = { "injected" } })
end,
mode = { "n", "v" },
desc = "Format Injected Langs",
},
},
init = function()
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
-- 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 = {
injected = { options = { ignore_errors = true } },
-- -- Example of using dprint only when a dprint.json file is present
-- dprint = {
-- condition = function(self, ctx)
-- return vim.fs.find({ "dprint.json" }, { path = ctx.filename, upward = true })[1]
-- end,
-- },
},
},
config = function(_, opts)
opts.formatters = opts.formatters or {}
for name, formatter in pairs(opts.formatters) do
if type(formatter) == "table" then
local ok, defaults = pcall(require, "conform.formatters." .. name)
if ok and type(defaults) == "table" then
opts.formatters[name] = vim.tbl_deep_extend("force", {}, defaults, formatter)
end
end
end
require("conform").setup(opts)
end,
},
}

View File

@ -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" } },
},
},
},
}

View File

@ -8,7 +8,8 @@ return {
end,
},
{
"jose-elias-alvarez/null-ls.nvim",
"nvimtools/none-ls.nvim",
optional = true,
opts = function(_, opts)
local nls = require("null-ls")
opts.sources = opts.sources or {}
@ -17,6 +18,15 @@ return {
})
end,
},
{
"mfussenegger/nvim-lint",
optional = true,
opts = {
linters_by_ft = {
cmake = { "cmakelint" },
},
},
},
{
"mason.nvim",
opts = function(_, opts)
@ -35,6 +45,6 @@ return {
{
"Civitasv/cmake-tools.nvim",
opts = {},
event = "BufRead",
event = "LazyFile",
},
}

View File

@ -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" },
},
},
},
{

View File

@ -29,4 +29,30 @@ return {
},
},
},
{
"nvimtools/none-ls.nvim",
optional = true,
opts = function(_, opts)
if vim.fn.executable("credo") == 0 then
return
end
local nls = require("null-ls")
opts.sources = opts.sources or {}
vim.list_extend(opts.sources, {
nls.builtins.diagnostics.credo,
})
end,
},
{
"mfussenegger/nvim-lint",
optional = true,
opts = function(_, opts)
if vim.fn.executable("credo") == 0 then
return
end
opts.linters_by_ft = {
elixir = { "credo" },
}
end,
},
}

View File

@ -83,19 +83,28 @@ 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")
vim.list_extend(opts.sources, {
nls.builtins.code_actions.gomodifytags,
nls.builtins.code_actions.impl,
nls.builtins.formatting.gofumpt,
nls.builtins.formatting.goimports_reviser,
nls.builtins.formatting.goimports,
})
end
end,
},
{
"stevearc/conform.nvim",
optional = true,
opts = {
formatters_by_ft = {
go = { "goimports" },
},
},
},
{
"mfussenegger/nvim-dap",
optional = true,
@ -104,7 +113,7 @@ return {
"mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, { "gomodifytags", "impl", "gofumpt", "goimports-reviser", "delve" })
vim.list_extend(opts.ensure_installed, { "gomodifytags", "impl", "goimports", "delve" })
end,
},
{

View File

@ -10,13 +10,16 @@ return {
end,
},
-- yaml schema support
{
"b0o/SchemaStore.nvim",
lazy = true,
version = false, -- last release is way too old
},
-- 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 = {

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

View File

@ -61,14 +61,19 @@ return {
{
"linux-cultist/venv-selector.nvim",
cmd = "VenvSelect",
opts = {
name = {
"venv",
".venv",
"env",
".env",
},
},
opts = function(_, opts)
if require("lazyvim.util").has("nvim-dap-python") then
opts.dap_enabled = true
end
return vim.tbl_deep_extend("force", opts, {
name = {
"venv",
".venv",
"env",
".env",
},
})
end,
keys = { { "<leader>cv", "<cmd>:VenvSelect<cr>", desc = "Select VirtualEnv" } },
},
}

View File

@ -4,16 +4,30 @@ return {
opts = {
servers = {
tailwindcss = {
-- exclude a filetype from the default_config
filetypes_exclude = { "markdown" },
-- add additional filetypes to the default_config
filetypes_include = {},
-- to fully override the default_config, change the below
-- filetypes = {}
},
},
setup = {
tailwindcss = function(_, opts)
local tw = require("lspconfig.server_configurations.tailwindcss")
opts.filetypes = opts.filetypes or {}
-- Add default filetypes
vim.list_extend(opts.filetypes, tw.default_config.filetypes)
-- Remove excluded filetypes
--- @param ft string
opts.filetypes = vim.tbl_filter(function(ft)
return not vim.tbl_contains(opts.filetypes_exclude or {}, ft)
end, tw.default_config.filetypes)
end, opts.filetypes)
-- Add additional filetypes
vim.list_extend(opts.filetypes, opts.filetypes_include)
end,
},
},

View File

@ -25,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")
@ -36,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" },
},
},
},
}

View File

@ -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,
@ -88,7 +86,7 @@ return {
},
}
end
for _, language in ipairs({ "typescript", "javascript" }) do
for _, language in ipairs({ "typescript", "javascript", "typescriptreact", "javascriptreact" }) do
if not dap.configurations[language] then
dap.configurations[language] = {
{

View File

@ -10,13 +10,16 @@ return {
end,
},
-- yaml schema support
{
"b0o/SchemaStore.nvim",
lazy = true,
version = false, -- last release is way too old
},
-- 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 = {
@ -54,6 +57,18 @@ return {
},
},
},
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,
},
},
},
}

Some files were not shown because too many files have changed in this diff Show More