Compare commits
122 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 | |||
b26be29330 | |||
8f1fb60f0a | |||
e29c7acd2d | |||
a786c471df | |||
9a2f773090 | |||
bb6aa98cbf | |||
dd54a29cc5 | |||
d95c2ba1dc | |||
bf8ce8076e | |||
cfbd358273 | |||
e3075b05ef | |||
c901640167 | |||
d945137a32 | |||
bb1480a6b9 | |||
6ed771de9d | |||
ce5917a589 | |||
2a8bfccc3e | |||
eb9f9a8862 | |||
7d570fad79 | |||
1910cd5cb7 |
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: |
|
||||
|
161
CHANGELOG.md
161
CHANGELOG.md
@ -1,5 +1,166 @@
|
||||
# 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)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **cmp:** added option `auto_brackets` that adds brackets to functions/methods in configured filetypes ([bf8ce80](https://github.com/LazyVim/LazyVim/commit/bf8ce8076e283ecabce6b2f2a04995b3deeeb593))
|
||||
* **extras:** added extra for mini.diff ([e29c7ac](https://github.com/LazyVim/LazyVim/commit/e29c7acd2d149da8166f2f44c920cc7d5c89971a))
|
||||
* **extras:** added extra for the `trouble.nvim` v3 beta ([bb6aa98](https://github.com/LazyVim/LazyVim/commit/bb6aa98cbfe0547150be89dc42f35e3b3eef8b5d))
|
||||
* **extras:** use mini.move instead of native move ([#2865](https://github.com/LazyVim/LazyVim/issues/2865)) ([8f1fb60](https://github.com/LazyVim/LazyVim/commit/8f1fb60f0a78cb2e83b485e1f946822812c5ff50))
|
||||
* **python:** enable auto_brackets for python, since pyright and basedpyright dont support this natively ([d95c2ba](https://github.com/LazyVim/LazyVim/commit/d95c2ba1dc75307b154c870aa808f322debc6070))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **config:** type filter was broken for telescope symbols ([e3075b0](https://github.com/LazyVim/LazyVim/commit/e3075b05ef9646e07639ae896bd8896f68ad5d5f))
|
||||
* **nvim-lint:** don't duplicate linters. Fixes [#2852](https://github.com/LazyVim/LazyVim/issues/2852) ([cfbd358](https://github.com/LazyVim/LazyVim/commit/cfbd3582736286433ee5532e1ea3a8d05a1e2649))
|
||||
* **statuscolumn:** right align signs when virtnum > 0 ([a786c47](https://github.com/LazyVim/LazyVim/commit/a786c471df5c048690618b6ff17fa2bc9648891d))
|
||||
* **trouble:** show message if use hasnt updated with Lazy yet after enabling the extra ([9a2f773](https://github.com/LazyVim/LazyVim/commit/9a2f7730907fd9124ec536f8dc2ad0a253f18f36))
|
||||
|
||||
## [10.19.0](https://github.com/LazyVim/LazyVim/compare/v10.18.0...v10.19.0) (2024-03-27)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **lazygit:** allow customizing the lazygit theme. Check the code to change the hl group mapping. Fixes [#2846](https://github.com/LazyVim/LazyVim/issues/2846) ([bb1480a](https://github.com/LazyVim/LazyVim/commit/bb1480a6b9ca9e524450192423eac88ba2a32e18))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **autocmds:** auto create directory on windows for uris. Fixes [#2442](https://github.com/LazyVim/LazyVim/issues/2442) ([7d570fa](https://github.com/LazyVim/LazyVim/commit/7d570fad7949288711c6238468add594963cabaa))
|
||||
* **keymaps:** update all keymap descriptions to be Title Case ([#2844](https://github.com/LazyVim/LazyVim/issues/2844)) ([eb9f9a8](https://github.com/LazyVim/LazyVim/commit/eb9f9a8862983abe1c7dd51f5f6bf2bd6978346f))
|
||||
* **lazygit:** error handling for getting lazygit's config path ([ce5917a](https://github.com/LazyVim/LazyVim/commit/ce5917a58965b47ed09462ddb5d160dee2b130ae))
|
||||
* **lazygit:** use `Visual` instead of `CursorLine` for selected line. Fixes [#2846](https://github.com/LazyVim/LazyVim/issues/2846) ([6ed771d](https://github.com/LazyVim/LazyVim/commit/6ed771de9dd3b14de78e83ed1c62b4f4fcee3c03))
|
||||
* **python-semshi:** better highlights ([#2839](https://github.com/LazyVim/LazyVim/issues/2839)) ([d945137](https://github.com/LazyVim/LazyVim/commit/d945137a323c6c0200af50444981c7d05ed93f3f))
|
||||
|
||||
## [10.18.0](https://github.com/LazyVim/LazyVim/compare/v10.17.3...v10.18.0) (2024-03-26)
|
||||
|
||||
|
||||
|
46
NEWS.md
46
NEWS.md
@ -1,7 +1,53 @@
|
||||
# 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)
|
||||
This is a plugin similar to gitsigns but with a neat diff overlay
|
||||
that can be toggled with `<leader>go`.
|
||||
|
||||
- **trouble.nvim** has been rewritten from scratch and is now in beta.
|
||||
I've added a new extra for it (`trouble-v3`) for those of you who want to try it out.
|
||||
You can find the updated docs [here](https://github.com/folke/trouble.nvim/tree/dev)
|
||||
|
||||
- The **lazygit** integration now configures:
|
||||
|
||||
- the theme based on the colorscheme
|
||||
|
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 26
|
||||
*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 May 16
|
||||
|
||||
==============================================================================
|
||||
Table of Contents *LazyVim-table-of-contents*
|
||||
@ -8,6 +8,7 @@ Table of Contents *LazyVim-table-of-contents*
|
||||
- Getting Started |LazyVim-getting-started|
|
||||
- File Structure |LazyVim-file-structure|
|
||||
- Configuration |LazyVim-configuration|
|
||||
1. Links |LazyVim-links|
|
||||
|
||||
Install
|
||||
·
|
||||
|
@ -59,7 +59,6 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||
"lspinfo",
|
||||
"notify",
|
||||
"qf",
|
||||
"query",
|
||||
"spectre_panel",
|
||||
"startuptime",
|
||||
"tsplayground",
|
||||
@ -106,7 +105,7 @@ vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
||||
group = augroup("auto_create_dir"),
|
||||
callback = function(event)
|
||||
if event.match:match("^%w%w+://") then
|
||||
if event.match:match("^%w%w+:[\\/][\\/]") then
|
||||
return
|
||||
end
|
||||
local file = vim.uv.fs_realpath(event.match) or event.match
|
||||
|
@ -3,7 +3,8 @@ _G.LazyVim = require("lazyvim.util")
|
||||
---@class LazyVimConfig: LazyVimOptions
|
||||
local M = {}
|
||||
|
||||
M.version = "10.18.0" -- x-release-please-version
|
||||
M.version = "10.21.1" -- x-release-please-version
|
||||
LazyVim.config = M
|
||||
|
||||
---@class LazyVimOptions
|
||||
local defaults = {
|
||||
@ -221,6 +222,9 @@ function M.get_kind_filter(buf)
|
||||
if M.kind_filter[ft] == false then
|
||||
return
|
||||
end
|
||||
if type(M.kind_filter[ft]) == "table" then
|
||||
return M.kind_filter[ft]
|
||||
end
|
||||
---@diagnostic disable-next-line: return-type-mismatch
|
||||
return type(M.kind_filter) == "table" and type(M.kind_filter.default) == "table" and M.kind_filter.default or nil
|
||||
end
|
||||
|
@ -1,45 +1,45 @@
|
||||
-- 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 })
|
||||
map("n", "<C-j>", "<C-w>j", { desc = "Go to lower window", remap = true })
|
||||
map("n", "<C-k>", "<C-w>k", { desc = "Go to upper window", remap = true })
|
||||
map("n", "<C-l>", "<C-w>l", { desc = "Go to right window", remap = true })
|
||||
map("n", "<C-h>", "<C-w>h", { desc = "Go to Left Window", remap = true })
|
||||
map("n", "<C-j>", "<C-w>j", { desc = "Go to Lower Window", remap = true })
|
||||
map("n", "<C-k>", "<C-w>k", { desc = "Go to Upper Window", remap = true })
|
||||
map("n", "<C-l>", "<C-w>l", { desc = "Go to Right Window", remap = true })
|
||||
|
||||
-- Resize window using <ctrl> arrow keys
|
||||
map("n", "<C-Up>", "<cmd>resize +2<cr>", { desc = "Increase window height" })
|
||||
map("n", "<C-Down>", "<cmd>resize -2<cr>", { desc = "Decrease window height" })
|
||||
map("n", "<C-Left>", "<cmd>vertical resize -2<cr>", { desc = "Decrease window width" })
|
||||
map("n", "<C-Right>", "<cmd>vertical resize +2<cr>", { desc = "Increase window width" })
|
||||
map("n", "<C-Up>", "<cmd>resize +2<cr>", { desc = "Increase Window Height" })
|
||||
map("n", "<C-Down>", "<cmd>resize -2<cr>", { desc = "Decrease Window Height" })
|
||||
map("n", "<C-Left>", "<cmd>vertical resize -2<cr>", { desc = "Decrease Window Width" })
|
||||
map("n", "<C-Right>", "<cmd>vertical resize +2<cr>", { desc = "Increase Window Width" })
|
||||
|
||||
-- Move Lines
|
||||
map("n", "<A-j>", "<cmd>m .+1<cr>==", { desc = "Move down" })
|
||||
map("n", "<A-k>", "<cmd>m .-2<cr>==", { desc = "Move up" })
|
||||
map("i", "<A-j>", "<esc><cmd>m .+1<cr>==gi", { desc = "Move down" })
|
||||
map("i", "<A-k>", "<esc><cmd>m .-2<cr>==gi", { desc = "Move up" })
|
||||
map("v", "<A-j>", ":m '>+1<cr>gv=gv", { desc = "Move down" })
|
||||
map("v", "<A-k>", ":m '<-2<cr>gv=gv", { desc = "Move up" })
|
||||
map("n", "<A-j>", "<cmd>m .+1<cr>==", { desc = "Move Down" })
|
||||
map("n", "<A-k>", "<cmd>m .-2<cr>==", { desc = "Move Up" })
|
||||
map("i", "<A-j>", "<esc><cmd>m .+1<cr>==gi", { desc = "Move Down" })
|
||||
map("i", "<A-k>", "<esc><cmd>m .-2<cr>==gi", { desc = "Move Up" })
|
||||
map("v", "<A-j>", ":m '>+1<cr>gv=gv", { desc = "Move Down" })
|
||||
map("v", "<A-k>", ":m '<-2<cr>gv=gv", { desc = "Move Up" })
|
||||
|
||||
-- buffers
|
||||
map("n", "<S-h>", "<cmd>bprevious<cr>", { desc = "Prev buffer" })
|
||||
map("n", "<S-l>", "<cmd>bnext<cr>", { desc = "Next buffer" })
|
||||
map("n", "[b", "<cmd>bprevious<cr>", { desc = "Prev buffer" })
|
||||
map("n", "]b", "<cmd>bnext<cr>", { desc = "Next buffer" })
|
||||
map("n", "<S-h>", "<cmd>bprevious<cr>", { desc = "Prev Buffer" })
|
||||
map("n", "<S-l>", "<cmd>bnext<cr>", { desc = "Next Buffer" })
|
||||
map("n", "[b", "<cmd>bprevious<cr>", { desc = "Prev Buffer" })
|
||||
map("n", "]b", "<cmd>bnext<cr>", { desc = "Next Buffer" })
|
||||
map("n", "<leader>bb", "<cmd>e #<cr>", { desc = "Switch to Other Buffer" })
|
||||
map("n", "<leader>`", "<cmd>e #<cr>", { desc = "Switch to Other Buffer" })
|
||||
|
||||
-- Clear search with <esc>
|
||||
map({ "i", "n" }, "<esc>", "<cmd>noh<cr><esc>", { desc = "Escape and clear hlsearch" })
|
||||
map({ "i", "n" }, "<esc>", "<cmd>noh<cr><esc>", { desc = "Escape and Clear hlsearch" })
|
||||
|
||||
-- Clear search, diff update and redraw
|
||||
-- taken from runtime/lua/_editor.lua
|
||||
@ -47,16 +47,16 @@ map(
|
||||
"n",
|
||||
"<leader>ur",
|
||||
"<Cmd>nohlsearch<Bar>diffupdate<Bar>normal! <C-L><CR>",
|
||||
{ desc = "Redraw / clear hlsearch / diff update" }
|
||||
{ desc = "Redraw / Clear hlsearch / Diff Update" }
|
||||
)
|
||||
|
||||
-- https://github.com/mhinz/vim-galore#saner-behavior-of-n-and-n
|
||||
map("n", "n", "'Nn'[v:searchforward].'zv'", { expr = true, desc = "Next search result" })
|
||||
map("x", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
|
||||
map("o", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
|
||||
map("n", "N", "'nN'[v:searchforward].'zv'", { expr = true, desc = "Prev search result" })
|
||||
map("x", "N", "'nN'[v:searchforward]", { expr = true, desc = "Prev search result" })
|
||||
map("o", "N", "'nN'[v:searchforward]", { expr = true, desc = "Prev search result" })
|
||||
map("n", "n", "'Nn'[v:searchforward].'zv'", { expr = true, desc = "Next Search Result" })
|
||||
map("x", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next Search Result" })
|
||||
map("o", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next Search Result" })
|
||||
map("n", "N", "'nN'[v:searchforward].'zv'", { expr = true, desc = "Prev Search Result" })
|
||||
map("x", "N", "'nN'[v:searchforward]", { expr = true, desc = "Prev Search Result" })
|
||||
map("o", "N", "'nN'[v:searchforward]", { expr = true, desc = "Prev Search Result" })
|
||||
|
||||
-- Add undo break-points
|
||||
map("i", ",", ",<c-g>u")
|
||||
@ -64,7 +64,7 @@ map("i", ".", ".<c-g>u")
|
||||
map("i", ";", ";<c-g>u")
|
||||
|
||||
-- save file
|
||||
map({ "i", "x", "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" })
|
||||
@ -82,8 +82,8 @@ map("n", "<leader>fn", "<cmd>enew<cr>", { desc = "New File" })
|
||||
map("n", "<leader>xl", "<cmd>lopen<cr>", { desc = "Location List" })
|
||||
map("n", "<leader>xq", "<cmd>copen<cr>", { desc = "Quickfix List" })
|
||||
|
||||
map("n", "[q", vim.cmd.cprev, { desc = "Previous quickfix" })
|
||||
map("n", "]q", vim.cmd.cnext, { desc = "Next quickfix" })
|
||||
map("n", "[q", vim.cmd.cprev, { desc = "Previous Quickfix" })
|
||||
map("n", "]q", vim.cmd.cnext, { desc = "Next Quickfix" })
|
||||
|
||||
-- formatting
|
||||
map({ "n", "v" }, "<leader>cf", function()
|
||||
@ -109,8 +109,8 @@ map("n", "[w", diagnostic_goto(false, "WARN"), { desc = "Prev Warning" })
|
||||
-- stylua: ignore start
|
||||
|
||||
-- toggle options
|
||||
map("n", "<leader>uf", function() LazyVim.format.toggle() end, { desc = "Toggle auto format (global)" })
|
||||
map("n", "<leader>uF", function() LazyVim.format.toggle(true) end, { desc = "Toggle auto format (buffer)" })
|
||||
map("n", "<leader>uf", function() LazyVim.format.toggle() end, { desc = "Toggle Auto Format (Global)" })
|
||||
map("n", "<leader>uF", function() LazyVim.format.toggle(true) end, { desc = "Toggle Auto Format (Buffer)" })
|
||||
map("n", "<leader>us", function() LazyVim.toggle("spell") end, { desc = "Toggle Spelling" })
|
||||
map("n", "<leader>uw", function() LazyVim.toggle("wrap") end, { desc = "Toggle Word Wrap" })
|
||||
map("n", "<leader>uL", function() LazyVim.toggle("relativenumber") end, { desc = "Toggle Relative Line Numbers" })
|
||||
@ -125,46 +125,48 @@ map("n", "<leader>uT", function() if vim.b.ts_highlight then vim.treesitter.stop
|
||||
map("n", "<leader>ub", function() LazyVim.toggle("background", false, {"light", "dark"}) end, { desc = "Toggle Background" })
|
||||
|
||||
-- lazygit
|
||||
map("n", "<leader>gg", function() LazyVim.lazygit( { cwd = LazyVim.root.git() }) end, { desc = "Lazygit (root dir)" })
|
||||
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)
|
||||
LazyVim.lazygit({args = { "-f", vim.trim(git_path) }})
|
||||
end, { desc = "Lazygit current file history" })
|
||||
end, { desc = "Lazygit Current File History" })
|
||||
|
||||
-- quit
|
||||
map("n", "<leader>qq", "<cmd>qa<cr>", { desc = "Quit all" })
|
||||
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" })
|
||||
|
||||
-- floating terminal
|
||||
local lazyterm = function() LazyVim.terminal(nil, { cwd = LazyVim.root() }) end
|
||||
map("n", "<leader>ft", lazyterm, { desc = "Terminal (root dir)" })
|
||||
map("n", "<leader>ft", lazyterm, { desc = "Terminal (Root Dir)" })
|
||||
map("n", "<leader>fT", function() LazyVim.terminal() end, { desc = "Terminal (cwd)" })
|
||||
map("n", "<c-/>", lazyterm, { desc = "Terminal (root dir)" })
|
||||
map("n", "<c-/>", lazyterm, { desc = "Terminal (Root Dir)" })
|
||||
map("n", "<c-_>", lazyterm, { desc = "which_key_ignore" })
|
||||
|
||||
-- Terminal Mappings
|
||||
map("t", "<esc><esc>", "<c-\\><c-n>", { desc = "Enter Normal Mode" })
|
||||
map("t", "<C-h>", "<cmd>wincmd h<cr>", { desc = "Go to left window" })
|
||||
map("t", "<C-j>", "<cmd>wincmd j<cr>", { desc = "Go to lower window" })
|
||||
map("t", "<C-k>", "<cmd>wincmd k<cr>", { desc = "Go to upper window" })
|
||||
map("t", "<C-l>", "<cmd>wincmd l<cr>", { desc = "Go to right window" })
|
||||
map("t", "<C-h>", "<cmd>wincmd h<cr>", { desc = "Go to Left Window" })
|
||||
map("t", "<C-j>", "<cmd>wincmd j<cr>", { desc = "Go to Lower Window" })
|
||||
map("t", "<C-k>", "<cmd>wincmd k<cr>", { desc = "Go to Upper Window" })
|
||||
map("t", "<C-l>", "<cmd>wincmd l<cr>", { desc = "Go to Right Window" })
|
||||
map("t", "<C-/>", "<cmd>close<cr>", { desc = "Hide Terminal" })
|
||||
map("t", "<c-_>", "<cmd>close<cr>", { desc = "which_key_ignore" })
|
||||
|
||||
-- windows
|
||||
map("n", "<leader>ww", "<C-W>p", { desc = "Other window", remap = true })
|
||||
map("n", "<leader>wd", "<C-W>c", { desc = "Delete window", remap = true })
|
||||
map("n", "<leader>w-", "<C-W>s", { desc = "Split window below", remap = true })
|
||||
map("n", "<leader>w|", "<C-W>v", { desc = "Split window right", remap = true })
|
||||
map("n", "<leader>-", "<C-W>s", { desc = "Split window below", remap = true })
|
||||
map("n", "<leader>|", "<C-W>v", { desc = "Split window right", remap = true })
|
||||
map("n", "<leader>ww", "<C-W>p", { desc = "Other Window", remap = true })
|
||||
map("n", "<leader>wd", "<C-W>c", { desc = "Delete Window", remap = true })
|
||||
map("n", "<leader>w-", "<C-W>s", { desc = "Split Window Below", remap = true })
|
||||
map("n", "<leader>w|", "<C-W>v", { desc = "Split Window Right", remap = true })
|
||||
map("n", "<leader>-", "<C-W>s", { desc = "Split Window Below", remap = true })
|
||||
map("n", "<leader>|", "<C-W>v", { desc = "Split Window Right", remap = true })
|
||||
|
||||
-- tabs
|
||||
map("n", "<leader><tab>l", "<cmd>tablast<cr>", { desc = "Last Tab" })
|
||||
|
@ -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
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,6 @@
|
||||
local have_make = vim.fn.executable("make") == 1
|
||||
local have_cmake = vim.fn.executable("cmake") == 1
|
||||
|
||||
return {
|
||||
|
||||
-- file explorer
|
||||
@ -11,7 +14,7 @@ return {
|
||||
function()
|
||||
require("neo-tree.command").execute({ toggle = true, dir = LazyVim.root() })
|
||||
end,
|
||||
desc = "Explorer NeoTree (root dir)",
|
||||
desc = "Explorer NeoTree (Root Dir)",
|
||||
},
|
||||
{
|
||||
"<leader>fE",
|
||||
@ -20,33 +23,44 @@ return {
|
||||
end,
|
||||
desc = "Explorer NeoTree (cwd)",
|
||||
},
|
||||
{ "<leader>e", "<leader>fe", desc = "Explorer NeoTree (root dir)", remap = true },
|
||||
{ "<leader>e", "<leader>fe", desc = "Explorer NeoTree (Root Dir)", remap = true },
|
||||
{ "<leader>E", "<leader>fE", desc = "Explorer NeoTree (cwd)", remap = true },
|
||||
{
|
||||
"<leader>ge",
|
||||
function()
|
||||
require("neo-tree.command").execute({ source = "git_status", toggle = true })
|
||||
end,
|
||||
desc = "Git explorer",
|
||||
desc = "Git Explorer",
|
||||
},
|
||||
{
|
||||
"<leader>be",
|
||||
function()
|
||||
require("neo-tree.command").execute({ source = "buffers", toggle = true })
|
||||
end,
|
||||
desc = "Buffer explorer",
|
||||
desc = "Buffer Explorer",
|
||||
},
|
||||
},
|
||||
deactivate = function()
|
||||
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" },
|
||||
@ -65,13 +79,13 @@ return {
|
||||
local path = node:get_id()
|
||||
vim.fn.setreg("+", path, "c")
|
||||
end,
|
||||
desc = "copy path to clipboard",
|
||||
desc = "Copy Path to Clipboard",
|
||||
},
|
||||
["O"] = {
|
||||
function(state)
|
||||
require("lazy.util").open(state.tree:get_node().path, { system = true })
|
||||
end,
|
||||
desc = "open with system application",
|
||||
desc = "Open with System Application",
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -115,7 +129,7 @@ return {
|
||||
opts = { open_cmd = "noswapfile vnew" },
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>sr", function() require("spectre").open() end, desc = "Replace in files (Spectre)" },
|
||||
{ "<leader>sr", function() require("spectre").open() end, desc = "Replace in Files (Spectre)" },
|
||||
},
|
||||
},
|
||||
|
||||
@ -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,
|
||||
},
|
||||
@ -146,29 +171,29 @@ return {
|
||||
"<cmd>Telescope buffers sort_mru=true sort_lastused=true<cr>",
|
||||
desc = "Switch Buffer",
|
||||
},
|
||||
{ "<leader>/", LazyVim.telescope("live_grep"), desc = "Grep (root dir)" },
|
||||
{ "<leader>/", LazyVim.telescope("live_grep"), desc = "Grep (Root Dir)" },
|
||||
{ "<leader>:", "<cmd>Telescope command_history<cr>", desc = "Command History" },
|
||||
{ "<leader><space>", LazyVim.telescope("files"), desc = "Find Files (root dir)" },
|
||||
{ "<leader><space>", LazyVim.telescope("files"), desc = "Find Files (Root Dir)" },
|
||||
-- find
|
||||
{ "<leader>fb", "<cmd>Telescope buffers sort_mru=true sort_lastused=true<cr>", desc = "Buffers" },
|
||||
{ "<leader>fc", LazyVim.telescope.config_files(), desc = "Find Config File" },
|
||||
{ "<leader>ff", LazyVim.telescope("files"), desc = "Find Files (root dir)" },
|
||||
{ "<leader>ff", LazyVim.telescope("files"), desc = "Find Files (Root Dir)" },
|
||||
{ "<leader>fF", LazyVim.telescope("files", { cwd = false }), desc = "Find Files (cwd)" },
|
||||
{ "<leader>fg", "<cmd>Telescope git_files<cr>", desc = "Find Files (git-files)" },
|
||||
{ "<leader>fr", "<cmd>Telescope oldfiles<cr>", desc = "Recent" },
|
||||
{ "<leader>fR", LazyVim.telescope("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" },
|
||||
-- git
|
||||
{ "<leader>gc", "<cmd>Telescope git_commits<CR>", desc = "commits" },
|
||||
{ "<leader>gs", "<cmd>Telescope git_status<CR>", desc = "status" },
|
||||
{ "<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" },
|
||||
{ "<leader>sC", "<cmd>Telescope commands<cr>", desc = "Commands" },
|
||||
{ "<leader>sd", "<cmd>Telescope diagnostics bufnr=0<cr>", desc = "Document diagnostics" },
|
||||
{ "<leader>sD", "<cmd>Telescope diagnostics<cr>", desc = "Workspace diagnostics" },
|
||||
{ "<leader>sg", LazyVim.telescope("live_grep"), desc = "Grep (root dir)" },
|
||||
{ "<leader>sd", "<cmd>Telescope diagnostics bufnr=0<cr>", desc = "Document Diagnostics" },
|
||||
{ "<leader>sD", "<cmd>Telescope diagnostics<cr>", desc = "Workspace Diagnostics" },
|
||||
{ "<leader>sg", LazyVim.telescope("live_grep"), desc = "Grep (Root Dir)" },
|
||||
{ "<leader>sG", LazyVim.telescope("live_grep", { cwd = false }), desc = "Grep (cwd)" },
|
||||
{ "<leader>sh", "<cmd>Telescope help_tags<cr>", desc = "Help Pages" },
|
||||
{ "<leader>sH", "<cmd>Telescope highlights<cr>", desc = "Search Highlight Groups" },
|
||||
@ -177,11 +202,11 @@ 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", LazyVim.telescope("grep_string", { word_match = "-w" }), desc = "Word (root dir)" },
|
||||
{ "<leader>sw", LazyVim.telescope("grep_string", { word_match = "-w" }), desc = "Word (Root Dir)" },
|
||||
{ "<leader>sW", LazyVim.telescope("grep_string", { cwd = false, word_match = "-w" }), desc = "Word (cwd)" },
|
||||
{ "<leader>sw", LazyVim.telescope("grep_string"), mode = "v", desc = "Selection (root dir)" },
|
||||
{ "<leader>sw", LazyVim.telescope("grep_string"), mode = "v", desc = "Selection (Root Dir)" },
|
||||
{ "<leader>sW", LazyVim.telescope("grep_string", { cwd = false }), mode = "v", desc = "Selection (cwd)" },
|
||||
{ "<leader>uC", LazyVim.telescope("colorscheme", { enable_preview = true }), desc = "Colorscheme with preview" },
|
||||
{ "<leader>uC", LazyVim.telescope("colorscheme", { enable_preview = true }), desc = "Colorscheme with Preview" },
|
||||
{
|
||||
"<leader>ss",
|
||||
function()
|
||||
@ -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",
|
||||
@ -472,7 +498,7 @@ return {
|
||||
end
|
||||
end
|
||||
end,
|
||||
desc = "Previous trouble/quickfix item",
|
||||
desc = "Previous Trouble/Quickfix Item",
|
||||
},
|
||||
{
|
||||
"]q",
|
||||
@ -486,7 +512,7 @@ return {
|
||||
end
|
||||
end
|
||||
end,
|
||||
desc = "Next trouble/quickfix item",
|
||||
desc = "Next Trouble/Quickfix Item",
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -500,8 +526,8 @@ return {
|
||||
config = true,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next Todo Comment" },
|
||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous Todo Comment" },
|
||||
{ "<leader>xt", "<cmd>TodoTrouble<cr>", desc = "Todo (Trouble)" },
|
||||
{ "<leader>xT", "<cmd>TodoTrouble keywords=TODO,FIX,FIXME<cr>", desc = "Todo/Fix/Fixme (Trouble)" },
|
||||
{ "<leader>st", "<cmd>TodoTelescope<cr>", desc = "Todo" },
|
||||
|
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" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
@ -2,31 +2,31 @@ return {
|
||||
-- better yank/paste
|
||||
{
|
||||
"gbprod/yanky.nvim",
|
||||
dependencies = not jit.os:find("Windows") and { "kkharji/sqlite.lua" } or {},
|
||||
dependencies = not LazyVim.is_win() and { "kkharji/sqlite.lua" } or {},
|
||||
opts = {
|
||||
highlight = { timer = 250 },
|
||||
ring = { storage = jit.os:find("Windows") and "shada" or "sqlite" },
|
||||
highlight = { timer = 150 },
|
||||
ring = { storage = LazyVim.is_win() and "shada" or "sqlite" },
|
||||
},
|
||||
keys = {
|
||||
-- stylua: ignore
|
||||
{ "<leader>p", function() require("telescope").extensions.yank_history.yank_history({ }) end, desc = "Open Yank History" },
|
||||
{ "y", "<Plug>(YankyYank)", mode = { "n", "x" }, desc = "Yank text" },
|
||||
{ "p", "<Plug>(YankyPutAfter)", mode = { "n", "x" }, desc = "Put yanked text after cursor" },
|
||||
{ "P", "<Plug>(YankyPutBefore)", mode = { "n", "x" }, desc = "Put yanked text before cursor" },
|
||||
{ "gp", "<Plug>(YankyGPutAfter)", mode = { "n", "x" }, desc = "Put yanked text after selection" },
|
||||
{ "gP", "<Plug>(YankyGPutBefore)", mode = { "n", "x" }, desc = "Put yanked text before selection" },
|
||||
{ "[y", "<Plug>(YankyCycleForward)", desc = "Cycle forward through yank history" },
|
||||
{ "]y", "<Plug>(YankyCycleBackward)", desc = "Cycle backward through yank history" },
|
||||
{ "]p", "<Plug>(YankyPutIndentAfterLinewise)", desc = "Put indented after cursor (linewise)" },
|
||||
{ "[p", "<Plug>(YankyPutIndentBeforeLinewise)", desc = "Put indented before cursor (linewise)" },
|
||||
{ "]P", "<Plug>(YankyPutIndentAfterLinewise)", desc = "Put indented after cursor (linewise)" },
|
||||
{ "[P", "<Plug>(YankyPutIndentBeforeLinewise)", desc = "Put indented before cursor (linewise)" },
|
||||
{ ">p", "<Plug>(YankyPutIndentAfterShiftRight)", desc = "Put and indent right" },
|
||||
{ "<p", "<Plug>(YankyPutIndentAfterShiftLeft)", desc = "Put and indent left" },
|
||||
{ ">P", "<Plug>(YankyPutIndentBeforeShiftRight)", desc = "Put before and indent right" },
|
||||
{ "<P", "<Plug>(YankyPutIndentBeforeShiftLeft)", desc = "Put before and indent left" },
|
||||
{ "=p", "<Plug>(YankyPutAfterFilter)", desc = "Put after applying a filter" },
|
||||
{ "=P", "<Plug>(YankyPutBeforeFilter)", desc = "Put before applying a filter" },
|
||||
{ "y", "<Plug>(YankyYank)", mode = { "n", "x" }, desc = "Yank Text" },
|
||||
{ "p", "<Plug>(YankyPutAfter)", mode = { "n", "x" }, desc = "Put Yanked Text After Cursor" },
|
||||
{ "P", "<Plug>(YankyPutBefore)", mode = { "n", "x" }, desc = "Put Yanked Text Before Cursor" },
|
||||
{ "gp", "<Plug>(YankyGPutAfter)", mode = { "n", "x" }, desc = "Put Yanked Text After Selection" },
|
||||
{ "gP", "<Plug>(YankyGPutBefore)", mode = { "n", "x" }, desc = "Put Yanked Text Before Selection" },
|
||||
{ "[y", "<Plug>(YankyCycleForward)", desc = "Cycle Forward Through Yank History" },
|
||||
{ "]y", "<Plug>(YankyCycleBackward)", desc = "Cycle Backward Through Yank History" },
|
||||
{ "]p", "<Plug>(YankyPutIndentAfterLinewise)", desc = "Put Indented After Cursor (Linewise)" },
|
||||
{ "[p", "<Plug>(YankyPutIndentBeforeLinewise)", desc = "Put Indented Before Cursor (Linewise)" },
|
||||
{ "]P", "<Plug>(YankyPutIndentAfterLinewise)", desc = "Put Indented After Cursor (Linewise)" },
|
||||
{ "[P", "<Plug>(YankyPutIndentBeforeLinewise)", desc = "Put Indented Before Cursor (Linewise)" },
|
||||
{ ">p", "<Plug>(YankyPutIndentAfterShiftRight)", desc = "Put and Indent Right" },
|
||||
{ "<p", "<Plug>(YankyPutIndentAfterShiftLeft)", desc = "Put and Indent Left" },
|
||||
{ ">P", "<Plug>(YankyPutIndentBeforeShiftRight)", desc = "Put Before and Indent Right" },
|
||||
{ "<P", "<Plug>(YankyPutIndentBeforeShiftLeft)", desc = "Put Before and Indent Left" },
|
||||
{ "=p", "<Plug>(YankyPutAfterFilter)", desc = "Put After Applying a Filter" },
|
||||
{ "=P", "<Plug>(YankyPutBeforeFilter)", desc = "Put Before Applying a Filter" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -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
|
||||
@ -90,7 +93,7 @@ return {
|
||||
{ "<leader>dc", function() require("dap").continue() end, desc = "Continue" },
|
||||
{ "<leader>da", function() require("dap").continue({ before = get_args }) end, desc = "Run with Args" },
|
||||
{ "<leader>dC", function() require("dap").run_to_cursor() end, desc = "Run to Cursor" },
|
||||
{ "<leader>dg", function() require("dap").goto_() end, desc = "Go to line (no execute)" },
|
||||
{ "<leader>dg", function() require("dap").goto_() end, desc = "Go to Line (No Execute)" },
|
||||
{ "<leader>di", function() require("dap").step_into() end, desc = "Step Into" },
|
||||
{ "<leader>dj", function() require("dap").down() end, desc = "Down" },
|
||||
{ "<leader>dk", function() require("dap").up() end, desc = "Up" },
|
||||
@ -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,
|
||||
}
|
||||
|
@ -20,9 +20,9 @@ return {
|
||||
"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" },
|
||||
{ "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")
|
||||
@ -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
|
||||
|
54
lua/lazyvim/plugins/extras/editor/mini-diff.lua
Normal file
54
lua/lazyvim/plugins/extras/editor/mini-diff.lua
Normal file
@ -0,0 +1,54 @@
|
||||
return {
|
||||
-- disable gitsigns.nvim
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
enabled = false,
|
||||
},
|
||||
|
||||
-- setup mini.diff
|
||||
{
|
||||
"echasnovski/mini.diff",
|
||||
event = "VeryLazy",
|
||||
keys = {
|
||||
{
|
||||
"<leader>go",
|
||||
function()
|
||||
require("mini.diff").toggle_overlay(0)
|
||||
end,
|
||||
desc = "Toggle mini.diff overlay",
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
view = {
|
||||
style = "sign",
|
||||
signs = {
|
||||
add = "▎",
|
||||
change = "▎",
|
||||
delete = "",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- lualine integration
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
opts = function(_, opts)
|
||||
local x = opts.sections.lualine_x
|
||||
for _, comp in ipairs(x) do
|
||||
if comp[1] == "diff" then
|
||||
comp.source = function()
|
||||
local summary = vim.b.minidiff_summary
|
||||
return summary
|
||||
and {
|
||||
added = summary.add,
|
||||
modified = summary.change,
|
||||
removed = summary.delete,
|
||||
}
|
||||
end
|
||||
break
|
||||
end
|
||||
end
|
||||
end,
|
||||
},
|
||||
}
|
@ -18,7 +18,7 @@ return {
|
||||
function()
|
||||
require("mini.files").open(vim.api.nvim_buf_get_name(0), true)
|
||||
end,
|
||||
desc = "Open mini.files (directory of current file)",
|
||||
desc = "Open mini.files (Directory of Current File)",
|
||||
},
|
||||
{
|
||||
"<leader>fM",
|
||||
@ -50,7 +50,7 @@ return {
|
||||
callback = function(args)
|
||||
local buf_id = args.data.buf_id
|
||||
-- Tweak left-hand side of mapping to your liking
|
||||
vim.keymap.set("n", "g.", toggle_dotfiles, { buffer = buf_id, desc = "Toggle hidden files" })
|
||||
vim.keymap.set("n", "g.", toggle_dotfiles, { buffer = buf_id, desc = "Toggle Hidden Files" })
|
||||
end,
|
||||
})
|
||||
|
||||
|
7
lua/lazyvim/plugins/extras/editor/mini-move.lua
Normal file
7
lua/lazyvim/plugins/extras/editor/mini-move.lua
Normal file
@ -0,0 +1,7 @@
|
||||
return {
|
||||
{
|
||||
"echasnovski/mini.move",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
},
|
||||
}
|
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,
|
||||
},
|
||||
}
|
111
lua/lazyvim/plugins/extras/editor/trouble-v3.lua
Normal file
111
lua/lazyvim/plugins/extras/editor/trouble-v3.lua
Normal file
@ -0,0 +1,111 @@
|
||||
local Config = require("lazyvim.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
|
||||
|
||||
return {
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
branch = "dev",
|
||||
keys = {
|
||||
{ "<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",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- lualine integration
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
local trouble = require("trouble")
|
||||
if not trouble.statusline then
|
||||
LazyVim.error("You have enabled the **trouble-v3** extra,\nbut still need to update it with `:Lazy`")
|
||||
return
|
||||
end
|
||||
|
||||
local symbols = trouble.statusline({
|
||||
mode = "symbols",
|
||||
groups = {},
|
||||
title = false,
|
||||
filter = { range = true },
|
||||
format = "{kind_icon}{symbol.name:Normal}",
|
||||
})
|
||||
table.insert(opts.sections.lualine_c, {
|
||||
symbols.get,
|
||||
cond = symbols.has,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"folke/edgy.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
for _, pos in ipairs({ "top", "bottom", "left", "right" }) do
|
||||
opts[pos] = opts[pos] or {}
|
||||
table.insert(opts[pos], {
|
||||
ft = "trouble",
|
||||
filter = function(_buf, win)
|
||||
return vim.w[win].trouble
|
||||
and vim.w[win].trouble.position == pos
|
||||
and vim.w[win].trouble.type == "split"
|
||||
and vim.w[win].trouble.relative == "editor"
|
||||
and not vim.w[win].trouble_preview
|
||||
end,
|
||||
})
|
||||
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
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user