Compare commits

..

88 Commits

Author SHA1 Message Date
b984c0cff5 chore(main): release 1.21.0 (#449)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-17 16:44:09 +01:00
9f5a0f1bd8 feat(lsp): added keymap to see source actions with <leader>cA (useful for tsserver and others) 2023-03-17 16:29:32 +01:00
d0b378f427 chore(main): release 1.20.0 (#442)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-17 08:16:40 +01:00
aa4f7ec651 chore(build): auto-generate vimdoc 2023-03-17 07:05:01 +00:00
c10e550639 feat(lsp): make lsp work when mason-lspconfig is disabled. Fixed #445 2023-03-17 08:04:17 +01:00
f0b548af2f chore(build): auto-generate vimdoc 2023-03-16 11:17:38 +00:00
Lc
cec000dfd8 fix(icons): replace obsolete icons (#441)
* fix(icons): replace obsolete icons

* fix(icons): bigger icons

* fix(icons): bigger folder icon

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2023-03-16 12:16:55 +01:00
6b740fd300 chore(main): release 1.19.0 (#422)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-14 11:23:08 +01:00
564e25a277 chore(build): auto-generate vimdoc 2023-03-14 10:18:08 +00:00
df6ac591ba fix(core): set cond=true for LazyVim 2023-03-14 11:17:07 +01:00
bcdcfab020 feat(mini-starter): add Session restore to starter menu (#421)
This mirrors the menu item added in alpha-nvim. I named this "Session
restore" rather than "Restore session", since mini.starter uses the
first letter of the item as the shortcut key.  This way it doesn't
conflict with "Recent files"
2023-03-12 23:00:20 +01:00
8bb0c9ddd8 chore(main): release 1.18.2 (#415)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-12 09:26:52 +01:00
0bed79f844 chore(build): auto-generate vimdoc 2023-03-12 08:12:43 +00:00
a28885be3f fix(lsp): allow silent=false for lsp keymaps. Fixes #414 2023-03-12 09:10:45 +01:00
f5e010d887 chore(main): release 1.18.1 (#407)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-10 13:58:49 +01:00
9f30a2e03a fix(prettier): extend ensure_installed instead of overwriting it. Fixes #406 2023-03-10 13:55:06 +01:00
9d9e6b1188 chore(main): release 1.18.0 (#391)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-10 09:04:29 +01:00
3ffd5408a1 chore(build): auto-generate vimdoc 2023-03-10 07:59:02 +00:00
f1dbd097e4 fix(eslint): only run EslintFixAll on buffers where eslint is attached 2023-03-10 08:54:56 +01:00
aa8bae07ae feat(prettierd): added an extra for prettierd with null-ls 2023-03-10 08:45:09 +01:00
75299da24c feat(eslint): added an extra for eslint lsp that runs EslintFixAll before saving a buffer 2023-03-10 08:44:47 +01:00
5aad5749a7 feat(null-ls): added .neoconf.json to null-ls root_dir 2023-03-10 08:44:17 +01:00
5bb2314787 feat(typescript): added null-ls typescript code actions 2023-03-10 08:43:53 +01:00
b1b5b461bf chore(build): auto-generate vimdoc 2023-03-06 06:38:20 +00:00
23ba877bb0 feat(copilot): better sorting for cmp sources when using copilot 2023-03-06 07:37:37 +01:00
8f3834bc13 feat(null-ls): added fish_indent and fish diag 2023-03-06 07:37:37 +01:00
c407ddfe8a feat(shfmt): added shfmt to null-ls and mason 2023-03-06 07:37:37 +01:00
3c6357815c chore(main): release 1.17.1 (#389)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-05 17:10:36 +01:00
079d3967d0 fix(copilot): confirm with replace for copilot only 2023-03-05 17:06:13 +01:00
ae9c74d88e chore(main): release 1.17.0 (#379)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-05 09:16:44 +01:00
e7a515e548 fix(mason): removed installing of shellcheck and shfmt. Use bashls instead 2023-03-05 09:12:16 +01:00
2002265461 chore(build): auto-generate vimdoc 2023-03-05 08:09:39 +00:00
f441faad03 feat: add luap to nvim-treesitter ensure_installed (#383) 2023-03-05 09:08:51 +01:00
6fec14e508 fix(typescript): enable function call completion snippets 2023-03-04 10:41:52 +01:00
b10c9ade77 build: neoconf sumneko_lua => lua_ls 2023-03-04 10:41:52 +01:00
2e951e4f44 feat(autocmds): added 'query' to close_with_q autocmd 2023-03-04 10:41:51 +01:00
0d32e62567 chore(build): auto-generate vimdoc 2023-03-04 07:41:20 +00:00
9dd2487529 fix: rename more appropriately (also a typo) (#378) 2023-03-04 08:40:37 +01:00
1f7be0bbad chore(main): release 1.16.0 (#376)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-03 20:12:35 +01:00
57c2dcb3a3 feat(neo-tree): added expanders 2023-03-03 20:10:45 +01:00
099fd48844 chore(main): release 1.15.0 (#371)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-03 08:34:43 +01:00
04a60e251b fix(luasnip): added note that jsregexp is optional if it fails to build 2023-03-03 08:28:35 +01:00
d285548ae0 chore(build): auto-generate vimdoc 2023-03-03 07:23:08 +00:00
368c65e14b feat(copilot): added an extra to enable copilot. {import = "lazyvim.plugins.extras.coding.copilot"} 2023-03-03 08:22:20 +01:00
3a52307505 feat(cmp): added <s-CR> to confirm completion with replace 2023-03-03 08:21:29 +01:00
3c0f28331b chore(main): release 1.14.1 (#366)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-02 14:29:06 +01:00
c32943f2aa chore(build): auto-generate vimdoc 2023-03-02 13:18:45 +00:00
d00aade8db fix(alpha): larger session icon. Fixes #365 2023-03-02 14:17:57 +01:00
f6f3ce4a9b fix(luasnip): dont build jsregexp on Windows 2023-03-02 14:15:51 +01:00
16e4a3f8fd fix(leap): unpin leap 2023-03-02 08:19:03 +01:00
d0e420eca8 chore(main): release 1.14.0 (#360)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-01 17:51:10 +01:00
f9b7406df9 feat(telescope): Add open selected with trouble keymap (#357) 2023-03-01 13:10:04 +01:00
efca9528da chore(main): release 1.13.1 (#358)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-01 11:41:35 +01:00
e42c308a6b chore(build): auto-generate vimdoc 2023-03-01 10:40:15 +00:00
787ceab031 fix(leap): pin leap for now till flit issue is fixed 2023-03-01 11:39:33 +01:00
7e47f88749 chore(main): release 1.13.0 (#343)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-02-28 12:58:53 +01:00
59fa83653f feat(keymaps): Add previous/next trouble/quickfix item keymap [q, ]q (#299) 2023-02-28 11:31:35 +01:00
5abb10b5ab fix(lsp): only map lsp goto definition when client has definitionProvider (#348)
Co-authored-by: Alexander Born <alexander.born@bmw.de>
2023-02-28 11:29:57 +01:00
4b37723558 fix(git-signs): larger icons for delete 2023-02-28 10:01:53 +01:00
588dc5dd65 fix(icons): replace obsolete Nerd icons (#331) 2023-02-28 09:59:50 +01:00
70966bbc19 style: desc for gw 2023-02-28 09:59:01 +01:00
8a9265efed style: add description for "gw" keymap (#327) 2023-02-28 09:58:29 +01:00
2b8b27b4a9 chore(build): auto-generate vimdoc 2023-02-28 08:52:19 +00:00
d97bf66eed fix(mini-indentscope): disable indentscope for filetypes during init. Fixes #318 2023-02-28 09:51:29 +01:00
fc765e9e3d fix(treesitter): always install all built-in treesitter parsers to prevent queriy issues 2023-02-27 19:38:29 +01:00
592074ad80 chore(build): auto-generate vimdoc 2023-02-27 09:18:03 +00:00
bd62cbe370 fix(luasnips): make install_jsregexp 2023-02-27 10:17:22 +01:00
befa6c67a4 chore(main): release 1.12.1 (#314)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-02-20 22:04:44 +01:00
079c685831 refactor(treesitter): nil-check 2023-02-20 16:01:02 +01:00
0eef2c2f29 fix(treesitter): nil check #312 (#313)
Co-authored-by: Alexander Born <alexander.born@bmw.de>
2023-02-20 15:58:52 +01:00
9b175ab1bc chore(main): release 1.12.0 (#294)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-02-20 09:05:53 +01:00
db9a7d90d5 chore(build): auto-generate vimdoc 2023-02-20 07:22:26 +00:00
cccdc1cacf feat(telescope): add <leader>sS for :Telescope lsp_workspace_symbols (#309) 2023-02-20 08:21:39 +01:00
90c58352dd chore(build): auto-generate vimdoc 2023-02-19 21:32:05 +00:00
6b9f0c0c3c feat: persist pinned tabs (#304)
Adds `globals` to session opts to persist pinned tabs
2023-02-19 09:56:08 +01:00
de6a28b781 fix(treesitter): disable indent only for python right now 2023-02-18 13:14:47 +01:00
329a2daff4 fix(treesitter): disable treesitter indent by default, since it has too many issues. See #297 2023-02-18 12:40:25 +01:00
f08d004bc2 chore(build): auto-generate vimdoc 2023-02-18 08:56:40 +00:00
8e84dcf85c fix(mini.surround): don't create empty keymaps. Fixes #296 2023-02-18 09:55:56 +01:00
a0cf00c81b fix(illuminate): always set refernce keymaps on the buffer as well to properly overwrite ftplugin mappings. Fixes #292 2023-02-17 21:32:25 +01:00
ba7942b80b chore(main): release 1.11.0 (#286)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-02-17 17:09:38 +01:00
9edd1a938f feat(telescope): add <leader>sR for :Telescope resume (#284)
* feat(telescope): add `<leader>fR` for `:Telescope resume`

* fix: use `<leader>sR` instead or `<leader>fR

---------

Co-authored-by: Calvin Bochulak <cbochula@cisco.com>
2023-02-17 16:38:51 +01:00
3d18548c0a chore(build): auto-generate vimdoc 2023-02-17 06:19:43 +00:00
78cb3bb66d fix(lualine): Add a space separator between progress & location in lualine (#285) 2023-02-17 07:18:59 +01:00
d5a9ac0e06 chore(main): release 1.10.0 (#280)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-02-16 20:21:55 +01:00
94ebe25ccb fix(treesitter-textobjects): only disable the textobject plugins/* files when its not enabled in the treesitter opts 2023-02-16 20:12:54 +01:00
eccd122e6d feat(leap): lazy-load leap/flit and added keymaps 2023-02-16 14:12:10 +01:00
e33dd761b1 chore(build): auto-generate vimdoc 2023-02-16 12:30:27 +00:00
19 changed files with 536 additions and 125 deletions

View File

@ -7,7 +7,7 @@
},
"neoconf": {
"plugins": {
"sumneko_lua": {
"lua_ls": {
"enabled": true
}
}

View File

@ -1,5 +1,197 @@
# Changelog
## [1.21.0](https://github.com/LazyVim/LazyVim/compare/v1.20.0...v1.21.0) (2023-03-17)
### Features
* **lsp:** added keymap to see source actions with `&lt;leader&gt;cA` (useful for tsserver and others) ([9f5a0f1](https://github.com/LazyVim/LazyVim/commit/9f5a0f1bd847663deea9cb48a178b85d7bdb3ec6))
## [1.20.0](https://github.com/LazyVim/LazyVim/compare/v1.19.0...v1.20.0) (2023-03-17)
### Features
* **lsp:** make lsp work when mason-lspconfig is disabled. Fixed [#445](https://github.com/LazyVim/LazyVim/issues/445) ([c10e550](https://github.com/LazyVim/LazyVim/commit/c10e550639caef68146d122d9bc4a66f2f38650a))
### Bug Fixes
* **icons:** replace obsolete icons ([#441](https://github.com/LazyVim/LazyVim/issues/441)) ([cec000d](https://github.com/LazyVim/LazyVim/commit/cec000dfd863bd681a5195eb71c0797f5d030062))
## [1.19.0](https://github.com/LazyVim/LazyVim/compare/v1.18.2...v1.19.0) (2023-03-14)
### Features
* **mini-starter:** add Session restore to starter menu ([#421](https://github.com/LazyVim/LazyVim/issues/421)) ([bcdcfab](https://github.com/LazyVim/LazyVim/commit/bcdcfab020308a90c8cb347cf63d318f4cb05941))
### Bug Fixes
* **core:** set `cond=true` for LazyVim ([df6ac59](https://github.com/LazyVim/LazyVim/commit/df6ac591baf8ab2ef40e3ddcaf34ed124f42469f))
## [1.18.2](https://github.com/LazyVim/LazyVim/compare/v1.18.1...v1.18.2) (2023-03-12)
### Bug Fixes
* **lsp:** allow `silent=false` for lsp keymaps. Fixes [#414](https://github.com/LazyVim/LazyVim/issues/414) ([a28885b](https://github.com/LazyVim/LazyVim/commit/a28885be3f2428c993a3133f283d5648b6fa6b94))
## [1.18.1](https://github.com/LazyVim/LazyVim/compare/v1.18.0...v1.18.1) (2023-03-10)
### Bug Fixes
* **prettier:** extend ensure_installed instead of overwriting it. Fixes [#406](https://github.com/LazyVim/LazyVim/issues/406) ([9f30a2e](https://github.com/LazyVim/LazyVim/commit/9f30a2e03a66775bcbf3601e7a46e0aacf1bb291))
## [1.18.0](https://github.com/LazyVim/LazyVim/compare/v1.17.1...v1.18.0) (2023-03-10)
### Features
* **copilot:** better sorting for cmp sources when using copilot ([23ba877](https://github.com/LazyVim/LazyVim/commit/23ba877bb07f17a44af60e341be9f246ece5c133))
* **eslint:** added an extra for eslint lsp that runs EslintFixAll before saving a buffer ([75299da](https://github.com/LazyVim/LazyVim/commit/75299da24c4982f0d3ec6c9c3fbad7f94aa9eb72))
* **null-ls:** added .neoconf.json to null-ls root_dir ([5aad574](https://github.com/LazyVim/LazyVim/commit/5aad5749a745f928b0a1954917467f04c84e8a07))
* **null-ls:** added fish_indent and fish diag ([8f3834b](https://github.com/LazyVim/LazyVim/commit/8f3834bc13c6ca5acf82c1e44c5c250799d683a0))
* **prettierd:** added an extra for prettierd with null-ls ([aa8bae0](https://github.com/LazyVim/LazyVim/commit/aa8bae07aea7a81e2f507e1920fd84a6b83c34ad))
* **shfmt:** added shfmt to null-ls and mason ([c407ddf](https://github.com/LazyVim/LazyVim/commit/c407ddfe8ab36608ba1fe1c1d4f6723cce506a01))
* **typescript:** added null-ls typescript code actions ([5bb2314](https://github.com/LazyVim/LazyVim/commit/5bb23147877b3fcbe4cc28c0a7d820bcb52bb141))
### Bug Fixes
* **eslint:** only run EslintFixAll on buffers where eslint is attached ([f1dbd09](https://github.com/LazyVim/LazyVim/commit/f1dbd097e4461c322d6982c925d605a6ed57a4b2))
## [1.17.1](https://github.com/LazyVim/LazyVim/compare/v1.17.0...v1.17.1) (2023-03-05)
### Bug Fixes
* **copilot:** confirm with replace for copilot only ([079d396](https://github.com/LazyVim/LazyVim/commit/079d3967d03d47b95bdec10bb2621db1c4a07dce))
## [1.17.0](https://github.com/LazyVim/LazyVim/compare/v1.16.0...v1.17.0) (2023-03-05)
### Features
* add luap to nvim-treesitter ensure_installed ([#383](https://github.com/LazyVim/LazyVim/issues/383)) ([f441faa](https://github.com/LazyVim/LazyVim/commit/f441faad03501198a4a1ed52bca48aac3c7158c3))
* **autocmds:** added 'query' to close_with_q autocmd ([2e951e4](https://github.com/LazyVim/LazyVim/commit/2e951e4f4414ba88895b1ddc3a189dd3213be404))
### Bug Fixes
* **mason:** removed installing of shellcheck and shfmt. Use bashls instead ([e7a515e](https://github.com/LazyVim/LazyVim/commit/e7a515e5481e6cd2f00e8da523454713009f12a5))
* rename more appropriately (also a typo) ([#378](https://github.com/LazyVim/LazyVim/issues/378)) ([9dd2487](https://github.com/LazyVim/LazyVim/commit/9dd2487529d6012088e86f089c445549aa4b37bb))
* **typescript:** enable function call completion snippets ([6fec14e](https://github.com/LazyVim/LazyVim/commit/6fec14e5082363ab87efb169f312a396e5e2dbb7))
## [1.16.0](https://github.com/LazyVim/LazyVim/compare/v1.15.0...v1.16.0) (2023-03-03)
### Features
* **neo-tree:** added expanders ([57c2dcb](https://github.com/LazyVim/LazyVim/commit/57c2dcb3a35704a849ea8ba210f963c22fb6d1ce))
## [1.15.0](https://github.com/LazyVim/LazyVim/compare/v1.14.1...v1.15.0) (2023-03-03)
### Features
* **cmp:** added `&lt;s-CR&gt;` to confirm completion with replace ([3a52307](https://github.com/LazyVim/LazyVim/commit/3a523075057f346451075454a96b1ca355f7592a))
* **copilot:** added an extra to enable copilot. `{import = "lazyvim.plugins.extras.coding.copilot"}` ([368c65e](https://github.com/LazyVim/LazyVim/commit/368c65e14b1155d051b4aa6bac91808a2bc5f5ba))
### Bug Fixes
* **luasnip:** added note that jsregexp is optional if it fails to build ([04a60e2](https://github.com/LazyVim/LazyVim/commit/04a60e251b1c2437ad6d0a237fbacc1848d4aac1))
## [1.14.1](https://github.com/LazyVim/LazyVim/compare/v1.14.0...v1.14.1) (2023-03-02)
### Bug Fixes
* **alpha:** larger session icon. Fixes [#365](https://github.com/LazyVim/LazyVim/issues/365) ([d00aade](https://github.com/LazyVim/LazyVim/commit/d00aade8dbb7720b3f501424814ec3dd357b7373))
* **leap:** unpin leap ([16e4a3f](https://github.com/LazyVim/LazyVim/commit/16e4a3f8fd5929c9ef2cf2c12b076bcbc947ab36))
* **luasnip:** dont build jsregexp on Windows ([f6f3ce4](https://github.com/LazyVim/LazyVim/commit/f6f3ce4a9b7a797653dc290b9485d2ce970af871))
## [1.14.0](https://github.com/LazyVim/LazyVim/compare/v1.13.1...v1.14.0) (2023-03-01)
### Features
* **telescope:** Add open selected with trouble keymap ([#357](https://github.com/LazyVim/LazyVim/issues/357)) ([f9b7406](https://github.com/LazyVim/LazyVim/commit/f9b7406df96cf1fad5685865ffef5ec725573f1c))
## [1.13.1](https://github.com/LazyVim/LazyVim/compare/v1.13.0...v1.13.1) (2023-03-01)
### Bug Fixes
* **leap:** pin leap for now till flit issue is fixed ([787ceab](https://github.com/LazyVim/LazyVim/commit/787ceab0311ce20cc37ef2a81dabafdc09f1c624))
## [1.13.0](https://github.com/LazyVim/LazyVim/compare/v1.12.1...v1.13.0) (2023-02-28)
### Features
* **keymaps:** Add previous/next trouble/quickfix item keymap `[q`, `]q` ([#299](https://github.com/LazyVim/LazyVim/issues/299)) ([59fa836](https://github.com/LazyVim/LazyVim/commit/59fa83653f3d4f1911e220c2a96a7e47878a16bc))
### Bug Fixes
* **git-signs:** larger icons for delete ([4b37723](https://github.com/LazyVim/LazyVim/commit/4b37723558e45f14c3e8d05fc84ad3a701b9faf0))
* **icons:** replace obsolete Nerd icons ([#331](https://github.com/LazyVim/LazyVim/issues/331)) ([588dc5d](https://github.com/LazyVim/LazyVim/commit/588dc5dd65aa3881122aa4e59710de6722423251))
* **lsp:** only map lsp goto definition when client has definitionProvider ([#348](https://github.com/LazyVim/LazyVim/issues/348)) ([5abb10b](https://github.com/LazyVim/LazyVim/commit/5abb10b5ab3c2c5462f699fc98f618f39543f8f4))
* **luasnips:** make install_jsregexp ([bd62cbe](https://github.com/LazyVim/LazyVim/commit/bd62cbe370a72525a29790c710d3f213c3e184e4))
* **mini-indentscope:** disable indentscope for filetypes during init. Fixes [#318](https://github.com/LazyVim/LazyVim/issues/318) ([d97bf66](https://github.com/LazyVim/LazyVim/commit/d97bf66eed76c91eac11c81dad69aff9f632b214))
* **treesitter:** always install all built-in treesitter parsers to prevent queriy issues ([fc765e9](https://github.com/LazyVim/LazyVim/commit/fc765e9e3d1fe8dc9f84087a73f12a2b3bbe60c4))
## [1.12.1](https://github.com/LazyVim/LazyVim/compare/v1.12.0...v1.12.1) (2023-02-20)
### Bug Fixes
* **treesitter:** nil check [#312](https://github.com/LazyVim/LazyVim/issues/312) ([#313](https://github.com/LazyVim/LazyVim/issues/313)) ([0eef2c2](https://github.com/LazyVim/LazyVim/commit/0eef2c2f29cc95b6a3da8c9dced215acf60147dc))
## [1.12.0](https://github.com/LazyVim/LazyVim/compare/v1.11.0...v1.12.0) (2023-02-20)
### Features
* persist pinned tabs ([#304](https://github.com/LazyVim/LazyVim/issues/304)) ([6b9f0c0](https://github.com/LazyVim/LazyVim/commit/6b9f0c0c3c16b39a0764632402707822a084af50))
* **telescope:** add `&lt;leader&gt;sS` for `:Telescope lsp_workspace_symbols` ([#309](https://github.com/LazyVim/LazyVim/issues/309)) ([cccdc1c](https://github.com/LazyVim/LazyVim/commit/cccdc1cacfa486edcaf67111aa3c6fd9a626ae1f))
### Bug Fixes
* **illuminate:** always set refernce keymaps on the buffer as well to properly overwrite ftplugin mappings. Fixes [#292](https://github.com/LazyVim/LazyVim/issues/292) ([a0cf00c](https://github.com/LazyVim/LazyVim/commit/a0cf00c81b3a4a352cdc26c94112d9a5827881e1))
* **mini.surround:** don't create empty keymaps. Fixes [#296](https://github.com/LazyVim/LazyVim/issues/296) ([8e84dcf](https://github.com/LazyVim/LazyVim/commit/8e84dcf85c8a73ebcf6ade6b7b77544f468f1dfa))
* **treesitter:** disable indent only for python right now ([de6a28b](https://github.com/LazyVim/LazyVim/commit/de6a28b781e8a06e4f70c913539c97260392131a))
* **treesitter:** disable treesitter indent by default, since it has too many issues. See [#297](https://github.com/LazyVim/LazyVim/issues/297) ([329a2da](https://github.com/LazyVim/LazyVim/commit/329a2daff493abd2bd5c8fedbf0dfa13039d3931))
## [1.11.0](https://github.com/LazyVim/LazyVim/compare/v1.10.0...v1.11.0) (2023-02-17)
### Features
* **telescope:** add `&lt;leader&gt;sR` for `:Telescope resume` ([#284](https://github.com/LazyVim/LazyVim/issues/284)) ([9edd1a9](https://github.com/LazyVim/LazyVim/commit/9edd1a938f153dfa0c31c38123eabe08d931b5b2))
### Bug Fixes
* **lualine:** Add a space separator between progress & location in lualine ([#285](https://github.com/LazyVim/LazyVim/issues/285)) ([78cb3bb](https://github.com/LazyVim/LazyVim/commit/78cb3bb66d45762ba85190b2901360f683a8aa95))
## [1.10.0](https://github.com/LazyVim/LazyVim/compare/v1.9.4...v1.10.0) (2023-02-16)
### Features
* **leap:** lazy-load leap/flit and added keymaps ([eccd122](https://github.com/LazyVim/LazyVim/commit/eccd122e6dafae48bbf3c63e9fb3ae1ad4fc47a4))
### Bug Fixes
* **treesitter-textobjects:** only disable the textobject plugins/* files when its not enabled in the treesitter opts ([94ebe25](https://github.com/LazyVim/LazyVim/commit/94ebe25ccb296e4342586723acd1d35b8fda8f35))
## [1.9.4](https://github.com/LazyVim/LazyVim/compare/v1.9.3...v1.9.4) (2023-02-15)

View File

@ -1,4 +1,4 @@
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 February 15
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 17
==============================================================================
Table of Contents *LazyVim-table-of-contents*
@ -9,46 +9,29 @@ Table of Contents *LazyVim-table-of-contents*
- File Structure |LazyVim-file-structure|
- Configuration |LazyVim-configuration|
<img
src="https://user-images.githubusercontent.com/292349/213446185-2db63fd5-8c84-459c-9f04-e286382d6e80.png">
<hr>
<h4 align="center">
<a href="https://lazyvim.github.io/installation">Install</a>
Install
·
<a href="https://lazyvim.github.io/configuration">Configure</a>
Configure
·
<a href="https://lazyvim.github.io">Docs</a>
Docs
</h4>
<div align="center">
<a href="https://github.com/LazyVim/LazyVim/releases/latest">
<img alt="Latest release" src="https://img.shields.io/github/v/release/LazyVim/LazyVim?style=for-the-badge&logo=starship&color=C9CBFF&logoColor=D9E0EE&labelColor=302D41&include_prerelease&sort=semver" />
</a>
<a href="https://github.com/LazyVim/LazyVim/pulse">
<img alt="Last commit" src="https://img.shields.io/github/last-commit/LazyVim/LazyVim?style=for-the-badge&logo=starship&color=8bd5ca&logoColor=D9E0EE&labelColor=302D41"/>
</a>
<a href="https://github.com/LazyVim/LazyVim/blob/main/LICENSE">
<img alt="License" src="https://img.shields.io/github/license/LazyVim/LazyVim?style=for-the-badge&logo=starship&color=ee999f&logoColor=D9E0EE&labelColor=302D41" />
</a>
<a href="https://github.com/LazyVim/LazyVim/stargazers">
<img alt="Stars" src="https://img.shields.io/github/stars/LazyVim/LazyVim?style=for-the-badge&logo=starship&color=c69ff5&logoColor=D9E0EE&labelColor=302D41" />
</a>
<a href="https://github.com/LazyVim/LazyVim/issues">
<img alt="Issues" src="https://img.shields.io/github/issues/LazyVim/LazyVim?style=for-the-badge&logo=bilibili&color=F5E0DC&logoColor=D9E0EE&labelColor=302D41" />
</a>
<a href="https://github.com/LazyVim/LazyVim">
<img alt="Repo Size" src="https://img.shields.io/github/repo-size/LazyVim/LazyVim?color=%23DDB6F2&label=SIZE&logo=codesandbox&style=for-the-badge&logoColor=D9E0EE&labelColor=302D41" />
</a>
<a href="https://twitter.com/intent/follow?screen_name=folke">
<img alt="follow on Twitter" src="https://img.shields.io/twitter/follow/folke?style=for-the-badge&logo=twitter&color=8aadf3&logoColor=D9E0EE&labelColor=302D41" />
</a>
</div>
LazyVim is a Neovim setup powered by lazy.nvim
<https://github.com/folke/lazy.nvim> to make it easy to customize and extend
@ -57,15 +40,6 @@ using a pre-made distro, LazyVim offers the best of both worlds - the
flexibility to tweak your config as needed, along with the convenience of a
pre-configured setup.
<div class="figure">
<img src="https://user-images.githubusercontent.com/292349/211285846-0b7bb3bf-0462-4029-b64c-4ee1d037fc1c.png" title="fig:"/>
<p class="caption">image</p>
</div>
<div class="figure">
<img src="https://user-images.githubusercontent.com/292349/213447056-92290767-ea16-430c-8727-ce994c93e9cc.png" title="fig:"/>
<p class="caption">image</p>
</div>
FEATURES *LazyVim-features*
@ -82,7 +56,7 @@ REQUIREMENTS *LazyVim-requirements*
- Neovim >= **0.8.0** (needs to be built with **LuaJIT**)
- Git >= **2.19.0** (for partial clones support)
- a Nerd Font <https://www.nerdfonts.com/> **_(optional)_**
- a Nerd Font <https://www.nerdfonts.com/> **(optional)**
GETTING STARTED *LazyVim-getting-started*
@ -90,7 +64,7 @@ GETTING STARTED *LazyVim-getting-started*
You can find a starter template for **LazyVim** here
<https://github.com/LazyVim/starter>
Try it with Docker
Try it with Docker ~
>sh
docker run -w /root -it --rm alpine:edge sh -uelic '
@ -101,8 +75,7 @@ Try it with Docker
'
<
Install the <a href="https://github.com/LazyVim/starter">LazyVim Starter</a>
Install the LazyVim Starter ~
- Make a backup of your current Neovim files:
@ -124,44 +97,36 @@ Install the <a href="https://github.com/LazyVim/starter">LazyVim Starter</a>
<
Refer to the comments in the files on how to customize **LazyVim**.
------------------------------------------------------------------------------
Theres a great video created by @elijahmanor
<https://github.com/elijahmanor> with a walkthrough to get started.
Theres a great video created by elijahmano <https://github.com/elijahmanor>
with a walkthrough to get started.
<img src='https://img.youtube.com/vi/N93cTbtLCIM/hqdefault.jpg' title=''/>
<https://www.youtube.com/watch?v=N93cTbtLCIM>
FILE STRUCTURE *LazyVim-file-structure*
The files under config will be automatically loaded at the appropriate time, so
you dont need to require those files manually. **LazyVim** comes with a set
of default config files that will be loaded **_before_** your own. See here
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>
<pre>
~/.config/nvim
lua
   config
      autocmds.lua
      keymaps.lua
      lazy.lua
      options.lua
   plugins
   spec1.lua
  
   spec2.lua
init.lua
</pre>
CONFIGURATION *LazyVim-configuration*
Refer to the docs <https://lazyvim.github.io>
==============================================================================
1. Links *LazyVim-links*
1. *image*: https://user-images.githubusercontent.com/292349/211285846-0b7bb3bf-0462-4029-b64c-4ee1d037fc1c.png
2. *image*: https://user-images.githubusercontent.com/292349/213447056-92290767-ea16-430c-8727-ce994c93e9cc.png
3. *@elijahmanor*:
4. *Watch the video*: https://img.youtube.com/vi/N93cTbtLCIM/hqdefault.jpg
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -42,15 +42,16 @@ vim.api.nvim_create_autocmd("BufReadPost", {
vim.api.nvim_create_autocmd("FileType", {
group = augroup("close_with_q"),
pattern = {
"qf",
"PlenaryTestPopup",
"help",
"lspinfo",
"man",
"notify",
"lspinfo",
"qf",
"query", -- :InspectTree
"spectre_panel",
"startuptime",
"tsplayground",
"PlenaryTestPopup",
},
callback = function(event)
vim.bo[event.buf].buflisted = false

View File

@ -21,7 +21,7 @@ local defaults = {
diagnostics = {
Error = "",
Warn = "",
Hint = " ",
Hint = " ",
Info = "",
},
git = {
@ -42,7 +42,7 @@ local defaults = {
Event = "",
Field = "",
File = "",
Folder = " ",
Folder = " ",
Function = "",
Interface = "",
Key = "",
@ -50,7 +50,7 @@ local defaults = {
Method = "",
Module = "",
Namespace = "",
Null = " ",
Null = " ",
Number = "",
Object = "",
Operator = "",

View File

@ -64,8 +64,7 @@ map(
{ desc = "Redraw / clear hlsearch / diff update" }
)
map("n", "gw", "*N")
map("x", "gw", "*N")
map({ "n", "x" }, "gw", "*N", { desc = "Search word under cursor" })
-- https://github.com/mhinz/vim-galore#saner-behavior-of-n-and-n
map("n", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
@ -96,6 +95,11 @@ 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" })
if not Util.has("trouble.nvim") then
map("n", "[q", vim.cmd.cprev, { desc = "Previous quickfix" })
map("n", "]q", vim.cmd.cnext, { desc = "Next quickfix" })
end
-- stylua: ignore start
-- toggle options

View File

@ -3,6 +3,9 @@ return {
-- snippets
{
"L3MON4D3/LuaSnip",
build = (not jit.os:find("Windows"))
and "echo -e 'NOTE: jsregexp is optional, so not a big deal if it fails to build\n'; make install_jsregexp"
or nil,
dependencies = {
"rafamadriz/friendly-snippets",
config = function()
@ -57,6 +60,10 @@ return {
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
["<S-CR>"] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace,
select = true,
}), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
}),
sources = cmp.config.sources({
{ name = "nvim_lsp" },
@ -107,6 +114,9 @@ return {
{ 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 = {
@ -151,15 +161,7 @@ return {
-- { "i", mode = { "x", "o" } },
-- },
event = "VeryLazy",
dependencies = {
{
"nvim-treesitter/nvim-treesitter-textobjects",
init = function()
-- no need to load the plugin, since we only need its queries
require("lazy.core.loader").disable_rtp_plugin("nvim-treesitter-textobjects")
end,
},
},
dependencies = { "nvim-treesitter-textobjects" },
opts = function()
local ai = require("mini.ai")
return {

View File

@ -2,5 +2,5 @@ require("lazyvim.config").init()
return {
{ "folke/lazy.nvim", version = "*" },
{ "LazyVim/LazyVim", priority = 10000, lazy = false, config = true, version = "*" },
{ "LazyVim/LazyVim", priority = 10000, lazy = false, config = true, cond = true, version = "*" },
}

View File

@ -46,6 +46,14 @@ return {
["<space>"] = "none",
},
},
default_component_configs = {
indent = {
with_expanders = true, -- if nil and file nesting is enabled, will enable expanders
expander_collapsed = "",
expander_expanded = "",
expander_highlight = "NeoTreeExpander",
},
},
},
},
@ -90,6 +98,7 @@ return {
{ "<leader>sM", "<cmd>Telescope man_pages<cr>", desc = "Man Pages" },
{ "<leader>sm", "<cmd>Telescope marks<cr>", desc = "Jump to Mark" },
{ "<leader>so", "<cmd>Telescope vim_options<cr>", desc = "Options" },
{ "<leader>sR", "<cmd>Telescope resume<cr>", desc = "Resume" },
{ "<leader>sw", Util.telescope("grep_string"), desc = "Word (root dir)" },
{ "<leader>sW", Util.telescope("grep_string", { cwd = false }), desc = "Word (cwd)" },
{ "<leader>uC", Util.telescope("colorscheme", { enable_preview = true }), desc = "Colorscheme with preview" },
@ -111,6 +120,24 @@ return {
}),
desc = "Goto Symbol",
},
{
"<leader>sS",
Util.telescope("lsp_workspace_symbols", {
symbols = {
"Class",
"Function",
"Method",
"Constructor",
"Interface",
"Module",
"Struct",
"Trait",
"Field",
"Property",
},
}),
desc = "Goto Symbol (Workspace)",
},
},
opts = {
defaults = {
@ -121,6 +148,9 @@ return {
["<c-t>"] = function(...)
return require("trouble.providers.telescope").open_with_trouble(...)
end,
["<a-t>"] = function(...)
return require("trouble.providers.telescope").open_selected_with_trouble(...)
end,
["<a-i>"] = function()
Util.telescope("find_files", { no_ignore = true })()
end,
@ -151,10 +181,25 @@ return {
},
-- easily jump to any location and enhanced f/t motions for Leap
{
"ggandor/flit.nvim",
keys = function()
---@type LazyKeys[]
local ret = {}
for _, key in ipairs({ "f", "F", "t", "T" }) do
ret[#ret + 1] = { key, mode = { "n", "x", "o" }, desc = key }
end
return ret
end,
opts = { labeled_modes = "nx" },
},
{
"ggandor/leap.nvim",
event = "VeryLazy",
dependencies = { { "ggandor/flit.nvim", opts = { labeled_modes = "nv" } } },
keys = {
{ "s", mode = { "n", "x", "o" }, desc = "Leap forward to" },
{ "S", mode = { "n", "x", "o" }, desc = "Leap backward to" },
{ "gs", mode = { "n", "x", "o" }, desc = "Leap from windows" },
},
config = function(_, opts)
local leap = require("leap")
for k, v in pairs(opts) do
@ -209,8 +254,8 @@ return {
signs = {
add = { text = "" },
change = { text = "" },
delete = { text = "" },
topdelete = { text = "" },
delete = { text = "" },
topdelete = { text = "" },
changedelete = { text = "" },
untracked = { text = "" },
},
@ -245,18 +290,28 @@ return {
opts = { delay = 200 },
config = function(_, opts)
require("illuminate").configure(opts)
local function map(key, dir, buffer)
vim.keymap.set("n", key, function()
require("illuminate")["goto_" .. dir .. "_reference"](false)
end, { desc = dir:sub(1, 1):upper() .. dir:sub(2) .. " Reference", buffer = buffer })
end
map("]]", "next")
map("[[", "prev")
-- also set it after loading ftplugins, since a lot overwrite [[ and ]]
vim.api.nvim_create_autocmd("FileType", {
callback = function()
local buffer = vim.api.nvim_get_current_buf()
pcall(vim.keymap.del, "n", "]]", { buffer = buffer })
pcall(vim.keymap.del, "n", "[[", { buffer = buffer })
map("]]", "next", buffer)
map("[[", "prev", buffer)
end,
})
end,
-- stylua: ignore
keys = {
{ "]]", function() require("illuminate").goto_next_reference(false) end, desc = "Next Reference", },
{ "[[", function() require("illuminate").goto_prev_reference(false) end, desc = "Prev Reference" },
{ "]]", desc = "Next Reference" },
{ "[[", desc = "Prev Reference" },
},
},
@ -280,6 +335,28 @@ return {
{ "<leader>xX", "<cmd>TroubleToggle workspace_diagnostics<cr>", desc = "Workspace Diagnostics (Trouble)" },
{ "<leader>xL", "<cmd>TroubleToggle loclist<cr>", desc = "Location List (Trouble)" },
{ "<leader>xQ", "<cmd>TroubleToggle quickfix<cr>", desc = "Quickfix List (Trouble)" },
{
"[q",
function()
if require("trouble").is_open() then
require("trouble").previous({ skip_groups = true, jump = true })
else
vim.cmd.cprev()
end
end,
desc = "Previous trouble/quickfix item",
},
{
"]q",
function()
if require("trouble").is_open() then
require("trouble").next({ skip_groups = true, jump = true })
else
vim.cmd.cnext()
end
end,
desc = "Next trouble/quickfix item",
},
},
},

View File

@ -0,0 +1,76 @@
return {
-- copilot
{
"zbirenbaum/copilot.lua",
cmd = "Copilot",
build = ":Copilot auth",
opts = {
suggestion = { enabled = false },
panel = { enabled = false },
},
},
-- copilot cmp source
{
"nvim-cmp",
dependencies = {
{
"zbirenbaum/copilot-cmp",
dependencies = "copilot.lua",
opts = {},
config = function(_, opts)
local copilot_cmp = require("copilot_cmp")
copilot_cmp.setup(opts)
-- attach cmp source whenever copilot attaches
-- fixes lazy-loading issues with the copilot cmp source
require("lazyvim.util").on_attach(function(client)
if client.name == "copilot" then
copilot_cmp._on_insert_enter()
end
end)
end,
},
},
---@param opts cmp.ConfigSchema
opts = function(_, opts)
local cmp = require("cmp")
table.insert(opts.sources, 1, { name = "copilot", group_index = 2 })
local confirm = opts.mapping["<CR>"]
local confirm_copilot = cmp.mapping.confirm({
select = true,
behavior = cmp.ConfirmBehavior.Replace,
})
opts.mapping = vim.tbl_extend("force", opts.mapping, {
["<CR>"] = function(...)
local entry = cmp.get_selected_entry()
if entry and entry.source.name == "copilot" then
return confirm_copilot(...)
end
return confirm(...)
end,
})
opts.sorting = {
priority_weight = 2,
comparators = {
require("copilot_cmp.comparators").prioritize,
-- Below is the default comparitor list and order for nvim-cmp
cmp.config.compare.offset,
-- cmp.config.compare.scopes, --this is commented in nvim-cmp too
cmp.config.compare.exact,
cmp.config.compare.score,
cmp.config.compare.recently_used,
cmp.config.compare.locality,
cmp.config.compare.kind,
cmp.config.compare.sort_text,
cmp.config.compare.length,
cmp.config.compare.order,
},
}
end,
},
}

View File

@ -0,0 +1,15 @@
return {
{
"williamboman/mason.nvim",
opts = function(_, opts)
table.insert(opts.ensure_installed, "prettierd")
end,
},
{
"jose-elias-alvarez/null-ls.nvim",
opts = function(_, opts)
local nls = require("null-ls")
table.insert(opts.sources, nls.builtins.formatting.prettierd)
end,
},
}

View File

@ -17,7 +17,14 @@ return {
opts = {
-- make sure mason installs the server
servers = {
tsserver = {},
---@type lspconfig.options.tsserver
tsserver = {
settings = {
completions = {
completeFunctionCalls = true,
},
},
},
},
setup = {
tsserver = function(_, opts)
@ -25,6 +32,7 @@ return {
if client.name == "tsserver" then
-- stylua: ignore
vim.keymap.set("n", "<leader>co", "<cmd>TypescriptOrganizeImports<CR>", { buffer = buffer, desc = "Organize Imports" })
-- stylua: ignore
vim.keymap.set("n", "<leader>cR", "<cmd>TypescriptRenameFile<CR>", { desc = "Rename File", buffer = buffer })
end
end)
@ -34,4 +42,10 @@ return {
},
},
},
{
"jose-elias-alvarez/null-ls.nvim",
opts = function(_, opts)
table.insert(opts.sources, require("typescript.extensions.null-ls.code-actions"))
end,
},
}

View File

@ -0,0 +1,27 @@
return {
{
"neovim/nvim-lspconfig",
-- other settings removed for brevity
opts = {
servers = {
eslint = {
settings = {
-- helps eslint find the eslintrc when it's placed in a subfolder instead of the cwd root
workingDirectory = { mode = "auto" },
},
},
},
setup = {
eslint = function()
vim.api.nvim_create_autocmd("BufWritePre", {
callback = function(event)
if require("lspconfig.util").get_active_client_by_name(event.buf, "eslint") then
vim.cmd("EslintFixAll")
end
end,
})
end,
},
},
},
}

View File

@ -35,6 +35,7 @@ return {
new_section("Lazy", "Lazy", "Config"),
new_section("New file", "ene | startinsert", "Built-in"),
new_section("Quit", "qa", "Built-in"),
new_section("Session restore", [[lua require("persistence").load()]], "Session"),
},
content_hooks = {
starter.gen_hook.adding_bullet(pad .. "", false),

View File

@ -65,7 +65,7 @@ return {
},
},
---@param opts PluginLspOpts
config = function(plugin, opts)
config = function(_, opts)
-- setup autoformat
require("lazyvim.plugins.lsp.format").autoformat = opts.autoformat
-- setup formatting and keymaps
@ -101,16 +101,8 @@ return {
require("lspconfig")[server].setup(server_opts)
end
-- temp fix for lspconfig rename
-- https://github.com/neovim/nvim-lspconfig/pull/2439
local mappings = require("mason-lspconfig.mappings.server")
if not mappings.lspconfig_to_package.lua_ls then
mappings.lspconfig_to_package.lua_ls = "lua-language-server"
mappings.package_to_lspconfig["lua-language-server"] = "lua_ls"
end
local mlsp = require("mason-lspconfig")
local available = mlsp.get_available_servers()
local have_mason, mlsp = pcall(require, "mason-lspconfig")
local available = have_mason and mlsp.get_available_servers() or {}
local ensure_installed = {} ---@type string[]
for server, server_opts in pairs(servers) do
@ -125,8 +117,10 @@ return {
end
end
require("mason-lspconfig").setup({ ensure_installed = ensure_installed })
require("mason-lspconfig").setup_handlers({ setup })
if have_mason then
mlsp.setup({ ensure_installed = ensure_installed })
mlsp.setup_handlers({ setup })
end
end,
},
@ -138,9 +132,12 @@ return {
opts = function()
local nls = require("null-ls")
return {
root_dir = require("null-ls.utils").root_pattern(".null-ls-root", ".neoconf.json", "Makefile", ".git"),
sources = {
-- nls.builtins.formatting.prettierd,
nls.builtins.formatting.fish_indent,
nls.builtins.diagnostics.fish,
nls.builtins.formatting.stylua,
nls.builtins.formatting.shfmt,
nls.builtins.diagnostics.flake8,
},
}
@ -156,13 +153,12 @@ return {
opts = {
ensure_installed = {
"stylua",
"shellcheck",
"shfmt",
"flake8",
},
},
---@param opts MasonSettings | {ensure_installed: string[]}
config = function(plugin, opts)
config = function(_, opts)
require("mason").setup(opts)
local mr = require("mason-registry")
for _, tool in ipairs(opts.ensure_installed) do

View File

@ -12,7 +12,7 @@ function M.get()
M._keys = {
{ "<leader>cd", vim.diagnostic.open_float, desc = "Line Diagnostics" },
{ "<leader>cl", "<cmd>LspInfo<cr>", desc = "Lsp Info" },
{ "gd", "<cmd>Telescope lsp_definitions<cr>", desc = "Goto Definition" },
{ "gd", "<cmd>Telescope lsp_definitions<cr>", desc = "Goto Definition", has = "definition" },
{ "gr", "<cmd>Telescope lsp_references<cr>", desc = "References" },
{ "gD", vim.lsp.buf.declaration, desc = "Goto Declaration" },
{ "gI", "<cmd>Telescope lsp_implementations<cr>", desc = "Goto Implementation" },
@ -26,9 +26,24 @@ function M.get()
{ "[e", M.diagnostic_goto(false, "ERROR"), desc = "Prev Error" },
{ "]w", M.diagnostic_goto(true, "WARN"), desc = "Next Warning" },
{ "[w", M.diagnostic_goto(false, "WARN"), desc = "Prev Warning" },
{ "<leader>ca", vim.lsp.buf.code_action, desc = "Code Action", mode = { "n", "v" }, has = "codeAction" },
{ "<leader>cf", format, desc = "Format Document", has = "documentFormatting" },
{ "<leader>cf", format, desc = "Format Range", mode = "v", has = "documentRangeFormatting" },
{ "<leader>ca", vim.lsp.buf.code_action, desc = "Code Action", mode = { "n", "v" }, has = "codeAction" },
{
"<leader>cA",
function()
vim.lsp.buf.code_action({
context = {
only = {
"source",
},
diagnostics = {},
},
})
end,
desc = "Source Action",
has = "codeAction",
}
}
if require("lazyvim.util").has("inc-rename.nvim") then
M._keys[#M._keys + 1] = {
@ -66,7 +81,7 @@ function M.on_attach(client, buffer)
local opts = Keys.opts(keys)
---@diagnostic disable-next-line: no-unknown
opts.has = nil
opts.silent = true
opts.silent = opts.silent ~= false
opts.buffer = buffer
vim.keymap.set(keys.mode or "n", keys[1], keys[2], opts)
end

View File

@ -4,22 +4,46 @@ return {
version = false, -- last release is way too old and doesn't work on Windows
build = ":TSUpdate",
event = { "BufReadPost", "BufNewFile" },
dependencies = {
{
"nvim-treesitter/nvim-treesitter-textobjects",
init = function()
-- PERF: no need to load the plugin, if we only need its queries for mini.ai
local plugin = require("lazy.core.config").spec.plugins["nvim-treesitter"]
local opts = require("lazy.core.plugin").values(plugin, "opts", false)
local enabled = false
if opts.textobjects then
for _, mod in ipairs({ "move", "select", "swap", "lsp_interop" }) do
if opts.textobjects[mod] and opts.textobjects[mod].enable then
enabled = true
break
end
end
end
if not enabled then
require("lazy.core.loader").disable_rtp_plugin("nvim-treesitter-textobjects")
end
end,
},
},
keys = {
{ "<c-space>", desc = "Increment selection" },
{ "<bs>", desc = "Schrink selection", mode = "x" },
{ "<bs>", desc = "Decrement selection", mode = "x" },
},
---@type TSConfig
opts = {
highlight = { enable = true },
indent = { enable = true },
indent = { enable = true, disable = { "python" } },
context_commentstring = { enable = true, enable_autocmd = false },
ensure_installed = {
"bash",
"c",
"help",
"html",
"javascript",
"json",
"lua",
"luap",
"markdown",
"markdown_inline",
"python",

View File

@ -145,7 +145,7 @@ return {
},
},
lualine_y = {
{ "progress", separator = "", padding = { left = 1, right = 0 } },
{ "progress", separator = " ", padding = { left = 1, right = 0 } },
{ "location", padding = { left = 0, right = 1 } },
},
lualine_z = {
@ -182,13 +182,15 @@ return {
symbol = "",
options = { try_as_border = true },
},
config = function(_, opts)
init = function()
vim.api.nvim_create_autocmd("FileType", {
pattern = { "help", "alpha", "dashboard", "neo-tree", "Trouble", "lazy", "mason" },
callback = function()
vim.b.miniindentscope_disable = true
end,
})
end,
config = function(_, opts)
require("mini.indentscope").setup(opts)
end,
},
@ -238,13 +240,13 @@ return {
dashboard.section.header.val = vim.split(logo, "\n")
dashboard.section.buttons.val = {
dashboard.button("f", " " .. " Find file", ":Telescope find_files <CR>"),
dashboard.button("f", " " .. " Find file", ":Telescope find_files <CR>"),
dashboard.button("n", "" .. " New file", ":ene <BAR> startinsert <CR>"),
dashboard.button("r", " " .. " Recent files", ":Telescope oldfiles <CR>"),
dashboard.button("r", " " .. " Recent files", ":Telescope oldfiles <CR>"),
dashboard.button("g", "" .. " Find text", ":Telescope live_grep <CR>"),
dashboard.button("c", "" .. " Config", ":e $MYVIMRC <CR>"),
dashboard.button("s", "" .. " Restore Session", [[:lua require("persistence").load() <cr>]]),
dashboard.button("l", "" .. " Lazy", ":Lazy<CR>"),
dashboard.button("s", "" .. " Restore Session", [[:lua require("persistence").load() <cr>]]),
dashboard.button("l", "󰒲 " .. " Lazy", ":Lazy<CR>"),
dashboard.button("q", "" .. " Quit", ":qa<CR>"),
}
for _, button in ipairs(dashboard.section.buttons.val) do

View File

@ -13,7 +13,7 @@ return {
{
"folke/persistence.nvim",
event = "BufReadPre",
opts = { options = { "buffers", "curdir", "tabpages", "winsize", "help" } },
opts = { options = { "buffers", "curdir", "tabpages", "winsize", "help", "globals" } },
-- stylua: ignore
keys = {
{ "<leader>qs", function() require("persistence").load() end, desc = "Restore Session" },