Compare commits

..

203 Commits

Author SHA1 Message Date
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
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
8f9f76a96f chore(main): release 4.28.1 (#1101)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-12 20:04:33 +02:00
9e8ce289d1 fix(neoconf): do neoconf setup in lspconfig setup. Fixes #1070 2023-07-12 20:01:43 +02:00
5204aacf8d chore(main): release 4.28.0 (#1086)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-12 19:48:49 +02:00
a0c2014b10 feat(lang): add docker support (#1078) 2023-07-12 17:42:05 +02:00
c882544224 docs: added c compiler to requirements (#1082)
See: 2ef0c437b2
2023-07-12 17:36:30 +02:00
e212c166b4 feat(mini.ai): decouple mini.ai from which-key. Closes #1076 2023-07-12 17:25:35 +02:00
9fd89701da feat(util): added util.on_load to execute code when a plugin loads 2023-07-12 17:25:35 +02:00
b1721bc20a chore(build): auto-generate vimdoc 2023-07-12 14:34:54 +00:00
3f68f44d72 fix(lsp-config): lsp-config error when nvim-cmp not enabled. (#1095)
* fix(lsp-config): lsp-config error when nvim-cmp not enabled.

* Update lua/lazyvim/plugins/lsp/init.lua

Co-authored-by: Jonas Holst Damtoft <Jomik@users.noreply.github.com>

---------

Co-authored-by: Jonas Holst Damtoft <Jomik@users.noreply.github.com>
2023-07-12 16:34:07 +02:00
a38bf3001d chore(build): auto-generate vimdoc 2023-07-10 15:51:36 +00:00
67d1cbfb01 feat(catppuccin): match navic bg with lualine (#1085) 2023-07-10 17:50:53 +02:00
abea2807ce chore(main): release 4.27.0 (#1069)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-06 20:46:37 +02:00
44cdb5eac5 feat(lang): add python support (#1031) 2023-07-06 20:43:19 +02:00
0db31c2840 feat(extras): add terraform extra (#1030) 2023-07-06 19:46:34 +02:00
22c9477b96 feat(flash): use c-s in the cmdline to toggle flash 2023-07-06 15:51:31 +02:00
baa9614022 fix(autocmds): jump to last loc in buffer (#1061)
vim.api.nvim_win_set_cursor is expecting a window handle but was being
passed the current buffer's handle instead
2023-07-06 15:43:15 +02:00
b660b51718 chore(main): release 4.26.0 (#1068)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-06 15:40:33 +02:00
99f30f9a37 chore(build): auto-generate vimdoc 2023-07-06 13:36:51 +00:00
ae054ec13c feat(vscode): easier way to enable/disable plugins 2023-07-06 15:36:03 +02:00
bcff5a1937 fix(util): use spec to check if a plugin is enabled 2023-07-06 15:35:34 +02:00
299aae3545 fix(flash): depraction warning 2023-07-06 15:21:45 +02:00
0b020dc37b chore(main): release 4.25.1 (#1056)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-04 19:08:01 +02:00
755419f39c fix: trigger ci 2023-07-04 19:06:15 +02:00
ddb819cb9a chore(build): auto-generate vimdoc 2023-07-04 06:26:34 +00:00
9c120b5ef7 Revert "fix: leap nvim required by flit (#1046)"
This reverts commit dee8dc318efac8883fe149503ea92924ff4a4de2.
2023-07-04 08:25:38 +02:00
d33be73b8d chore(main): release 4.25.0 (#1041)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-03 21:47:59 +02:00
27eb4610bd feat(catppuccin): enable mason integration (#1048)
Signed-off-by: David Ward <dward@redhat.com>
2023-07-03 21:45:40 +02:00
e5200e6358 feat(lang): add C/C++ support (#1025) 2023-07-03 15:48:51 +02:00
64ca399c56 chore(build): auto-generate vimdoc 2023-07-03 13:42:01 +00:00
dee8dc318e fix: leap nvim required by flit (#1046)
step to reproduce
- disable leap.nvim
- add custom config for flash (not using one from the extras)
- open file type "f", error shown "module leap is missing"

Co-authored-by: Radvil <radvil@@access-mobile.com>
2023-07-03 15:41:16 +02:00
6d58f1dacf fix(hipatterns): remove assert. Fixes #1045 2023-07-02 22:25:43 +02:00
a981682603 fix(lsp): update keymaps *after* registering capabilities 2023-07-02 17:37:13 +02:00
bbaf47028f chore(main): release 4.24.1 (#1037)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-02 14:44:14 +02:00
8ccc109e92 fix(lsp): fixup lsp keymaps 2023-07-02 14:34:36 +02:00
a9c73bc7c3 chore(main): release 4.24.0 (#1036)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-02 13:18:47 +02:00
4009620651 fix(typescript): use new lsp keymaps config for typescript 2023-07-02 13:04:49 +02:00
39627cab42 fix(rust): remove rust-tools dep from lspconfig 2023-07-02 13:02:51 +02:00
1e1fc3c6a0 fix(go): make settings configurable for go 2023-07-02 13:01:59 +02:00
eaa0118dd2 feat(rust): make taplo configurable 2023-07-02 12:58:09 +02:00
272f6af842 feat(rust): make mason optional 2023-07-02 12:58:09 +02:00
29ba21274d chore(build): auto-generate vimdoc 2023-07-02 10:48:00 +00:00
a46d47653e feat(rust): refactor to allow easy user customization and keymaps 2023-07-02 12:46:29 +02:00
61e3ce8cdc feat(lsp): custom lsp keymaps 2023-07-02 12:44:54 +02:00
36774c6058 fix(lsp): resolve keymap capabilities over all buffer clients 2023-07-02 12:43:16 +02:00
d0bc8b7dce feat(lsp): added support to lsp keymaps for dynamic capabilities 2023-07-02 12:42:35 +02:00
fca09b12e8 chore(build): auto-generate vimdoc 2023-07-01 06:53:32 +00:00
ea21cad7ed chore(main): release 4.23.0 (#1023)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-01 08:52:51 +02:00
4ba5086b3d feat(go): add fine-tuned LSP options, add some null-ls sources (#1024) 2023-06-30 23:14:58 +02:00
089606b48d fix(lsp): upstream inlay_hint rename 2023-06-30 20:44:39 +02:00
6d8be7ae46 chore(main): release 4.22.0 (#1019)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-06-30 16:25:13 +02:00
79b1c92dd2 feat(rust): rust improvements (#1015)
* fix(rust): move lspconfig opts to correct location

lspconfig's `opts` goes in rust-tools's `opts.server`; see
https://github.com/simrat39/rust-tools.nvim#configuration

* feat(rust): add neotest-rust

* feat(rust): allow user to extend rust-tools with `opts`

Also avoids calling rust-tools's `setup()` twice.

* style(rust): fix indentation for stylua comment
2023-06-30 16:19:00 +02:00
c992ebec46 fix(lang): indentation in rust lang extra (#1017) 2023-06-30 16:03:22 +02:00
45 changed files with 2193 additions and 434 deletions

File diff suppressed because it is too large Load Diff

View File

@ -54,9 +54,10 @@ 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 June 30
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 October 03
==============================================================================
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

@ -1,4 +1,4 @@
-- This file is automatically loaded by lazyvim.config.init
-- This file is automatically loaded by lazyvim.config.init.
local function augroup(name)
return vim.api.nvim_create_augroup("lazyvim_" .. name, { clear = true })
@ -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,
})
@ -38,7 +40,7 @@ vim.api.nvim_create_autocmd("BufReadPost", {
local mark = vim.api.nvim_buf_get_mark(buf, '"')
local lcount = vim.api.nvim_buf_line_count(buf)
if mark[1] > 0 and mark[1] <= lcount then
pcall(vim.api.nvim_win_set_cursor, buf, mark)
pcall(vim.api.nvim_win_set_cursor, 0, mark)
end
end,
})
@ -53,6 +55,7 @@ vim.api.nvim_create_autocmd("FileType", {
"man",
"notify",
"qf",
"query",
"spectre_panel",
"startuptime",
"tsplayground",

View File

@ -19,6 +19,9 @@ local defaults = {
},
-- icons used by other plugins
icons = {
misc = {
dots = "󰇘",
},
dap = {
Stopped = { "󰁕 ", "DiagnosticWarn", "DapStoppedLine" },
Breakpoint = "",
@ -44,7 +47,7 @@ local defaults = {
Color = "",
Constant = "",
Constructor = "",
Copilot = " ",
Copilot = " ",
Enum = "",
EnumMember = "",
Event = "",
@ -79,6 +82,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
@ -87,6 +92,21 @@ local options
---@param opts? LazyVimConfig
function M.setup(opts)
options = vim.tbl_deep_extend("force", defaults, opts 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,22 +118,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 +201,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")
@ -102,18 +103,24 @@ 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", true) Util.toggle("number") end, { desc = "Toggle Line Numbers" })
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
map("n", "<leader>uc", function() Util.toggle("conceallevel", false, {0, conceallevel}) end, { desc = "Toggle Conceal" })
if vim.lsp.buf.inlay_hint then
map("n", "<leader>uh", function() vim.lsp.buf.inlay_hint(0, nil) end, { desc = "Toggle Inlay Hints" })
if vim.lsp.inlay_hint then
map("n", "<leader>uh", function() vim.lsp.inlay_hint(0, nil) end, { desc = "Toggle Inlay Hints" })
end
-- lazygit
@ -124,9 +131,10 @@ 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"})
-- floating terminal
local lazyterm = function() Util.float_term(nil, { cwd = Util.get_root() }) end

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
@ -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,30 @@ 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.foldmethod = "expr"
vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()"
vim.opt.statuscolumn = [[%!v:lua.require'lazyvim.util.ui'.statuscolumn()]]
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,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,13 +191,14 @@ 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,
config = function(_, opts)
require("mini.ai").setup(opts)
-- register all text objects with which-key
if require("lazyvim.util").has("which-key.nvim") then
require("lazyvim.util").on_load("which-key.nvim", function()
---@type table<string, string|table>
local i = {
[" "] = "Whitespace",
@ -214,7 +239,7 @@ return {
i = i,
a = a,
})
end
end)
end,
},
}

View File

@ -16,10 +16,12 @@ return {
integrations = {
alpha = true,
cmp = true,
flash = true,
gitsigns = true,
illuminate = true,
indent_blankline = { enabled = true },
lsp_trouble = true,
mason = true,
mini = true,
native_lsp = {
enabled = true,
@ -30,7 +32,7 @@ return {
information = { "undercurl" },
},
},
navic = { enabled = true },
navic = { enabled = true, custom_bg = "lualine" },
neotest = true,
noice = true,
notify = true,

View File

@ -5,6 +5,7 @@ return {
-- file explorer
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
cmd = "Neotree",
keys = {
{
@ -28,7 +29,6 @@ return {
vim.cmd([[Neotree close]])
end,
init = function()
vim.g.neo_tree_remove_legacy_commands = 1
if vim.fn.argc() == 1 then
local stat = vim.loop.fs_stat(vim.fn.argv(0))
if stat and stat.type == "directory" then
@ -41,7 +41,7 @@ return {
open_files_do_not_replace_types = { "terminal", "Trouble", "qf", "Outline" },
filesystem = {
bind_to_cwd = false,
follow_current_file = true,
follow_current_file = { enabled = true },
use_libuv_file_watcher = true,
},
window = {
@ -56,19 +56,19 @@ return {
expander_expanded = "",
expander_highlight = "NeoTreeExpander",
},
icon = {
folder_empty = "󰜌",
folder_empty_open = "󰜌",
},
git_status = {
symbols = {
renamed = "󰁕",
unstaged = "󰄱",
},
},
},
},
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",
@ -92,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 = {
@ -113,6 +115,7 @@ return {
{ "<leader>gc", "<cmd>Telescope git_commits<CR>", desc = "commits" },
{ "<leader>gs", "<cmd>Telescope git_status<CR>", desc = "status" },
-- search
{ '<leader>s"', "<cmd>Telescope registers<cr>", desc = "Registers" },
{ "<leader>sa", "<cmd>Telescope autocommands<cr>", desc = "Auto Commands" },
{ "<leader>sb", "<cmd>Telescope current_buffer_fuzzy_find<cr>", desc = "Buffer" },
{ "<leader>sc", "<cmd>Telescope command_history<cr>", desc = "Command History" },
@ -128,8 +131,10 @@ return {
{ "<leader>sm", "<cmd>Telescope marks<cr>", desc = "Jump to Mark" },
{ "<leader>so", "<cmd>Telescope vim_options<cr>", desc = "Options" },
{ "<leader>sR", "<cmd>Telescope resume<cr>", desc = "Resume" },
{ "<leader>sw", Util.telescope("grep_string"), desc = "Word (root dir)" },
{ "<leader>sW", Util.telescope("grep_string", { cwd = false }), desc = "Word (cwd)" },
{ "<leader>sw", Util.telescope("grep_string", { word_match = "-w" }), desc = "Word (root dir)" },
{ "<leader>sW", Util.telescope("grep_string", { cwd = false, word_match = "-w" }), desc = "Word (cwd)" },
{ "<leader>sw", Util.telescope("grep_string"), mode = "v", desc = "Selection (root dir)" },
{ "<leader>sW", Util.telescope("grep_string", { cwd = false }), mode = "v", desc = "Selection (cwd)" },
{ "<leader>uC", Util.telescope("colorscheme", { enable_preview = true }), desc = "Colorscheme with preview" },
{
"<leader>ss",
@ -145,6 +150,8 @@ return {
"Trait",
"Field",
"Property",
"Enum",
"Constant",
},
}),
desc = "Goto Symbol",
@ -163,88 +170,110 @@ 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,
},
},
},
},
},
}
end,
},
-- easily jump to any location and enhanced f/t motions for Leap
-- Flash enhances the built-in search functionality by showing labels
-- at the end of each match, letting you quickly jump to a specific
-- location.
{
"ggandor/flit.nvim",
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",
"folke/flash.nvim",
event = "VeryLazy",
vscode = true,
---@type Flash.Config
opts = {},
-- stylua: ignore
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" },
{ "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" },
},
config = function(_, opts)
local leap = require("leap")
for k, v in pairs(opts) do
leap.opts[k] = v
},
-- Flash Telescope config
{
"nvim-telescope/telescope.nvim",
optional = true,
opts = function(_, opts)
if not require("lazyvim.util").has("flash.nvim") then
return
end
leap.add_default_mappings(true)
vim.keymap.del({ "x", "o" }, "x")
vim.keymap.del({ "x", "o" }, "X")
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,
},
-- which-key
-- which-key helps you remember key bindings by showing a popup
-- with the active keybindings of the command you started typing.
{
"folke/which-key.nvim",
event = "VeryLazy",
@ -276,7 +305,9 @@ return {
end,
},
-- git signs
-- git signs highlights text that has changed since the list
-- git commit, and also lets you interactively stage & unstage
-- hunks in a commit.
{
"lewis6991/gitsigns.nvim",
event = { "BufReadPre", "BufNewFile" },
@ -313,7 +344,9 @@ return {
},
},
-- references
-- Automatically highlights other instances of the word under your cursor.
-- This works with LSP, Treesitter, and regexp matching to find the other
-- instances.
{
"RRethy/vim-illuminate",
event = { "BufReadPost", "BufNewFile" },
@ -402,7 +435,8 @@ return {
},
},
-- todo comments
-- Finds and lists all of the TODO, HACK, BUG, etc comment
-- in your project and loads them into a browsable list.
{
"folke/todo-comments.nvim",
cmd = { "TodoTrouble", "TodoTelescope" },

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,75 +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",
},
},
},
{
"nvim-telescope/telescope.nvim",
optional = true,
opts = function(_, opts)
local function flash(prompt_bufnr)
require("flash").jump({
pattern = "^",
highlight = { 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

@ -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,53 @@
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 = {
-- -- 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

@ -0,0 +1,154 @@
return {
-- Add C/C++ to treesitter
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, { "c", "cpp" })
end
end,
},
{
"p00f/clangd_extensions.nvim",
lazy = true,
config = function() end,
opts = {
inlay_hints = {
inline = false,
},
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 = "",
},
},
},
},
-- Correctly setup lspconfig for clangd 🚀
{
"neovim/nvim-lspconfig",
opts = {
servers = {
-- Ensure mason installs the server
clangd = {
keys = {
{ "<leader>cR", "<cmd>ClangdSwitchSourceHeader<cr>", desc = "Switch Source/Header (C/C++)" },
},
root_dir = function(fname)
return require("lspconfig.util").root_pattern(
"Makefile",
"configure.ac",
"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" },
},
cmd = {
"clangd",
"--background-index",
"--clang-tidy",
"--header-insertion=iwyu",
"--completion-style=detailed",
"--function-arg-placeholders",
"--fallback-style=llvm",
},
init_options = {
usePlaceholders = true,
completeUnimported = true,
clangdFileStatus = true,
},
},
},
setup = {
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 false
end,
},
},
},
{
"nvim-cmp",
opts = function(_, opts)
table.insert(opts.sorting.comparators, 1, require("clangd_extensions.cmp_scores"))
end,
},
{
"mfussenegger/nvim-dap",
optional = true,
dependencies = {
-- Ensure C/C++ debugger is installed
"williamboman/mason.nvim",
optional = true,
opts = function(_, opts)
if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, { "codelldb" })
end
end,
},
opts = function()
local dap = require("dap")
if not dap.adapters["codelldb"] then
require("dap").adapters["codelldb"] = {
type = "server",
host = "localhost",
port = "${port}",
executable = {
command = "codelldb",
args = {
"--port",
"${port}",
},
},
}
end
for _, lang in ipairs({ "c", "cpp" }) do
dap.configurations[lang] = {
{
type = "codelldb",
request = "launch",
name = "Launch file",
program = function()
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
end,
cwd = "${workspaceFolder}",
},
{
type = "codelldb",
request = "attach",
name = "Attach to process",
processId = require("dap.utils").pick_process,
cwd = "${workspaceFolder}",
},
}
end
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

@ -0,0 +1,46 @@
return {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, { "dockerfile" })
end
end,
},
{
"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 {}
vim.list_extend(opts.sources, {
nls.builtins.diagnostics.hadolint,
})
end,
},
{
"mfussenegger/nvim-lint",
optional = true,
opts = {
linters_by_ft = {
dockerfile = { "hadolint" },
},
},
},
{
"neovim/nvim-lspconfig",
opts = {
servers = {
dockerls = {},
docker_compose_language_service = {},
},
},
},
}

View File

@ -29,4 +29,24 @@ return {
},
},
},
{
"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.credo,
})
end,
},
{
"mfussenegger/nvim-lint",
optional = true,
opts = {
linters_by_ft = {
elixir = { "credo" },
},
},
},
}

View File

@ -15,16 +15,51 @@ 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,
codelenses = {
gc_details = false,
generate = true,
regenerate_cgo = true,
run_govulncheck = true,
test = true,
tidy = true,
upgrade_dependency = true,
vendor = true,
},
hints = {
assignVariableTypes = true,
compositeLiteralFields = true,
compositeLiteralTypes = true,
constantValues = true,
functionTypeParameters = true,
parameterNames = true,
rangeVariableTypes = true,
},
analyses = {
fieldalignment = true,
nilness = true,
unusedparams = true,
unusedwrite = true,
useany = true,
},
usePlaceholders = true,
completeUnimported = true,
staticcheck = true,
directoryFilters = { "-.git", "-.vscode", "-.idea", "-.vscode-test", "-node_modules" },
semanticTokens = true,
},
},
},
},
setup = {
gopls = function()
-- workaround for gopls not supporting semantictokensprovider
gopls = function(_, opts)
-- workaround for gopls not supporting semanticTokensProvider
-- https://github.com/golang/go/issues/54531#issuecomment-1464982242
require("lazyvim.util").on_attach(function(client, _)
if client.name == "gopls" then
@ -46,6 +81,30 @@ return {
},
},
},
-- Ensure Go tools are installed
{
"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.goimports,
})
end
end,
},
{
"stevearc/conform.nvim",
optional = true,
opts = {
formatters_by_ft = {
go = { "goimports" },
},
},
},
{
"mfussenegger/nvim-dap",
optional = true,
@ -54,9 +113,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", "goimports", "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

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

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

@ -0,0 +1,79 @@
return {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, { "ninja", "python", "rst", "toml" })
end
end,
},
{
"neovim/nvim-lspconfig",
opts = {
servers = {
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,
},
},
},
{
"nvim-neotest/neotest",
optional = true,
dependencies = {
"nvim-neotest/neotest-python",
},
opts = {
adapters = {
["neotest-python"] = {
-- Here you can specify the settings for the adapter, i.e.
-- runner = "pytest",
-- python = ".venv/bin/python",
},
},
},
},
{
"mfussenegger/nvim-dap",
optional = true,
dependencies = {
"mfussenegger/nvim-dap-python",
-- stylua: ignore
keys = {
{ "<leader>dPt", function() require('dap-python').test_method() end, desc = "Debug Method" },
{ "<leader>dPc", function() require('dap-python').test_class() end, desc = "Debug Class" },
},
config = function()
local path = require("mason-registry").get_package("debugpy"):get_install_path()
require("dap-python").setup(path .. "/venv/bin/python")
end,
},
},
{
"linux-cultist/venv-selector.nvim",
cmd = "VenvSelect",
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

@ -32,6 +32,7 @@ return {
-- Ensure Rust debugger is installed
{
"williamboman/mason.nvim",
optional = true,
opts = function(_, opts)
if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, { "codelldb" })
@ -39,93 +40,118 @@ return {
end,
},
{
"simrat39/rust-tools.nvim",
lazy = true,
opts = function()
local ok, mason_registry = pcall(require, "mason-registry")
local adapter ---@type any
if ok then
-- rust tools configuration for debugging support
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 = ""
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 {
dap = {
adapter = adapter,
},
tools = {
on_initialized = function()
vim.cmd([[
augroup RustLSP
autocmd CursorHold *.rs silent! lua vim.lsp.buf.document_highlight()
autocmd CursorMoved,InsertEnter *.rs silent! lua vim.lsp.buf.clear_references()
autocmd BufEnter,CursorHold,InsertLeave *.rs silent! lua vim.lsp.codelens.refresh()
augroup END
]])
end,
},
}
end,
config = function() end,
},
-- Correctly setup lspconfig for Rust 🚀
{
"neovim/nvim-lspconfig",
dependencies = { "simrat39/rust-tools.nvim" },
opts = {
servers = {
-- Ensure mason installs the server
rust_analyzer = {},
taplo = {},
},
setup = {
rust_analyzer = function(_, opts)
require("lazyvim.util").on_attach(function(client, buffer)
-- stylua: ignore
if client.name == "rust_analyzer" then
vim.keymap.set("n", "K", "<cmd>RustHoverActions<cr>", { buffer = buffer, desc = "Hover Actions (Rust)" })
vim.keymap.set("n", "<leader>cR", "<cmd>RustCodeAction<cr>", { buffer = buffer, desc = "Code Action (Rust)" })
vim.keymap.set("n", "<leader>dr", "<cmd>RustDebuggables<cr>", { buffer = buffer, desc = "Run Debuggables (Rust)" })
end
end)
local mason_registry = require("mason-registry")
-- rust tools configuration for debugging support
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 rust_tools_opts = vim.tbl_deep_extend("force", opts, {
dap = {
adapter = require("rust-tools.dap").get_codelldb_adapter(codelldb_path, liblldb_path),
},
tools = {
on_initialized = function()
vim.cmd([[
augroup RustLSP
autocmd CursorHold *.rs silent! lua vim.lsp.buf.document_highlight()
autocmd CursorMoved,InsertEnter *.rs silent! lua vim.lsp.buf.clear_references()
autocmd BufEnter,CursorHold,InsertLeave *.rs silent! lua vim.lsp.codelens.refresh()
augroup END
]])
end,
},
server = {
settings = {
["rust-analyzer"] = {
cargo = {
allFeatures = true,
loadOutDirsFromCheck = true,
runBuildScripts = true,
},
-- Add clippy lints for Rust.
checkOnSave = {
allFeatures = true,
command = "clippy",
extraArgs = { "--no-deps" },
},
procMacro = {
enable = true,
ignored = {
["async-trait"] = { "async_trait" },
["napi-derive"] = { "napi" },
["async-recursion"] = { "async_recursion" },
},
},
rust_analyzer = {
keys = {
{ "K", "<cmd>RustHoverActions<cr>", desc = "Hover Actions (Rust)" },
{ "<leader>cR", "<cmd>RustCodeAction<cr>", desc = "Code Action (Rust)" },
{ "<leader>dr", "<cmd>RustDebuggables<cr>", desc = "Run Debuggables (Rust)" },
},
settings = {
["rust-analyzer"] = {
cargo = {
allFeatures = true,
loadOutDirsFromCheck = true,
runBuildScripts = true,
},
-- Add clippy lints for Rust.
checkOnSave = {
allFeatures = true,
command = "clippy",
extraArgs = { "--no-deps" },
},
procMacro = {
enable = true,
ignored = {
["async-trait"] = { "async_trait" },
["napi-derive"] = { "napi" },
["async-recursion"] = { "async_recursion" },
},
},
},
})
require("rust-tools").setup(rust_tools_opts)
},
},
taplo = {
keys = {
{
"K",
function()
if vim.fn.expand("%:t") == "Cargo.toml" and require("crates").popup_available() then
require("crates").show_popup()
else
vim.lsp.buf.hover()
end
end,
desc = "Show Crate Documentation",
},
},
},
},
setup = {
rust_analyzer = function(_, opts)
local rust_tools_opts = require("lazyvim.util").opts("rust-tools.nvim")
require("rust-tools").setup(vim.tbl_deep_extend("force", rust_tools_opts or {}, { server = opts }))
return true
end,
taplo = function(_, _)
local function show_documentation()
if vim.fn.expand("%:t") == "Cargo.toml" and require("crates").popup_available() then
require("crates").show_popup()
else
vim.lsp.buf.hover()
end
end
require("lazyvim.util").on_attach(function(client, buffer)
-- stylua: ignore
if client.name == "taplo" then
vim.keymap.set("n", "K", show_documentation, { buffer = buffer, desc = "Show Crate Documentation" })
end
end)
return false -- make sure the base implementation calls taplo.setup
end,
},
},
},
{
"nvim-neotest/neotest",
optional = true,
dependencies = {
"rouge8/neotest-rust",
},
opts = {
adapters = {
["neotest-rust"] = {},
},
},
},

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