Compare commits
102 Commits
Author | SHA1 | Date | |
---|---|---|---|
a3089ba06b | |||
c3483f86df | |||
62f4f484d7 | |||
10675c8080 | |||
4226cf71f1 | |||
abefa2d2c9 | |||
e883620c7c | |||
2cb9dc5487 | |||
0e0aae0155 | |||
bafca50bc8 | |||
a0010ae549 | |||
ebbf67211e | |||
0aff79ec74 | |||
800d33eebb | |||
ba7d0203df | |||
fffb47b69f | |||
8dae76c1fd | |||
2391ac0420 | |||
183d6eea60 | |||
6e7ba50141 | |||
97d7b2d262 | |||
44d51e5a65 | |||
b601ade71c | |||
f25ac504b8 | |||
c70a78e631 | |||
fc5ee49495 | |||
9337db17c2 | |||
9b7e4b7c03 | |||
36802fea19 | |||
d36e3a5c73 | |||
a8659d02b9 | |||
16e6c86b27 | |||
914ca4a455 | |||
91ead22116 | |||
2c86da7c2d | |||
543dead590 | |||
a97fa3b756 | |||
12a48b8ce1 | |||
6a2545025e | |||
1892ebad78 | |||
9047d041a8 | |||
3c04789ef1 | |||
1df3c5d70b | |||
3585d61c93 | |||
cffed60fe4 | |||
965a469ca8 | |||
b29d169afb | |||
8301096c31 | |||
39901c1f00 | |||
abb1ff0d60 | |||
c54eeb5390 | |||
36b59b2608 | |||
8087283fea | |||
73de8dde2b | |||
f4490252fb | |||
e89653f410 | |||
a0afe8fef9 | |||
42010d1dfb | |||
cfe87ba894 | |||
8968c9e9ea | |||
30ce84f7a7 | |||
f7450a5236 | |||
30c9e4718a | |||
530e94a9fa | |||
34183a2759 | |||
a96348d7b0 | |||
b8475f5194 | |||
6004e8d4f6 | |||
095bc13188 | |||
9d734c5ae2 | |||
3086bf03e9 | |||
f086bcde25 | |||
5fb4cf0d36 | |||
9b4675ddde | |||
9da13ef7e8 | |||
0fa63603af | |||
6fdbc623e0 | |||
15b09e800b | |||
ceb4855b43 | |||
79fed97f23 | |||
cd04b58fe3 | |||
5f92dc5304 | |||
7834d77ada | |||
74eb25d579 | |||
bb36f71b77 | |||
9e3af1070f | |||
32eacde793 | |||
97480dc5d2 | |||
50b7f426f2 | |||
5646ee5191 | |||
aaa10e717d | |||
64f86147f9 | |||
349ae03f09 | |||
f308867570 | |||
0af1fd82d7 | |||
914f26d04e | |||
3def2097ad | |||
80a8b18be6 | |||
754467525b | |||
3166236ff8 | |||
20b2806a8f | |||
4ca0bf69dd |
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@ -11,7 +11,7 @@ jobs:
|
||||
os: [ubuntu-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Neovim
|
||||
shell: bash
|
||||
run: |
|
||||
@ -31,7 +31,7 @@ jobs:
|
||||
needs: tests
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: panvimdoc
|
||||
uses: kdheepak/panvimdoc@main
|
||||
with:
|
||||
@ -40,7 +40,7 @@ jobs:
|
||||
demojify: true
|
||||
treesitter: true
|
||||
- name: Push changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: "chore(build): auto-generate vimdoc"
|
||||
commit_user_name: "github-actions[bot]"
|
||||
@ -54,14 +54,14 @@ jobs:
|
||||
- tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: google-github-actions/release-please-action@v3
|
||||
- uses: google-github-actions/release-please-action@v4
|
||||
id: release
|
||||
with:
|
||||
release-type: simple
|
||||
package-name: LazyVim
|
||||
extra-files: |
|
||||
lua/lazyvim/config/init.lua
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: tag stable versions
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
run: |
|
||||
|
126
CHANGELOG.md
126
CHANGELOG.md
@ -1,5 +1,131 @@
|
||||
# Changelog
|
||||
|
||||
## [10.25.0](https://github.com/LazyVim/LazyVim/compare/v10.24.0...v10.25.0) (2024-05-15)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **extras:** add refactoring.nvim ([#3040](https://github.com/LazyVim/LazyVim/issues/3040)) ([73de8dd](https://github.com/LazyVim/LazyVim/commit/73de8dde2bb513337426d5ead862e4fc6dbb8fdf))
|
||||
* **lua_ls:** configure default lua_ls inlay hint settings ([91ead22](https://github.com/LazyVim/LazyVim/commit/91ead221167a722a8dd8651cb5c53bf5db4d1b4d))
|
||||
* **lua:** added `LazyVim` as a treesitter builtin ([a97fa3b](https://github.com/LazyVim/LazyVim/commit/a97fa3b7563eb2c5305c8f32461bb150d17e45ae))
|
||||
* **noice:** added keymap `<leader>snt` to show Noice messages in telescope. Fixes [#1306](https://github.com/LazyVim/LazyVim/issues/1306) ([914ca4a](https://github.com/LazyVim/LazyVim/commit/914ca4a455169916da4614d76c15d1d1bf22e9bc))
|
||||
* **omnisharp:** support neotest dotnet ([#3051](https://github.com/LazyVim/LazyVim/issues/3051)) ([a8659d0](https://github.com/LazyVim/LazyVim/commit/a8659d02b954ca320088aab48aad8a95b3bbb86c))
|
||||
* **snippet:** add friendly-snippets to native extra ([#2944](https://github.com/LazyVim/LazyVim/issues/2944)) ([12a48b8](https://github.com/LazyVim/LazyVim/commit/12a48b8ce1521fcac01b89099a4ca8bbc3547769))
|
||||
* **terraform:** ensure tflint is installed ([#2336](https://github.com/LazyVim/LazyVim/issues/2336)) ([16e6c86](https://github.com/LazyVim/LazyVim/commit/16e6c86b2778ba35696de5067ff033cc5bdbe6db))
|
||||
* **typescript:** configure inlayHint ([#2995](https://github.com/LazyVim/LazyVim/issues/2995)) ([2c86da7](https://github.com/LazyVim/LazyVim/commit/2c86da7c2df61c23366e4073312ab12fa6d7e424))
|
||||
* **vue:** add Vue.js support to LazyVim ([#3094](https://github.com/LazyVim/LazyVim/issues/3094)) ([f449025](https://github.com/LazyVim/LazyVim/commit/f4490252fb2262208923ba197eb521732a602ac1))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ansible:** ansiblels not loading, keymap desc. ([#2739](https://github.com/LazyVim/LazyVim/issues/2739)) ([abb1ff0](https://github.com/LazyVim/LazyVim/commit/abb1ff0d600b3446b612390f0482cf92bdc84ab0))
|
||||
* **autocmds:** remove query from q-to-quit autocmd ([#2838](https://github.com/LazyVim/LazyVim/issues/2838)) ([9337db1](https://github.com/LazyVim/LazyVim/commit/9337db17c2f6082e10c97456185d8ba3fa473769))
|
||||
* **clangd:** update the attribute name for process ID ([#3047](https://github.com/LazyVim/LazyVim/issues/3047)) ([3c04789](https://github.com/LazyVim/LazyVim/commit/3c04789ef15bba15e8c0c71ef31db38c76b2ad67))
|
||||
* **cmp:** dont add autobrackets if prev char is a bracket. Closes [#2949](https://github.com/LazyVim/LazyVim/issues/2949) ([c70a78e](https://github.com/LazyVim/LazyVim/commit/c70a78e63137ec48e1c78b23413332716f572590))
|
||||
* **dap:** load vscode launch files with jsonc parser ([#1839](https://github.com/LazyVim/LazyVim/issues/1839)) ([543dead](https://github.com/LazyVim/LazyVim/commit/543dead590a949255fbbada9e1775c31ad654682))
|
||||
* **dial:** Fix dial commands in Visual line+block ([#2933](https://github.com/LazyVim/LazyVim/issues/2933)) ([1df3c5d](https://github.com/LazyVim/LazyVim/commit/1df3c5d70b2265f8582b0ed414f085e9066960da))
|
||||
* **dot:** remove `.env` => `sh` since this is already the default ([a0afe8f](https://github.com/LazyVim/LazyVim/commit/a0afe8fef9dc76b469a78435cdd3f2c5ee01f282))
|
||||
* **dot:** use syntax `sh` for dotenv files. Closes [#3145](https://github.com/LazyVim/LazyVim/issues/3145) ([42010d1](https://github.com/LazyVim/LazyVim/commit/42010d1dfbb0ba9c74c1ec0c93c5c9db21ebee47))
|
||||
* **extras.lang.typescript:** support `node` debug type along with `pwa-node` ([#2983](https://github.com/LazyVim/LazyVim/issues/2983)) ([d36e3a5](https://github.com/LazyVim/LazyVim/commit/d36e3a5c73c07f54b31c4ec5334f68ed5492123e))
|
||||
* **fzf-native:** try rebuilding fzf-native when needed. Fixes [#2464](https://github.com/LazyVim/LazyVim/issues/2464) ([39901c1](https://github.com/LazyVim/LazyVim/commit/39901c1f00eca36beb211978164744ae41be7781))
|
||||
* **gitsigns:** update deprecated hunk nav mappings ([#2935](https://github.com/LazyVim/LazyVim/issues/2935)) ([fc5ee49](https://github.com/LazyVim/LazyVim/commit/fc5ee49495093fe8e63b1648f81af371c2930129))
|
||||
* **keymaps:** better up/down keymaps description ([#1909](https://github.com/LazyVim/LazyVim/issues/1909)) ([36802fe](https://github.com/LazyVim/LazyVim/commit/36802fea198f536ac20c0e2514fc4f54cee2904b))
|
||||
* **lazyfile:** exclude `filetypedetect` from skips ([#3004](https://github.com/LazyVim/LazyVim/issues/3004)) ([c54eeb5](https://github.com/LazyVim/LazyVim/commit/c54eeb53905e8da27814f52eaf1ad63aeff4cbe4))
|
||||
* **lsp:** check if `diagnostics.signs` is disabled by user ([#2897](https://github.com/LazyVim/LazyVim/issues/2897)) ([6a25450](https://github.com/LazyVim/LazyVim/commit/6a2545025eb6fcc78998b8a4c6d121729980925b))
|
||||
* **pretty_path:** properly escape `%` characters ([e89653f](https://github.com/LazyVim/LazyVim/commit/e89653f4107724f53964a379337947490117a7dc))
|
||||
* **rust:** update creates.nvim src option to completion ([#3149](https://github.com/LazyVim/LazyVim/issues/3149)) ([8087283](https://github.com/LazyVim/LazyVim/commit/8087283fea62e5673764dfa13906eadb24110622))
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* **startup:** render a file opened from the cmdline as soon as possible and get rid of lazy_file logic ([965a469](https://github.com/LazyVim/LazyVim/commit/965a469ca8cb1d58b49c4e5d8b85430e8c6c0a25))
|
||||
* **treesitter:** dont let nvim-treesitter-textobjects stall loading treesitter ([8301096](https://github.com/LazyVim/LazyVim/commit/8301096c31f9855c74d5b732367b679bc8721b5e))
|
||||
* **treesitter:** load treesitter early during startup when opening a file from the cmdline ([b29d169](https://github.com/LazyVim/LazyVim/commit/b29d169afb7560ed4a9276e4379e28ffaed1a171))
|
||||
* **yanky:** `schedule_wrap` sqlite push to history to prevent blocking Neovim on copy/paste ([9047d04](https://github.com/LazyVim/LazyVim/commit/9047d041a8296e34ed7236e5344f5b927cd28f8b))
|
||||
* **yanky:** remove performance optim for sqlite since it has been merged upstream ([f25ac50](https://github.com/LazyVim/LazyVim/commit/f25ac504b896a522c645d456766adac2afa28801))
|
||||
|
||||
## [10.24.0](https://github.com/LazyVim/LazyVim/compare/v10.23.0...v10.24.0) (2024-05-12)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **mason-lspconfig:** allow `opts.ensure_installed` to be taken into account ([#3134](https://github.com/LazyVim/LazyVim/issues/3134)) ([8968c9e](https://github.com/LazyVim/LazyVim/commit/8968c9e9ea76f3a7616d9e249a3c9307a75fffad))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **neo-tree:** correctly set up `cwd` ([#3097](https://github.com/LazyVim/LazyVim/issues/3097)) ([30ce84f](https://github.com/LazyVim/LazyVim/commit/30ce84f7a7fb4e88b47ddf2f569b2ea9b7d56717))
|
||||
* **ui:** don't lazy-load dashboard-nvim ([#3107](https://github.com/LazyVim/LazyVim/issues/3107)) ([30c9e47](https://github.com/LazyVim/LazyVim/commit/30c9e4718a127f7d5a32f11c4d8dbba6b01f9858))
|
||||
|
||||
## [10.23.0](https://github.com/LazyVim/LazyVim/compare/v10.22.0...v10.23.0) (2024-05-03)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **lualine:** make path trimming configurable by user ([#3062](https://github.com/LazyVim/LazyVim/issues/3062)) ([b8475f5](https://github.com/LazyVim/LazyVim/commit/b8475f51949acf195729a1c4d057a06208a9add9))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **dot:** can't match kitty conf file ([#3042](https://github.com/LazyVim/LazyVim/issues/3042)) ([5fb4cf0](https://github.com/LazyVim/LazyVim/commit/5fb4cf0d365b65cb9b7afa8be047973b5fc1747a))
|
||||
* **dot:** install when list is empty ([#3052](https://github.com/LazyVim/LazyVim/issues/3052)) ([3086bf0](https://github.com/LazyVim/LazyVim/commit/3086bf03e96bfc0048e5b27f8d65a9170bca3f67))
|
||||
* **extras:** Rust-Analyzer cargo option ([#3061](https://github.com/LazyVim/LazyVim/issues/3061)) ([a96348d](https://github.com/LazyVim/LazyVim/commit/a96348d7b076819f7580ea0c0ce467630bfc7cc5))
|
||||
* **native_snippets:** Fix native_snippets for `vim.snippet api` changes ([#3083](https://github.com/LazyVim/LazyVim/issues/3083)) ([6004e8d](https://github.com/LazyVim/LazyVim/commit/6004e8d4f60549bd2c5d6f3187a28d72b21e3261))
|
||||
* **python:** make both `ruff` and `ruff_lsp` available to user ([#3060](https://github.com/LazyVim/LazyVim/issues/3060)) ([34183a2](https://github.com/LazyVim/LazyVim/commit/34183a2759828001b08679659f7d5170d7ec367e))
|
||||
|
||||
## [10.22.0](https://github.com/LazyVim/LazyVim/compare/v10.21.1...v10.22.0) (2024-04-22)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **dot:** add bashls and shellcheck ([#2879](https://github.com/LazyVim/LazyVim/issues/2879)) ([97480dc](https://github.com/LazyVim/LazyVim/commit/97480dc5d2dbb717b45a351e0b04835f138a9094))
|
||||
* **dot:** add more filetypes ([#2987](https://github.com/LazyVim/LazyVim/issues/2987)) ([15b09e8](https://github.com/LazyVim/LazyVim/commit/15b09e800ba7fb0c9ca8270a77e71083396e9db1))
|
||||
* **git:** `<leader>gb` for Git Blame Line ([9e3af10](https://github.com/LazyVim/LazyVim/commit/9e3af1070fc1932da322105708ebb32a2cd9572b))
|
||||
* **python:** use new `ruff` instead of `ruff_lsp` ([#3016](https://github.com/LazyVim/LazyVim/issues/3016)) ([cd04b58](https://github.com/LazyVim/LazyVim/commit/cd04b58fe3f7299fbca75e7eb47287617ac23fcf))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **edgy:** proper way of opening neo-tree. Fixes [#2984](https://github.com/LazyVim/LazyVim/issues/2984) ([6fdbc62](https://github.com/LazyVim/LazyVim/commit/6fdbc623e0a59220e754800df3b86788eca0813d))
|
||||
* **harpoon:** harpoon2 deprecated message ([#2920](https://github.com/LazyVim/LazyVim/issues/2920)) ([79fed97](https://github.com/LazyVim/LazyVim/commit/79fed97f2357b2969cb23d106137978ca7cdffb4))
|
||||
* **harpoon:** optimizes harpoon keys ([#2877](https://github.com/LazyVim/LazyVim/issues/2877)) ([50b7f42](https://github.com/LazyVim/LazyVim/commit/50b7f426f287ecfc542dd9c197e430b0aca8af04))
|
||||
* **mini.pairs:** better default for ```` ([32eacde](https://github.com/LazyVim/LazyVim/commit/32eacde793fddcca0bcfbbd494b6aa8b2c870d0f))
|
||||
* **toggle:** use new `inlay_hint.enable()` signature ([#3013](https://github.com/LazyVim/LazyVim/issues/3013)) ([5f92dc5](https://github.com/LazyVim/LazyVim/commit/5f92dc5304b99a3e76dca878d9b47557fb64f384))
|
||||
* **trouble_v3:** keymap `previous` is deprecated, use `prev` instead ([#2968](https://github.com/LazyVim/LazyVim/issues/2968)) ([0fa6360](https://github.com/LazyVim/LazyVim/commit/0fa63603afcb9b478c49a54d94314d20af00ae95))
|
||||
* **trouble_v3:** show error only when `trouble_v3` is enabled ([#2989](https://github.com/LazyVim/LazyVim/issues/2989)) ([ceb4855](https://github.com/LazyVim/LazyVim/commit/ceb4855b434c8e7095bbf47cfc3b3647532d6a2c))
|
||||
* **trouble-v3:** fix telescope integration ([9da13ef](https://github.com/LazyVim/LazyVim/commit/9da13ef7e8a0b6c07e8e35f7c93dc77f3408d38b))
|
||||
|
||||
## [10.21.1](https://github.com/LazyVim/LazyVim/compare/v10.21.0...v10.21.1) (2024-03-29)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **lsp:** better support for diagnostics icons on Neovim nightly/stable ([aaa10e7](https://github.com/LazyVim/LazyVim/commit/aaa10e717dbe76c5b6b0ab302698f1d151863dc6))
|
||||
* **lsp:** dont define diagnostics signs on >= 0.10.0 ([64f8614](https://github.com/LazyVim/LazyVim/commit/64f86147f9f4c67548185798f755c80e03c2098a))
|
||||
* merge conflict ([349ae03](https://github.com/LazyVim/LazyVim/commit/349ae03f0997d20aa6b4a23315e62dfeab77d559))
|
||||
* **native_snippets:** don't try to enable native snippets on Neovim < 0.10.0 and show warning ([f308867](https://github.com/LazyVim/LazyVim/commit/f3088675703986b6d37061ebcf0a417c132fd45f))
|
||||
|
||||
## [10.21.0](https://github.com/LazyVim/LazyVim/compare/v10.20.1...v10.21.0) (2024-03-29)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **trouble:** added `<leader>cS` to open a trouble list of all references / definitions / ... of the item under the cursor ([7544675](https://github.com/LazyVim/LazyVim/commit/754467525b420c85150f13b2cd9e280570c7556c))
|
||||
* **trouble:** enabled edgy ([80a8b18](https://github.com/LazyVim/LazyVim/commit/80a8b18be6577dcea35748eb563ebef7cf1b3c15))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **mini.move:** default mini.move setup already maps the correct keys ([3166236](https://github.com/LazyVim/LazyVim/commit/3166236ff88a13e7e5b7579ae780b682f2356d62))
|
||||
* **tex:** don't override conceallevel for tex. Not sure why that was added ([914f26d](https://github.com/LazyVim/LazyVim/commit/914f26d04e6b9a61f7d4fc80ad433d75dac3f14b))
|
||||
|
||||
## [10.20.1](https://github.com/LazyVim/LazyVim/compare/v10.20.0...v10.20.1) (2024-03-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **trouble-v3:** use the filtered symbols list for lualine ([4ca0bf6](https://github.com/LazyVim/LazyVim/commit/4ca0bf69dd1e4a359af6894490f794bd5fc12cf0))
|
||||
|
||||
## [10.20.0](https://github.com/LazyVim/LazyVim/compare/v10.19.0...v10.20.0) (2024-03-28)
|
||||
|
||||
|
||||
|
38
NEWS.md
38
NEWS.md
@ -1,5 +1,43 @@
|
||||
# What's new?
|
||||
|
||||
## 11.x
|
||||
|
||||
Since Neovim 0.10 has been released, I've been working on a new version of **LazyVim**
|
||||
that is fully compatible with all the latest Neovim features.
|
||||
|
||||
Additionally, some core plugins have been moved to extras.
|
||||
|
||||
- `native snippets` are not the default on Neovim 0.10
|
||||
Older versions of Neovim will use the new `luasnip` extra.
|
||||
|
||||
- `native comments` are now the default on Neovim 0.10
|
||||
Older versions of Neovim will use the new `mini-comment` extra.
|
||||
`nvim-ts-context-commentstring` has been integrated in the native comments.
|
||||
|
||||
- `inlay hints` have been in **LazyVim** for a while, but are now
|
||||
enabled by default. To disable then:
|
||||
|
||||
```lua
|
||||
{
|
||||
"nvim-lspconfig",
|
||||
opts = {
|
||||
inlay_hints = { enabled = true },
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- plugins moved to extras:
|
||||
|
||||
- `mini.ai` which I couldn't live without, but not everyone needs it
|
||||
- `mini.surround`
|
||||
- `mini.indentscope` scopes are now also highlighted with `indent-blankline`
|
||||
- `nvim-treesitter-context`
|
||||
|
||||
- There's a new extra for the `nvim-treesitter` **rewrite**.
|
||||
Since the rewrite is not backward compatible, some plugins will be disabled
|
||||
when you enable this extra: `vim-illuminate`, `nvim-ts-autotag`, and `nvim-ts-autotag`.
|
||||
I would **NOT** recommend enabling this extra for now.
|
||||
|
||||
## 10.x
|
||||
|
||||
- added new extra for [mini.diff](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-diff.md)
|
||||
|
32
README-DE.md
32
README-DE.md
@ -5,11 +5,11 @@
|
||||
<hr>
|
||||
|
||||
<h4 align="center">
|
||||
<a href="https://lazyvim.github.io/installation">Install</a>
|
||||
<a href="https://lazyvim.github.io/installation">Installieren</a>
|
||||
·
|
||||
<a href="https://lazyvim.github.io/configuration">Configure</a>
|
||||
<a href="https://lazyvim.github.io/configuration">Konfigurieren</a>
|
||||
·
|
||||
<a href="https://lazyvim.github.io">Docs</a>
|
||||
<a href="https://lazyvim.github.io">Dokumentation</a>
|
||||
</h4>
|
||||
|
||||
<div align="center"><p>
|
||||
@ -36,8 +36,8 @@
|
||||
</a>
|
||||
</div>
|
||||
|
||||
LazyVim ist ein Neovim setup aufgebaut auf [💤 lazy.nvim](https://github.com/folke/lazy.nvim).
|
||||
Es erleichter das Anpassen und erweitern von Ihrer Konfiguration.
|
||||
LazyVim ist ein Neovim-Setup aufgebaut auf [💤 lazy.nvim](https://github.com/folke/lazy.nvim).
|
||||
Es erleichtert das Anpassen und Erweitern von Ihrer Konfiguration.
|
||||
Anstatt von vorne anzufangen oder eine vorgefertigte Distro zu verwenden, gibt LazyVim das beste aus
|
||||
beiden Welten - die Flexibilität Ihre Konfiguration zu verändern und einzustellen wie Sie es wollen
|
||||
und die Einfachheit von einem vorgefertigten Setup.
|
||||
@ -52,7 +52,7 @@ und die Einfachheit von einem vorgefertigten Setup.
|
||||
- 💤 Passe deine Konfiguration einfach an und erweitere diese mit [lazy.nvim](https://github.com/folke/lazy.nvim)
|
||||
- 🚀 Extrem schnell
|
||||
- 🧹 Logische Voreinstellungen für optionen, autocmds und keymaps
|
||||
- 📦 Kommt mit einem Haufen vor Konfigurierten, ready to use Plugins
|
||||
- 📦 Kommt mit einem Haufen vorkonfigurierter, ready-to-use Plugins
|
||||
|
||||
## ⚡️ Vorraussetzungen
|
||||
|
||||
@ -108,15 +108,15 @@ docker run -w /root -it --rm alpine:edge sh -uelic '
|
||||
|
||||
</details>
|
||||
|
||||
## 📂 File Structure
|
||||
## 📂 Dateistruktur
|
||||
|
||||
The files under config will be automatically loaded at the appropriate time,
|
||||
so you don't need to require those files manually.
|
||||
**LazyVim** comes with a set of default config files that will be loaded
|
||||
**_before_** your own. See [here](https://github.com/LazyVim/LazyVim/tree/main/lua/lazyvim/config)
|
||||
|
||||
You can add your custom plugin specs under `lua/plugins/`. All files there
|
||||
will be automatically loaded by [lazy.nvim](https://github.com/folke/lazy.nvim)
|
||||
Die Dateien unter `config` werden automatisch und zur richtigen Zeit geladen,
|
||||
sodass ein manuelles `require` nicht nötig ist.
|
||||
**LazyVim** bringt Konfigurationsdatein mit, die **_vor_** Ihren eigenen geladen werden -
|
||||
siehe [hier](https://github.com/LazyVim/LazyVim/tree/main/lua/lazyvim/config)
|
||||
Sie können eigene Plugins unter `lua/plugins/` hinzufügen. Alle Dateien innerhalb
|
||||
dieses Ordners werden automatisch mit [lazy.nvim](https://github.com/folke/lazy.nvim)
|
||||
geladen.
|
||||
|
||||
<pre>
|
||||
~/.config/nvim
|
||||
@ -133,6 +133,6 @@ will be automatically loaded by [lazy.nvim](https://github.com/folke/lazy.nvim)
|
||||
└── init.toml
|
||||
</pre>
|
||||
|
||||
## ⚙️ Configuration
|
||||
## ⚙️ Konfiguration
|
||||
|
||||
Refer to the [docs](https://lazyvim.github.io)
|
||||
Siehe [Dokumentation](https://lazyvim.github.io).
|
||||
|
@ -1,4 +1,4 @@
|
||||
*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 March 28
|
||||
*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 May 16
|
||||
|
||||
==============================================================================
|
||||
Table of Contents *LazyVim-table-of-contents*
|
||||
|
@ -59,7 +59,6 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||
"lspinfo",
|
||||
"notify",
|
||||
"qf",
|
||||
"query",
|
||||
"spectre_panel",
|
||||
"startuptime",
|
||||
"tsplayground",
|
||||
|
@ -3,7 +3,8 @@ _G.LazyVim = require("lazyvim.util")
|
||||
---@class LazyVimConfig: LazyVimOptions
|
||||
local M = {}
|
||||
|
||||
M.version = "10.20.0" -- x-release-please-version
|
||||
M.version = "10.21.1" -- x-release-please-version
|
||||
LazyVim.config = M
|
||||
|
||||
---@class LazyVimOptions
|
||||
local defaults = {
|
||||
|
@ -1,14 +1,14 @@
|
||||
-- This file is automatically loaded by lazyvim.config.init
|
||||
|
||||
-- DO NOT USE THIS IN YOU OWN CONFIG!!
|
||||
-- DO NOT USE `LazyVim.safe_keymap_set` IN YOUR OWN CONFIG!!
|
||||
-- use `vim.keymap.set` instead
|
||||
local map = LazyVim.safe_keymap_set
|
||||
|
||||
-- better up/down
|
||||
map({ "n", "x" }, "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||
map({ "n", "x" }, "<Down>", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||
map({ "n", "x" }, "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||
map({ "n", "x" }, "<Up>", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||
map({ "n", "x" }, "j", "v:count == 0 ? 'gj' : 'j'", { desc = "Down", expr = true, silent = true })
|
||||
map({ "n", "x" }, "<Down>", "v:count == 0 ? 'gj' : 'j'", { desc = "Down", expr = true, silent = true })
|
||||
map({ "n", "x" }, "k", "v:count == 0 ? 'gk' : 'k'", { desc = "Up", expr = true, silent = true })
|
||||
map({ "n", "x" }, "<Up>", "v:count == 0 ? 'gk' : 'k'", { desc = "Up", expr = true, silent = true })
|
||||
|
||||
-- Move to window using the <ctrl> hjkl keys
|
||||
map("n", "<C-h>", "<C-w>h", { desc = "Go to Left Window", remap = true })
|
||||
@ -127,6 +127,7 @@ map("n", "<leader>ub", function() LazyVim.toggle("background", false, {"light",
|
||||
-- lazygit
|
||||
map("n", "<leader>gg", function() LazyVim.lazygit( { cwd = LazyVim.root.git() }) end, { desc = "Lazygit (Root Dir)" })
|
||||
map("n", "<leader>gG", function() LazyVim.lazygit() end, { desc = "Lazygit (cwd)" })
|
||||
map("n", "<leader>gb", LazyVim.lazygit.blame_line, { desc = "Git Blame Line" })
|
||||
|
||||
map("n", "<leader>gf", function()
|
||||
local git_path = vim.api.nvim_buf_get_name(0)
|
||||
@ -138,6 +139,7 @@ map("n", "<leader>qq", "<cmd>qa<cr>", { desc = "Quit All" })
|
||||
|
||||
-- highlights under cursor
|
||||
map("n", "<leader>ui", vim.show_pos, { desc = "Inspect Pos" })
|
||||
map("n", "<leader>uI", "<cmd>InspectTree<cr>", { desc = "Inspect Tree" })
|
||||
|
||||
-- LazyVim Changelog
|
||||
map("n", "<leader>L", function() LazyVim.news.changelog() end, { desc = "LazyVim Changelog" })
|
||||
|
@ -2,7 +2,7 @@
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = "\\"
|
||||
|
||||
-- Enable LazyVim auto format
|
||||
-- LazyVim auto format
|
||||
vim.g.autoformat = true
|
||||
|
||||
-- LazyVim root dir detection
|
||||
@ -28,18 +28,24 @@ vim.g.lazygit_config = true
|
||||
local opt = vim.opt
|
||||
|
||||
opt.autowrite = true -- Enable auto write
|
||||
|
||||
if not vim.env.SSH_TTY then
|
||||
-- only set clipboard if not in ssh, to make sure the OSC 52
|
||||
-- integration works automatically. Requires Neovim >= 0.10.0
|
||||
opt.clipboard = "unnamedplus" -- Sync with system clipboard
|
||||
end
|
||||
|
||||
-- only set clipboard if not in ssh, to make sure the OSC 52
|
||||
-- integration works automatically. Requires Neovim >= 0.10.0
|
||||
opt.clipboard = vim.env.SSH_TTY and "" or "unnamedplus" -- Sync with system clipboard
|
||||
opt.completeopt = "menu,menuone,noselect"
|
||||
opt.conceallevel = 2 -- Hide * markup for bold and italic, but not markers with substitutions
|
||||
opt.confirm = true -- Confirm to save changes before exiting modified buffer
|
||||
opt.cursorline = true -- Enable highlighting of the current line
|
||||
opt.expandtab = true -- Use spaces instead of tabs
|
||||
opt.fillchars = {
|
||||
foldopen = "",
|
||||
foldclose = "",
|
||||
fold = " ",
|
||||
foldsep = " ",
|
||||
diff = "╱",
|
||||
eob = " ",
|
||||
}
|
||||
opt.foldlevel = 99
|
||||
opt.formatexpr = "v:lua.require'lazyvim.util'.format.formatexpr()"
|
||||
opt.formatoptions = "jcroqlnt" -- tcqj
|
||||
opt.grepformat = "%f:%l:%c:%m"
|
||||
opt.grepprg = "rg --vimgrep"
|
||||
@ -66,11 +72,10 @@ opt.spelllang = { "en" }
|
||||
opt.splitbelow = true -- Put new windows below current
|
||||
opt.splitkeep = "screen"
|
||||
opt.splitright = true -- Put new windows right of current
|
||||
opt.statuscolumn = [[%!v:lua.require'lazyvim.util'.ui.statuscolumn()]]
|
||||
opt.tabstop = 2 -- Number of spaces tabs count for
|
||||
opt.termguicolors = true -- True color support
|
||||
if not vim.g.vscode then
|
||||
opt.timeoutlen = 300 -- Lower than default (1000) to quickly trigger which-key
|
||||
end
|
||||
opt.timeoutlen = vim.g.vscode and 1000 or 300 -- Lower than default (1000) to quickly trigger which-key
|
||||
opt.undofile = true
|
||||
opt.undolevels = 10000
|
||||
opt.updatetime = 200 -- Save swap file and trigger CursorHold
|
||||
@ -78,38 +83,16 @@ opt.virtualedit = "block" -- Allow cursor to move where there is no text in visu
|
||||
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 = " ",
|
||||
foldsep = " ",
|
||||
diff = "╱",
|
||||
eob = " ",
|
||||
}
|
||||
|
||||
if vim.fn.has("nvim-0.10") == 1 then
|
||||
opt.smoothscroll = true
|
||||
end
|
||||
|
||||
-- Folding
|
||||
vim.opt.foldlevel = 99
|
||||
|
||||
if vim.fn.has("nvim-0.9.0") == 1 then
|
||||
vim.opt.statuscolumn = [[%!v:lua.require'lazyvim.util'.ui.statuscolumn()]]
|
||||
vim.opt.foldtext = "v:lua.require'lazyvim.util'.ui.foldtext()"
|
||||
end
|
||||
|
||||
-- HACK: causes freezes on <= 0.9, so only enable on >= 0.10 for now
|
||||
if vim.fn.has("nvim-0.10") == 1 then
|
||||
vim.opt.foldmethod = "expr"
|
||||
vim.opt.foldexpr = "v:lua.require'lazyvim.util'.ui.foldexpr()"
|
||||
vim.opt.foldtext = ""
|
||||
vim.opt.fillchars = "fold: "
|
||||
opt.foldexpr = "v:lua.require'lazyvim.util'.ui.foldexpr()"
|
||||
opt.foldmethod = "expr"
|
||||
opt.foldtext = ""
|
||||
else
|
||||
vim.opt.foldmethod = "indent"
|
||||
opt.foldmethod = "indent"
|
||||
opt.foldtext = "v:lua.require'lazyvim.util'.ui.foldtext()"
|
||||
end
|
||||
|
||||
vim.o.formatexpr = "v:lua.require'lazyvim.util'.format.formatexpr()"
|
||||
|
||||
-- Fix markdown indentation settings
|
||||
vim.g.markdown_recommended_style = 0
|
||||
|
@ -10,6 +10,9 @@ function M.check()
|
||||
|
||||
if vim.fn.has("nvim-0.9.0") == 1 then
|
||||
ok("Using Neovim >= 0.9.0")
|
||||
if vim.fn.has("nvim-0.10.0") == 0 then
|
||||
warn("Use Neovim >= 0.10.0 for the best experience")
|
||||
end
|
||||
else
|
||||
error("Neovim >= 0.9.0 is required")
|
||||
end
|
||||
|
@ -83,65 +83,88 @@ return {
|
||||
end
|
||||
local entry = event.entry
|
||||
local item = entry:get_completion_item()
|
||||
if vim.tbl_contains({ Kind.Function, Kind.Method }, item.kind) then
|
||||
local keys = vim.api.nvim_replace_termcodes("()<left>", false, false, true)
|
||||
vim.api.nvim_feedkeys(keys, "i", true)
|
||||
if vim.tbl_contains({ Kind.Function, Kind.Method }, item.kind) and item.insertTextFormat ~= 2 then
|
||||
local cursor = vim.api.nvim_win_get_cursor(0)
|
||||
local prev_char = vim.api.nvim_buf_get_text(0, cursor[1] - 1, cursor[2], cursor[1] - 1, cursor[2] + 1, {})[1]
|
||||
if prev_char ~= "(" and prev_char ~= ")" then
|
||||
local keys = vim.api.nvim_replace_termcodes("()<left>", false, false, true)
|
||||
vim.api.nvim_feedkeys(keys, "i", true)
|
||||
end
|
||||
end
|
||||
end)
|
||||
end,
|
||||
},
|
||||
|
||||
-- snippets
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
build = (not LazyVim.is_win())
|
||||
and "echo 'NOTE: jsregexp is optional, so not a big deal if it fails to build'; make install_jsregexp"
|
||||
or nil,
|
||||
dependencies = {
|
||||
{
|
||||
"rafamadriz/friendly-snippets",
|
||||
config = function()
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
end,
|
||||
},
|
||||
{
|
||||
vim.snippet
|
||||
and {
|
||||
"nvim-cmp",
|
||||
dependencies = {
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
{ "rafamadriz/friendly-snippets" },
|
||||
{ "garymjr/nvim-snippets", opts = { friendly_snippets = true } },
|
||||
},
|
||||
opts = function(_, opts)
|
||||
opts.snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
vim.snippet.expand(args.body)
|
||||
end,
|
||||
}
|
||||
table.insert(opts.sources, { name = "luasnip" })
|
||||
table.insert(opts.sources, { name = "snippets" })
|
||||
end,
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
history = true,
|
||||
delete_check_events = "TextChanged",
|
||||
},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{
|
||||
"<tab>",
|
||||
function()
|
||||
return require("luasnip").jumpable(1) and "<Plug>luasnip-jump-next" or "<tab>"
|
||||
end,
|
||||
expr = true, silent = true, mode = "i",
|
||||
},
|
||||
{ "<tab>", function() require("luasnip").jump(1) end, mode = "s" },
|
||||
{ "<s-tab>", function() require("luasnip").jump(-1) end, mode = { "i", "s" } },
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<Tab>",
|
||||
function()
|
||||
if vim.snippet.active({ direction = 1 }) then
|
||||
vim.schedule(function()
|
||||
vim.snippet.jump(1)
|
||||
end)
|
||||
return
|
||||
end
|
||||
return "<Tab>"
|
||||
end,
|
||||
expr = true,
|
||||
silent = true,
|
||||
mode = "i",
|
||||
},
|
||||
{
|
||||
"<Tab>",
|
||||
function()
|
||||
vim.schedule(function()
|
||||
vim.snippet.jump(1)
|
||||
end)
|
||||
end,
|
||||
silent = true,
|
||||
mode = "s",
|
||||
},
|
||||
{
|
||||
"<S-Tab>",
|
||||
function()
|
||||
if vim.snippet.active({ direction = -1 }) then
|
||||
vim.schedule(function()
|
||||
vim.snippet.jump(-1)
|
||||
end)
|
||||
return
|
||||
end
|
||||
return "<S-Tab>"
|
||||
end,
|
||||
expr = true,
|
||||
silent = true,
|
||||
mode = { "i", "s" },
|
||||
},
|
||||
},
|
||||
}
|
||||
or { import = "lazyvim.plugins.extras.coding.luasnip", enabled = vim.fn.has("nvim-0.10") == 0 },
|
||||
|
||||
-- auto pairs
|
||||
{
|
||||
"echasnovski/mini.pairs",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
opts = {
|
||||
mappings = {
|
||||
["`"] = { action = "closeopen", pair = "``", neigh_pattern = "[^\\`].", register = { cr = false } },
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>up",
|
||||
@ -158,43 +181,6 @@ return {
|
||||
},
|
||||
},
|
||||
|
||||
-- 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)
|
||||
-- Populate the keys based on the user's options
|
||||
local plugin = require("lazy.core.config").spec.plugins["mini.surround"]
|
||||
local opts = require("lazy.core.plugin").values(plugin, "opts", false)
|
||||
local mappings = {
|
||||
{ opts.mappings.add, desc = "Add Surrounding", mode = { "n", "v" } },
|
||||
{ opts.mappings.delete, desc = "Delete Surrounding" },
|
||||
{ opts.mappings.find, desc = "Find Right Surrounding" },
|
||||
{ opts.mappings.find_left, desc = "Find Left Surrounding" },
|
||||
{ opts.mappings.highlight, desc = "Highlight Surrounding" },
|
||||
{ opts.mappings.replace, desc = "Replace Surrounding" },
|
||||
{ opts.mappings.update_n_lines, desc = "Update `MiniSurround.config.n_lines`" },
|
||||
}
|
||||
mappings = vim.tbl_filter(function(m)
|
||||
return m[1] and #m[1] > 0
|
||||
end, mappings)
|
||||
return vim.list_extend(mappings, keys)
|
||||
end,
|
||||
opts = {
|
||||
mappings = {
|
||||
add = "gsa", -- Add surrounding in Normal and Visual modes
|
||||
delete = "gsd", -- Delete surrounding
|
||||
find = "gsf", -- Find surrounding (to the right)
|
||||
find_left = "gsF", -- Find surrounding (to the left)
|
||||
highlight = "gsh", -- Highlight surrounding
|
||||
replace = "gsr", -- Replace surrounding
|
||||
update_n_lines = "gsn", -- Update `n_lines`
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- comments
|
||||
{
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
@ -204,110 +190,22 @@ return {
|
||||
},
|
||||
},
|
||||
{
|
||||
"echasnovski/mini.comment",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
options = {
|
||||
custom_commentstring = function()
|
||||
return require("ts_context_commentstring.internal").calculate_commentstring() or vim.bo.commentstring
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Better text-objects
|
||||
{
|
||||
"echasnovski/mini.ai",
|
||||
-- keys = {
|
||||
-- { "a", mode = { "x", "o" } },
|
||||
-- { "i", mode = { "x", "o" } },
|
||||
-- },
|
||||
event = "VeryLazy",
|
||||
opts = function()
|
||||
local ai = require("mini.ai")
|
||||
return {
|
||||
n_lines = 500,
|
||||
custom_textobjects = {
|
||||
o = ai.gen_spec.treesitter({
|
||||
a = { "@block.outer", "@conditional.outer", "@loop.outer" },
|
||||
i = { "@block.inner", "@conditional.inner", "@loop.inner" },
|
||||
}, {}),
|
||||
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>", "^<.->().*()</[^/]->$" },
|
||||
d = { "%f[%d]%d+" }, -- digits
|
||||
e = { -- Word with case
|
||||
{
|
||||
"%u[%l%d]+%f[^%l%d]",
|
||||
"%f[%S][%l%d]+%f[^%l%d]",
|
||||
"%f[%P][%l%d]+%f[^%l%d]",
|
||||
"^[%l%d]+%f[^%l%d]",
|
||||
},
|
||||
"^().*()$",
|
||||
},
|
||||
g = function() -- Whole buffer, similar to `gg` and 'G' motion
|
||||
local from = { line = 1, col = 1 }
|
||||
local to = {
|
||||
line = vim.fn.line("$"),
|
||||
col = math.max(vim.fn.getline("$"):len(), 1),
|
||||
}
|
||||
return { from = from, to = to }
|
||||
end,
|
||||
u = ai.gen_spec.function_call(), -- u for "Usage"
|
||||
U = ai.gen_spec.function_call({ name_pattern = "[%w_]" }), -- without dot in function name
|
||||
},
|
||||
}
|
||||
end,
|
||||
config = function(_, opts)
|
||||
require("mini.ai").setup(opts)
|
||||
-- register all text objects with which-key
|
||||
LazyVim.on_load("which-key.nvim", function()
|
||||
---@type table<string, string|table>
|
||||
local i = {
|
||||
[" "] = "Whitespace",
|
||||
['"'] = 'Balanced "',
|
||||
["'"] = "Balanced '",
|
||||
["`"] = "Balanced `",
|
||||
["("] = "Balanced (",
|
||||
[")"] = "Balanced ) including white-space",
|
||||
[">"] = "Balanced > including white-space",
|
||||
["<lt>"] = "Balanced <",
|
||||
["]"] = "Balanced ] including white-space",
|
||||
["["] = "Balanced [",
|
||||
["}"] = "Balanced } including white-space",
|
||||
["{"] = "Balanced {",
|
||||
["?"] = "User Prompt",
|
||||
_ = "Underscore",
|
||||
a = "Argument",
|
||||
b = "Balanced ), ], }",
|
||||
c = "Class",
|
||||
d = "Digit(s)",
|
||||
e = "Word in CamelCase & snake_case",
|
||||
f = "Function",
|
||||
g = "Entire file",
|
||||
o = "Block, conditional, loop",
|
||||
q = "Quote `, \", '",
|
||||
t = "Tag",
|
||||
u = "Use/call function & method",
|
||||
U = "Use/call without dot in name",
|
||||
}
|
||||
local a = vim.deepcopy(i)
|
||||
for k, v in pairs(a) do
|
||||
a[k] = v:gsub(" including.*", "")
|
||||
end
|
||||
|
||||
local ic = vim.deepcopy(i)
|
||||
local ac = vim.deepcopy(a)
|
||||
for key, name in pairs({ n = "Next", l = "Last" }) do
|
||||
i[key] = vim.tbl_extend("force", { name = "Inside " .. name .. " textobject" }, ic)
|
||||
a[key] = vim.tbl_extend("force", { name = "Around " .. name .. " textobject" }, ac)
|
||||
end
|
||||
require("which-key").register({
|
||||
mode = { "o", "x" },
|
||||
i = i,
|
||||
a = a,
|
||||
})
|
||||
end)
|
||||
import = "lazyvim.plugins.extras.coding.mini-comment",
|
||||
enabled = function()
|
||||
if vim.fn.has("nvim-0.10") == 1 then
|
||||
-- Majestically override the native `get_commentstring` function.
|
||||
vim.schedule(function()
|
||||
LazyVim.inject.set_upvalue(
|
||||
LazyVim.inject.get_upvalue(require("vim._comment").textobject, "get_comment_parts"),
|
||||
"get_commentstring",
|
||||
function()
|
||||
return require("ts_context_commentstring.internal").calculate_commentstring() or vim.bo.commentstring
|
||||
end
|
||||
)
|
||||
end)
|
||||
else
|
||||
return true
|
||||
end
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
@ -1,3 +1,6 @@
|
||||
local have_make = vim.fn.executable("make") == 1
|
||||
local have_cmake = vim.fn.executable("cmake") == 1
|
||||
|
||||
return {
|
||||
|
||||
-- file explorer
|
||||
@ -41,12 +44,23 @@ return {
|
||||
vim.cmd([[Neotree close]])
|
||||
end,
|
||||
init = function()
|
||||
if vim.fn.argc(-1) == 1 then
|
||||
local stat = vim.uv.fs_stat(vim.fn.argv(0))
|
||||
if stat and stat.type == "directory" then
|
||||
require("neo-tree")
|
||||
end
|
||||
end
|
||||
-- FIX: use `autocmd` for lazy-loading neo-tree instead of directly requiring it,
|
||||
-- because `cwd` is not set up properly.
|
||||
vim.api.nvim_create_autocmd("BufEnter", {
|
||||
group = vim.api.nvim_create_augroup("Neotree_start_directory", { clear = true }),
|
||||
desc = "Start Neo-tree with directory",
|
||||
once = true,
|
||||
callback = function()
|
||||
if package.loaded["neo-tree"] then
|
||||
return
|
||||
else
|
||||
local stats = vim.uv.fs_stat(vim.fn.argv(0))
|
||||
if stats and stats.type == "directory" then
|
||||
require("neo-tree")
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
opts = {
|
||||
sources = { "filesystem", "buffers", "git_status", "document_symbols" },
|
||||
@ -130,12 +144,23 @@ return {
|
||||
dependencies = {
|
||||
{
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
build = vim.fn.executable("make") == 1 and "make"
|
||||
build = have_make and "make"
|
||||
or "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build",
|
||||
enabled = vim.fn.executable("make") == 1 or vim.fn.executable("cmake") == 1,
|
||||
config = function()
|
||||
enabled = have_make or have_cmake,
|
||||
config = function(plugin)
|
||||
LazyVim.on_load("telescope.nvim", function()
|
||||
require("telescope").load_extension("fzf")
|
||||
local ok, err = pcall(require("telescope").load_extension, "fzf")
|
||||
if not ok then
|
||||
local lib = plugin.dir .. "/build/libfzf." .. (LazyVim.is_win() and "dll" or "so")
|
||||
if not vim.uv.fs_stat(lib) then
|
||||
LazyVim.warn("`telescope-fzf-native.nvim` not built. Rebuilding...")
|
||||
require("lazy").build({ plugins = { plugin }, show = false }):wait(function()
|
||||
LazyVim.info("Rebuilding `telescope-fzf-native.nvim` done.\nPlease restart Neovim.")
|
||||
end)
|
||||
else
|
||||
LazyVim.error("Failed to load `telescope-fzf-native.nvim`:\n" .. err)
|
||||
end
|
||||
end
|
||||
end)
|
||||
end,
|
||||
},
|
||||
@ -366,8 +391,10 @@ return {
|
||||
end
|
||||
|
||||
-- stylua: ignore start
|
||||
map("n", "]h", gs.next_hunk, "Next Hunk")
|
||||
map("n", "[h", gs.prev_hunk, "Prev Hunk")
|
||||
map("n", "]h", function() gs.nav_hunk("next") end, "Next Hunk")
|
||||
map("n", "[h", function() gs.nav_hunk("prev") end, "Prev Hunk")
|
||||
map("n", "]H", function() gs.nav_hunk("last") end, "Last Hunk")
|
||||
map("n", "[H", function() gs.nav_hunk("first") end, "First Hunk")
|
||||
map({ "n", "v" }, "<leader>ghs", ":Gitsigns stage_hunk<CR>", "Stage Hunk")
|
||||
map({ "n", "v" }, "<leader>ghr", ":Gitsigns reset_hunk<CR>", "Reset Hunk")
|
||||
map("n", "<leader>ghS", gs.stage_buffer, "Stage Buffer")
|
||||
@ -425,7 +452,6 @@ return {
|
||||
-- buffer remove
|
||||
{
|
||||
"echasnovski/mini.bufremove",
|
||||
|
||||
keys = {
|
||||
{
|
||||
"<leader>bd",
|
||||
|
44
lua/lazyvim/plugins/extras/coding/luasnip.lua
Normal file
44
lua/lazyvim/plugins/extras/coding/luasnip.lua
Normal file
@ -0,0 +1,44 @@
|
||||
return {
|
||||
"L3MON4D3/LuaSnip",
|
||||
build = (not LazyVim.is_win())
|
||||
and "echo 'NOTE: jsregexp is optional, so not a big deal if it fails to build'; make install_jsregexp"
|
||||
or nil,
|
||||
dependencies = {
|
||||
{
|
||||
"rafamadriz/friendly-snippets",
|
||||
config = function()
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-cmp",
|
||||
dependencies = {
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
},
|
||||
opts = function(_, opts)
|
||||
opts.snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
end,
|
||||
}
|
||||
table.insert(opts.sources, { name = "luasnip" })
|
||||
end,
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
history = true,
|
||||
delete_check_events = "TextChanged",
|
||||
},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{
|
||||
"<tab>",
|
||||
function()
|
||||
return require("luasnip").jumpable(1) and "<Plug>luasnip-jump-next" or "<tab>"
|
||||
end,
|
||||
expr = true, silent = true, mode = "i",
|
||||
},
|
||||
{ "<tab>", function() require("luasnip").jump(1) end, mode = "s" },
|
||||
{ "<s-tab>", function() require("luasnip").jump(-1) end, mode = { "i", "s" } },
|
||||
},
|
||||
}
|
95
lua/lazyvim/plugins/extras/coding/mini-ai.lua
Normal file
95
lua/lazyvim/plugins/extras/coding/mini-ai.lua
Normal file
@ -0,0 +1,95 @@
|
||||
-- Better text-objects
|
||||
return {
|
||||
"echasnovski/mini.ai",
|
||||
-- keys = {
|
||||
-- { "a", mode = { "x", "o" } },
|
||||
-- { "i", mode = { "x", "o" } },
|
||||
-- },
|
||||
event = "VeryLazy",
|
||||
opts = function()
|
||||
local ai = require("mini.ai")
|
||||
return {
|
||||
n_lines = 500,
|
||||
custom_textobjects = {
|
||||
o = ai.gen_spec.treesitter({
|
||||
a = { "@block.outer", "@conditional.outer", "@loop.outer" },
|
||||
i = { "@block.inner", "@conditional.inner", "@loop.inner" },
|
||||
}, {}),
|
||||
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>", "^<.->().*()</[^/]->$" },
|
||||
d = { "%f[%d]%d+" }, -- digits
|
||||
e = { -- Word with case
|
||||
{
|
||||
"%u[%l%d]+%f[^%l%d]",
|
||||
"%f[%S][%l%d]+%f[^%l%d]",
|
||||
"%f[%P][%l%d]+%f[^%l%d]",
|
||||
"^[%l%d]+%f[^%l%d]",
|
||||
},
|
||||
"^().*()$",
|
||||
},
|
||||
g = function() -- Whole buffer, similar to `gg` and 'G' motion
|
||||
local from = { line = 1, col = 1 }
|
||||
local to = {
|
||||
line = vim.fn.line("$"),
|
||||
col = math.max(vim.fn.getline("$"):len(), 1),
|
||||
}
|
||||
return { from = from, to = to }
|
||||
end,
|
||||
u = ai.gen_spec.function_call(), -- u for "Usage"
|
||||
U = ai.gen_spec.function_call({ name_pattern = "[%w_]" }), -- without dot in function name
|
||||
},
|
||||
}
|
||||
end,
|
||||
config = function(_, opts)
|
||||
require("mini.ai").setup(opts)
|
||||
-- register all text objects with which-key
|
||||
LazyVim.on_load("which-key.nvim", function()
|
||||
---@type table<string, string|table>
|
||||
local i = {
|
||||
[" "] = "Whitespace",
|
||||
['"'] = 'Balanced "',
|
||||
["'"] = "Balanced '",
|
||||
["`"] = "Balanced `",
|
||||
["("] = "Balanced (",
|
||||
[")"] = "Balanced ) including white-space",
|
||||
[">"] = "Balanced > including white-space",
|
||||
["<lt>"] = "Balanced <",
|
||||
["]"] = "Balanced ] including white-space",
|
||||
["["] = "Balanced [",
|
||||
["}"] = "Balanced } including white-space",
|
||||
["{"] = "Balanced {",
|
||||
["?"] = "User Prompt",
|
||||
_ = "Underscore",
|
||||
a = "Argument",
|
||||
b = "Balanced ), ], }",
|
||||
c = "Class",
|
||||
d = "Digit(s)",
|
||||
e = "Word in CamelCase & snake_case",
|
||||
f = "Function",
|
||||
g = "Entire file",
|
||||
o = "Block, conditional, loop",
|
||||
q = "Quote `, \", '",
|
||||
t = "Tag",
|
||||
u = "Use/call function & method",
|
||||
U = "Use/call without dot in name",
|
||||
}
|
||||
local a = vim.deepcopy(i)
|
||||
for k, v in pairs(a) do
|
||||
a[k] = v:gsub(" including.*", "")
|
||||
end
|
||||
|
||||
local ic = vim.deepcopy(i)
|
||||
local ac = vim.deepcopy(a)
|
||||
for key, name in pairs({ n = "Next", l = "Last" }) do
|
||||
i[key] = vim.tbl_extend("force", { name = "Inside " .. name .. " textobject" }, ic)
|
||||
a[key] = vim.tbl_extend("force", { name = "Around " .. name .. " textobject" }, ac)
|
||||
end
|
||||
require("which-key").register({
|
||||
mode = { "o", "x" },
|
||||
i = i,
|
||||
a = a,
|
||||
})
|
||||
end)
|
||||
end,
|
||||
}
|
13
lua/lazyvim/plugins/extras/coding/mini-comment.lua
Normal file
13
lua/lazyvim/plugins/extras/coding/mini-comment.lua
Normal file
@ -0,0 +1,13 @@
|
||||
return {
|
||||
{
|
||||
"echasnovski/mini.comment",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
options = {
|
||||
custom_commentstring = function()
|
||||
return require("ts_context_commentstring.internal").calculate_commentstring() or vim.bo.commentstring
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
36
lua/lazyvim/plugins/extras/coding/mini-surround.lua
Normal file
36
lua/lazyvim/plugins/extras/coding/mini-surround.lua
Normal file
@ -0,0 +1,36 @@
|
||||
-- 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.
|
||||
return {
|
||||
"echasnovski/mini.surround",
|
||||
keys = function(_, keys)
|
||||
-- Populate the keys based on the user's options
|
||||
local plugin = require("lazy.core.config").spec.plugins["mini.surround"]
|
||||
local opts = require("lazy.core.plugin").values(plugin, "opts", false)
|
||||
local mappings = {
|
||||
{ opts.mappings.add, desc = "Add Surrounding", mode = { "n", "v" } },
|
||||
{ opts.mappings.delete, desc = "Delete Surrounding" },
|
||||
{ opts.mappings.find, desc = "Find Right Surrounding" },
|
||||
{ opts.mappings.find_left, desc = "Find Left Surrounding" },
|
||||
{ opts.mappings.highlight, desc = "Highlight Surrounding" },
|
||||
{ opts.mappings.replace, desc = "Replace Surrounding" },
|
||||
{ opts.mappings.update_n_lines, desc = "Update `MiniSurround.config.n_lines`" },
|
||||
}
|
||||
mappings = vim.tbl_filter(function(m)
|
||||
return m[1] and #m[1] > 0
|
||||
end, mappings)
|
||||
return vim.list_extend(mappings, keys)
|
||||
end,
|
||||
opts = {
|
||||
mappings = {
|
||||
add = "gsa", -- Add surrounding in Normal and Visual modes
|
||||
delete = "gsd", -- Delete surrounding
|
||||
find = "gsf", -- Find surrounding (to the right)
|
||||
find_left = "gsF", -- Find surrounding (to the left)
|
||||
highlight = "gsh", -- Highlight surrounding
|
||||
replace = "gsr", -- Replace surrounding
|
||||
update_n_lines = "gsn", -- Update `n_lines`
|
||||
},
|
||||
},
|
||||
}
|
@ -1,59 +0,0 @@
|
||||
return {
|
||||
desc = "Use native snippets instead of LuaSnip. Only works on Neovim >= 0.10!",
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
enabled = false,
|
||||
},
|
||||
{
|
||||
"nvim-cmp",
|
||||
opts = {
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.snippet.expand(args.body)
|
||||
end,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<Tab>",
|
||||
function()
|
||||
if vim.snippet.jumpable(1) then
|
||||
vim.schedule(function()
|
||||
vim.snippet.jump(1)
|
||||
end)
|
||||
return
|
||||
end
|
||||
return "<Tab>"
|
||||
end,
|
||||
expr = true,
|
||||
silent = true,
|
||||
mode = "i",
|
||||
},
|
||||
{
|
||||
"<Tab>",
|
||||
function()
|
||||
vim.schedule(function()
|
||||
vim.snippet.jump(1)
|
||||
end)
|
||||
end,
|
||||
silent = true,
|
||||
mode = "s",
|
||||
},
|
||||
{
|
||||
"<S-Tab>",
|
||||
function()
|
||||
if vim.snippet.jumpable(-1) then
|
||||
vim.schedule(function()
|
||||
vim.snippet.jump(-1)
|
||||
end)
|
||||
return
|
||||
end
|
||||
return "<S-Tab>"
|
||||
end,
|
||||
expr = true,
|
||||
silent = true,
|
||||
mode = { "i", "s" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
@ -4,7 +4,7 @@ return {
|
||||
"gbprod/yanky.nvim",
|
||||
dependencies = not LazyVim.is_win() and { "kkharji/sqlite.lua" } or {},
|
||||
opts = {
|
||||
highlight = { timer = 250 },
|
||||
highlight = { timer = 150 },
|
||||
ring = { storage = LazyVim.is_win() and "shada" or "sqlite" },
|
||||
},
|
||||
keys = {
|
||||
|
@ -26,8 +26,6 @@ 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)
|
||||
@ -81,6 +79,11 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- VsCode launch.json parser
|
||||
{
|
||||
"folke/neoconf.nvim",
|
||||
},
|
||||
},
|
||||
|
||||
-- stylua: ignore
|
||||
@ -115,5 +118,18 @@ return {
|
||||
{ text = sign[1], texthl = sign[2] or "DiagnosticInfo", linehl = sign[3], numhl = sign[3] }
|
||||
)
|
||||
end
|
||||
|
||||
-- setup dap config by VsCode launch.json file
|
||||
local vscode = require("dap.ext.vscode")
|
||||
local _filetypes = require("mason-nvim-dap.mappings.filetypes")
|
||||
local filetypes = vim.tbl_deep_extend("force", _filetypes, {
|
||||
["node"] = { "javascriptreact", "typescriptreact", "typescript", "javascript" },
|
||||
["pwa-node"] = { "javascriptreact", "typescriptreact", "typescript", "javascript" },
|
||||
})
|
||||
local json = require("plenary.json")
|
||||
vscode.json_decode = function(str)
|
||||
return vim.json.decode(json.json_strip_comments(str))
|
||||
end
|
||||
vscode.load_launchjs(nil, filetypes)
|
||||
end,
|
||||
}
|
||||
|
@ -5,7 +5,9 @@ M.dials_by_ft = {}
|
||||
---@param increment boolean
|
||||
---@param g? boolean
|
||||
function M.dial(increment, g)
|
||||
local is_visual = vim.fn.mode(true):sub(1, 1) == "v"
|
||||
local mode = vim.fn.mode(true)
|
||||
-- Use visual commands for VISUAL 'v', VISUAL LINE 'V' and VISUAL BLOCK '\22'
|
||||
local is_visual = mode == "v" or mode == "V" or mode == "\22"
|
||||
local func = (increment and "inc" or "dec") .. (g and "_g" or "_") .. (is_visual and "visual" or "normal")
|
||||
local group = M.dials_by_ft[vim.bo.filetype] or "default"
|
||||
return require("dial.map")[func](group)
|
||||
|
@ -5,57 +5,38 @@ return {
|
||||
menu = {
|
||||
width = vim.api.nvim_win_get_width(0) - 4,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>H",
|
||||
function()
|
||||
require("harpoon"):list():append()
|
||||
end,
|
||||
desc = "Harpoon File",
|
||||
},
|
||||
{
|
||||
"<leader>h",
|
||||
function()
|
||||
local harpoon = require("harpoon")
|
||||
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||
end,
|
||||
desc = "Harpoon Quick Menu",
|
||||
},
|
||||
{
|
||||
"<leader>1",
|
||||
function()
|
||||
require("harpoon"):list():select(1)
|
||||
end,
|
||||
desc = "Harpoon to File 1",
|
||||
},
|
||||
{
|
||||
"<leader>2",
|
||||
function()
|
||||
require("harpoon"):list():select(2)
|
||||
end,
|
||||
desc = "Harpoon to File 2",
|
||||
},
|
||||
{
|
||||
"<leader>3",
|
||||
function()
|
||||
require("harpoon"):list():select(3)
|
||||
end,
|
||||
desc = "Harpoon to File 3",
|
||||
},
|
||||
{
|
||||
"<leader>4",
|
||||
function()
|
||||
require("harpoon"):list():select(4)
|
||||
end,
|
||||
desc = "Harpoon to File 4",
|
||||
},
|
||||
{
|
||||
"<leader>5",
|
||||
function()
|
||||
require("harpoon"):list():select(5)
|
||||
end,
|
||||
desc = "Harpoon to File 5",
|
||||
settings = {
|
||||
save_on_toggle = true,
|
||||
},
|
||||
},
|
||||
keys = function()
|
||||
local keys = {
|
||||
{
|
||||
"<leader>H",
|
||||
function()
|
||||
require("harpoon"):list():add()
|
||||
end,
|
||||
desc = "Harpoon File",
|
||||
},
|
||||
{
|
||||
"<leader>h",
|
||||
function()
|
||||
local harpoon = require("harpoon")
|
||||
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||
end,
|
||||
desc = "Harpoon Quick Menu",
|
||||
},
|
||||
}
|
||||
|
||||
for i = 1, 5 do
|
||||
table.insert(keys, {
|
||||
"<leader>" .. i,
|
||||
function()
|
||||
require("harpoon"):list():select(i)
|
||||
end,
|
||||
desc = "Harpoon to File " .. i,
|
||||
})
|
||||
end
|
||||
return keys
|
||||
end,
|
||||
}
|
||||
|
@ -38,6 +38,7 @@ return {
|
||||
-- rename surround mappings from gs to gz to prevent conflict with leap
|
||||
{
|
||||
"echasnovski/mini.surround",
|
||||
optional = true,
|
||||
opts = {
|
||||
mappings = {
|
||||
add = "gza", -- Add surrounding in Normal and Visual modes
|
||||
|
@ -3,30 +3,5 @@ return {
|
||||
"echasnovski/mini.move",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
keys = function()
|
||||
local ret = {}
|
||||
local directions = { "left", "down", "up", "right" }
|
||||
local keys = { "h", "j", "k", "l" }
|
||||
local move = require("mini.move")
|
||||
for i, dir in ipairs(directions) do
|
||||
ret[#ret + 1] = {
|
||||
"<A-" .. keys[i] .. ">",
|
||||
mode = { "i", "n" },
|
||||
function()
|
||||
move.move_line(dir)
|
||||
end,
|
||||
}
|
||||
end
|
||||
for i, dir in ipairs(directions) do
|
||||
ret[#ret + 1] = {
|
||||
"<A-" .. keys[i] .. ">",
|
||||
mode = { "v" },
|
||||
function()
|
||||
move.move_selection(dir)
|
||||
end,
|
||||
}
|
||||
end
|
||||
return ret
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
125
lua/lazyvim/plugins/extras/editor/refactoring.lua
Normal file
125
lua/lazyvim/plugins/extras/editor/refactoring.lua
Normal file
@ -0,0 +1,125 @@
|
||||
return {
|
||||
{
|
||||
"ThePrimeagen/refactoring.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>rs",
|
||||
function()
|
||||
require("telescope").extensions.refactoring.refactors()
|
||||
end,
|
||||
mode = "v",
|
||||
desc = "Refactor",
|
||||
},
|
||||
{
|
||||
"<leader>ri",
|
||||
function()
|
||||
require("refactoring").refactor("Inline Variable")
|
||||
end,
|
||||
mode = { "n", "v" },
|
||||
desc = "Inline Variable",
|
||||
},
|
||||
{
|
||||
"<leader>rb",
|
||||
function()
|
||||
require("refactoring").refactor("Extract Block")
|
||||
end,
|
||||
desc = "Extract Block",
|
||||
},
|
||||
{
|
||||
"<leader>rf",
|
||||
function()
|
||||
require("refactoring").refactor("Extract Block To File")
|
||||
end,
|
||||
desc = "Extract Block To File",
|
||||
},
|
||||
{
|
||||
"<leader>rP",
|
||||
function()
|
||||
require("refactoring").debug.printf({ below = false })
|
||||
end,
|
||||
desc = "Debug Print",
|
||||
},
|
||||
{
|
||||
"<leader>rp",
|
||||
function()
|
||||
require("refactoring").debug.print_var({ normal = true })
|
||||
end,
|
||||
desc = "Debug Print Variable",
|
||||
},
|
||||
{
|
||||
"<leader>rc",
|
||||
function()
|
||||
require("refactoring").debug.cleanup({})
|
||||
end,
|
||||
desc = "Debug Cleanup",
|
||||
},
|
||||
{
|
||||
"<leader>rf",
|
||||
function()
|
||||
require("refactoring").refactor("Extract Function")
|
||||
end,
|
||||
mode = "v",
|
||||
desc = "Extract Function",
|
||||
},
|
||||
{
|
||||
"<leader>rF",
|
||||
function()
|
||||
require("refactoring").refactor("Extract Function To File")
|
||||
end,
|
||||
mode = "v",
|
||||
desc = "Extract Function To File",
|
||||
},
|
||||
{
|
||||
"<leader>rx",
|
||||
function()
|
||||
require("refactoring").refactor("Extract Variable")
|
||||
end,
|
||||
mode = "v",
|
||||
desc = "Extract Variable",
|
||||
},
|
||||
{
|
||||
"<leader>rp",
|
||||
function()
|
||||
require("refactoring").debug.print_var()
|
||||
end,
|
||||
mode = "v",
|
||||
desc = "Debug Print Variable",
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
prompt_func_return_type = {
|
||||
go = false,
|
||||
java = false,
|
||||
cpp = false,
|
||||
c = false,
|
||||
h = false,
|
||||
hpp = false,
|
||||
cxx = false,
|
||||
},
|
||||
prompt_func_param_type = {
|
||||
go = false,
|
||||
java = false,
|
||||
cpp = false,
|
||||
c = false,
|
||||
h = false,
|
||||
hpp = false,
|
||||
cxx = false,
|
||||
},
|
||||
printf_statements = {},
|
||||
print_var_statements = {},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("refactoring").setup(opts)
|
||||
if LazyVim.has("telescope.nvim") then
|
||||
LazyVim.on_load("telescope.nvim", function()
|
||||
require("telescope").load_extension("refactoring")
|
||||
end)
|
||||
end
|
||||
end,
|
||||
},
|
||||
}
|
@ -1,14 +1,16 @@
|
||||
local Config = require("lazyvim.config")
|
||||
|
||||
for _, other in ipairs({ "aerial", "outline" }) do
|
||||
local extra = "lazyvim.plugins.extras.editor." .. other
|
||||
if vim.tbl_contains(Config.json.data.extras, extra) then
|
||||
other = other:gsub("^%l", string.upper)
|
||||
LazyVim.error({
|
||||
"**Trouble v3** includes support for document symbols.",
|
||||
("You currently have the **%s** extra enabled."):format(other),
|
||||
"Please disable it in your config.",
|
||||
})
|
||||
if vim.tbl_contains(Config.json.data.extras, "lazyvim.plugins.extras.editor.trouble-v3") then
|
||||
for _, other in ipairs({ "aerial", "outline" }) do
|
||||
local extra = "lazyvim.plugins.extras.editor." .. other
|
||||
if vim.tbl_contains(Config.json.data.extras, extra) then
|
||||
other = other:gsub("^%l", string.upper)
|
||||
LazyVim.error({
|
||||
"**Trouble v3** includes support for document symbols.",
|
||||
("You currently have the **%s** extra enabled."):format(other),
|
||||
"Please disable it in your config.",
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -20,8 +22,27 @@ return {
|
||||
{ "<leader>xx", "<cmd>Trouble diagnostics toggle<cr>", desc = "Diagnostics (Trouble)" },
|
||||
{ "<leader>xX", "<cmd>Trouble diagnostics toggle filter.buf=0<cr>", desc = "Buffer Diagnostics (Trouble)" },
|
||||
{ "<leader>cs", "<cmd>Trouble symbols toggle focus=false<cr>", desc = "Symbols (Trouble)" },
|
||||
{
|
||||
"<leader>cS",
|
||||
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
|
||||
desc = "LSP references/definitions/... (Trouble)",
|
||||
},
|
||||
{ "<leader>xL", "<cmd>Trouble loclist toggle<cr>", desc = "Location List (Trouble)" },
|
||||
{ "<leader>xQ", "<cmd>Trouble qflist toggle<cr>", desc = "Quickfix List (Trouble)" },
|
||||
{
|
||||
"[q",
|
||||
function()
|
||||
if require("trouble").is_open() then
|
||||
require("trouble").prev({ skip_groups = true, jump = true })
|
||||
else
|
||||
local ok, err = pcall(vim.cmd.cprev)
|
||||
if not ok then
|
||||
vim.notify(err, vim.log.levels.ERROR)
|
||||
end
|
||||
end
|
||||
end,
|
||||
desc = "Previous Trouble/Quickfix Item",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@ -37,7 +58,7 @@ return {
|
||||
end
|
||||
|
||||
local symbols = trouble.statusline({
|
||||
mode = "lsp_document_symbols",
|
||||
mode = "symbols",
|
||||
groups = {},
|
||||
title = false,
|
||||
filter = { range = true },
|
||||
@ -54,10 +75,6 @@ return {
|
||||
"folke/edgy.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
-- disable for now
|
||||
do
|
||||
return
|
||||
end
|
||||
for _, pos in ipairs({ "top", "bottom", "left", "right" }) do
|
||||
opts[pos] = opts[pos] or {}
|
||||
table.insert(opts[pos], {
|
||||
@ -73,4 +90,22 @@ return {
|
||||
end
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
local open_with_trouble = require("trouble.sources.telescope").open
|
||||
return vim.tbl_deep_extend("force", opts, {
|
||||
defaults = {
|
||||
mappings = {
|
||||
i = {
|
||||
["<c-t>"] = open_with_trouble,
|
||||
["<a-t>"] = open_with_trouble,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
@ -25,12 +25,14 @@ return {
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-ansible",
|
||||
ft = {},
|
||||
keys = {
|
||||
{
|
||||
"<leader>tr",
|
||||
"<leader>ta",
|
||||
function()
|
||||
require("ansible").run()
|
||||
end,
|
||||
desc = "Ansible Run Playbook/Role",
|
||||
silent = true,
|
||||
},
|
||||
},
|
||||
|
@ -144,7 +144,7 @@ return {
|
||||
type = "codelldb",
|
||||
request = "attach",
|
||||
name = "Attach to process",
|
||||
processId = require("dap.utils").pick_process,
|
||||
pid = require("dap.utils").pick_process,
|
||||
cwd = "${workspaceFolder}",
|
||||
},
|
||||
}
|
||||
|
@ -96,4 +96,18 @@ return {
|
||||
end
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-neotest/neotest",
|
||||
optional = true,
|
||||
dependencies = {
|
||||
"Issafalcon/neotest-dotnet",
|
||||
},
|
||||
opts = {
|
||||
adapters = {
|
||||
["neotest-dotnet"] = {
|
||||
-- Here we can set options for neotest-dotnet
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -2,9 +2,11 @@ if lazyvim_docs then
|
||||
-- LSP Server to use for Python.
|
||||
-- Set to "basedpyright" to use basedpyright instead of pyright.
|
||||
vim.g.lazyvim_python_lsp = "pyright"
|
||||
vim.g.lazyvim_python_ruff = "ruff_lsp"
|
||||
end
|
||||
|
||||
local lsp = vim.g.lazyvim_python_lsp or "pyright"
|
||||
local ruff = vim.g.lazyvim_python_ruff or "ruff_lsp"
|
||||
|
||||
return {
|
||||
{
|
||||
@ -29,6 +31,12 @@ return {
|
||||
enabled = true,
|
||||
},
|
||||
ruff_lsp = {
|
||||
enabled = ruff == "ruff_lsp",
|
||||
},
|
||||
ruff = {
|
||||
enabled = ruff == "ruff",
|
||||
},
|
||||
[ruff] = {
|
||||
keys = {
|
||||
{
|
||||
"<leader>co",
|
||||
@ -47,9 +55,9 @@ return {
|
||||
},
|
||||
},
|
||||
setup = {
|
||||
ruff_lsp = function()
|
||||
[ruff] = function()
|
||||
LazyVim.lsp.on_attach(function(client, _)
|
||||
if client.name == "ruff_lsp" then
|
||||
if client.name == ruff then
|
||||
-- Disable hover in favor of Pyright
|
||||
client.server_capabilities.hoverProvider = false
|
||||
end
|
||||
|
@ -8,7 +8,7 @@ return {
|
||||
"Saecki/crates.nvim",
|
||||
event = { "BufRead Cargo.toml" },
|
||||
opts = {
|
||||
src = {
|
||||
completion = {
|
||||
cmp = { enabled = true },
|
||||
},
|
||||
},
|
||||
@ -60,7 +60,9 @@ return {
|
||||
cargo = {
|
||||
allFeatures = true,
|
||||
loadOutDirsFromCheck = true,
|
||||
runBuildScripts = true,
|
||||
buildScripts = {
|
||||
enable = true,
|
||||
},
|
||||
},
|
||||
-- Add clippy lints for Rust.
|
||||
checkOnSave = {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user