Compare commits

..

107 Commits

Author SHA1 Message Date
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
a72a84972d chore(main): release 6.3.0 (#1231)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-04 23:10:50 +02:00
6045a52d82 fix: #1305 rust debugging not working on windows due to missing liblldb path (#1390) 2023-09-04 23:07:55 +02:00
a910b871d1 chore(build): auto-generate vimdoc 2023-09-04 21:05:40 +00:00
15022f4892 fix(java): don't accumulate on_attach, and make more configurable (#1388)
* fix(java): don't accumulate on_attach, and make more configurable

* refactor(java): move defaults to opts
2023-09-04 23:00:39 +02:00
f9dadc11b3 fix(autocmds): restore tabpage on resize (#1260) 2023-08-29 18:13:32 +02:00
ec0ddd481c fix(keymaps): change v mode to x mode for save file (#1262)
While trying to disable `<C-s>` entirely by `vim.keymap.del({ "i", "v","n", "s" }, "<C-s>")`
in my own `keymaps.lua`, I got an error on reopening Neovim `No such mapping`.
After tinkering around a bit, I changed `v` to `x`, since `v` incorporates both
`x` and `s` and the error stopped occuring.
2023-08-29 18:07:56 +02:00
64c5848fe8 style: fix comment typo (#1336) 2023-08-29 18:02:45 +02:00
23e2b073e6 fix(keymaps): remove gw keymap 2023-08-29 18:00:54 +02:00
451bde5b41 fix(python): disable ruff hover correctly (#1365)
* fix: disable ruff hover correctly

* better fix
2023-08-29 17:59:18 +02:00
377c0e397c feat(python): add more venv names (#1381) 2023-08-29 17:58:42 +02:00
971ed5c148 chore(build): auto-generate vimdoc 2023-08-29 15:57:49 +00:00
73dc5a503f fix(clangd): update setup from upstream changes (#1308) 2023-08-29 17:57:09 +02:00
566049aa4a feat(treesitter): add jsdoc to ensure_installed (#1252)
better highlighting for jsdoc comment
2023-07-30 11:10:45 +02:00
c1fc996ccd chore(build): auto-generate vimdoc 2023-07-30 09:10:24 +00:00
a62a5942de fix(yaml): yaml validate and enable line folding (#1251)
* fix(yaml): enable validate

see https://github.com/redhat-developer/yaml-language-server#language-server-settings

* feat(yaml): support line folding
2023-07-30 11:09:44 +02:00
9264c54ae9 feat(clangd): remove CMakelists root_dir search (#1230)
Provide better handling of root_dir search for C++ project
using CMakelists.txt per folder
2023-07-26 21:44:47 +02:00
549baee224 chore(build): auto-generate vimdoc 2023-07-26 19:44:27 +00:00
d7ca822d41 fix(yaml): yaml: Fix TypeError undefined length (#1229)
In YAML files LSP completion is not happening because
yaml-language-server is failing with error:

    TypeError: Cannot read properties of undefined (reading 'length')

from out/server/src/languageserver/handlers/settingsHandlers.js:78:51,
which it's expecting to have yaml.schemaStore.url.length and it's
doesn't exist.

Signed-off-by: Javier Tia <javier.tia@gmail.com>
2023-07-26 21:43:49 +02:00
aa1cccf230 chore(main): release 6.2.0 (#1202)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-25 19:39:16 +02:00
6dc66852b8 feat(extra): add yaml language extension (#1198)
* feat: add yaml language extension

* fix(yaml): disable keyOrdering checks

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2023-07-25 19:37:13 +02:00
9fe89f5f8a fix(lang_java): fixes #1215 other two entries of vim.fs.joinpath as well that were not changed in #1213 (#1216) 2023-07-25 19:22:10 +02:00
76d33bba2c feat: Enable flash.nvim highlight on catppuccin integration (#1206)
Since flash.nvim has already been the default one, and catppuccin already support it

Co-authored-by: Radvil <radvil@@access-mobile.com>
2023-07-25 15:39:08 +02:00
79619364bd chore(build): auto-generate vimdoc 2023-07-25 13:26:10 +00:00
2e09051472 fix: fixes #1207 (#1213)
Co-authored-by: Andreas Gerlach <andreas.gerlach@xarvio.com>
2023-07-25 15:25:24 +02:00
9a0543531d fix(lsp): supports_method for checking inlay hint support (#1195) 2023-07-23 18:09:48 +02:00
f6d646a325 feat(java): add test and debug support for Java extension (#1192) 2023-07-23 18:08:01 +02:00
07f183516f chore(build): auto-generate vimdoc 2023-07-23 16:07:08 +00:00
b97ccb9e73 fix: #1194 use cmakelang instead of cmakelint (#1197) 2023-07-23 18:06:25 +02:00
142e6bec20 chore(main): release 6.1.0 (#1181)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-22 09:28:43 +02:00
fa898b7293 feat(lang): add cmake support (#1032)
* feat(lang): add cmake support

* refactor

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2023-07-22 09:27:06 +02:00
012ca50b28 feat(python): add semantic highlighting (#1149)
* feat(python): add semantic highlighting

* refactor: moved to python-semshi

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2023-07-22 09:21:12 +02:00
6b2c648878 feat(telescope): allow word and selection searches (#1096)
Changes the current normal-mode mappings <leader>sw / <leader>sW to only
display matches surrounded by word boundaries. Also adds the equivalent
visual-mode mappings to allow searching for the current selection.

Selection searching does not consider word boundaries, so highlighting a
single word and searching for it will produce the same results as the
word-under-cursor searching did before this change. This allows the user
to easily choose whether or not to include word boundaries in their
search.
2023-07-22 09:15:14 +02:00
02d673d37c feat(lang): add debug adapter plugin for go (#1115)
neotest-go does not provide a DAP strategy, and thus you cannot invoke the debugger with require('neotest').run.run({strategy=dap}).

There have been efforts to implement this in https://github.com/nvim-neotest/neotest-go/issues/12 but this seems to have stalled.
You can find the background to this change discussed here: https://github.com/LazyVim/LazyVim/discussions/1107
2023-07-22 09:13:54 +02:00
0411baab89 feat(lang): add java (#1132) 2023-07-22 09:12:42 +02:00
31b50e3a9c chore(build): auto-generate vimdoc 2023-07-22 07:11:19 +00:00
e5f53ee193 fix(terraform): configure commentstring (#1171) 2023-07-22 09:10:37 +02:00
d71ebeab24 feat(clangd): better clangd root detection (#1165) 2023-07-21 22:35:02 +02:00
a184fc1c73 chore(build): auto-generate vimdoc 2023-07-21 06:15:15 +00:00
871e7fb0db chore(main): release 6.0.0 (#1158)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-21 08:14:39 +02:00
fc50c055c3 feat: add a keybind to search register (#1170)
use `<leader>"` to search register through telescope
2023-07-20 23:40:23 +02:00
df0818880e fix(util): fixed line number toggling. Closes #1173 2023-07-20 23:38:43 +02:00
6323b419fd docs: Add more documentation (#1174) 2023-07-20 23:16:13 +02:00
abaa6d90e4 feat(lang): add tex support (#1156)
* feat(lang): add tex support

* Reword comments

* Remove personalise configs.

* Disable lazy-loading.

* Remove chktex in LSP server texlab.

* Update local conceallevel setup.

* Add keymap for vimtex-doc-package.

* Enable vimtex omni-completion.

* Update vimtex's keymap.

* refactor: move vimtex K to texlab

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2023-07-20 12:26:05 +02:00
f70f873355 chore(build): auto-generate vimdoc 2023-07-20 07:21:08 +00:00
258f339bcf feat(options)!: set default localleader to \ 2023-07-20 09:20:24 +02:00
4d0427e131 chore(build): auto-generate vimdoc 2023-07-19 11:14:51 +00:00
f2459bd70e docs: Improve summary documentation of deps (#1159) 2023-07-19 13:14:07 +02:00
e797e13bce docs: Update CHANGELOG.md (#1160)
availble -> available
2023-07-18 20:45:24 +02:00
489221f741 chore(build): auto-generate vimdoc 2023-07-18 06:47:32 +00:00
a28acf0ce7 feat(keymaps): added leader-K to run keywordprg 2023-07-18 08:46:52 +02:00
fb1f29c32c chore(main): release 5.1.1 (#1147)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-16 10:44:20 +02:00
b4b27e867c fix(mason): add MasonUpdate to build 2023-07-16 10:42:14 +02:00
f46316af00 chore(main): release 5.1.0 (#1138)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-16 10:38:07 +02:00
63e898599a feat(lang): add null-ls tools to mason's ensure_installed (#1133) 2023-07-16 08:47:06 +02:00
3a07bd8d2e chore(build): auto-generate vimdoc 2023-07-16 06:42:27 +00:00
69bb89184f feat(neo-tree): update to v3.x and change follow_current_file to a … (#1143)
* feat(neo-tree): update to v3.x and change `follow_current_file` to a table and enable it

* fix(neo-tree): remove nerd font v3 icons

* fix(neo-tree): remove legaccy commands

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2023-07-16 08:41:45 +02:00
0801e52118 chore(build): auto-generate vimdoc 2023-07-15 07:31:17 +00:00
1b0b6eb0e1 feat(lsp): add 'reuse_win' for reuse window in lsp definition keymap (#1131)
* feat(lsp): add 'reuse_win' for reuse window in lsp definition keymap

* fix: inline telescope require
2023-07-15 09:30:34 +02:00
8c0e39c826 chore(main): release 5.0.0 (#1108)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-13 08:21:44 +02:00
bb2608ecd1 chore(build): auto-generate vimdoc 2023-07-13 06:18:44 +00:00
ae759b947b feat(flash)!: Make flash.nvim the default jump plugin for LazyVim
Use the `editor.leap` extra if you rather want to use leap/flit
2023-07-13 08:18:02 +02:00
9387ab388e feat: added leader-L to show the LazyVim changelog 2023-07-13 08:18:02 +02:00
36 changed files with 1275 additions and 305 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

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

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

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

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

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

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

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

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

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

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

View File

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

View File

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

View File

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

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

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,

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

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

View File

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