Compare commits
88 Commits
Author | SHA1 | Date | |
---|---|---|---|
b984c0cff5 | |||
9f5a0f1bd8 | |||
d0b378f427 | |||
aa4f7ec651 | |||
c10e550639 | |||
f0b548af2f | |||
cec000dfd8 | |||
6b740fd300 | |||
564e25a277 | |||
df6ac591ba | |||
bcdcfab020 | |||
8bb0c9ddd8 | |||
0bed79f844 | |||
a28885be3f | |||
f5e010d887 | |||
9f30a2e03a | |||
9d9e6b1188 | |||
3ffd5408a1 | |||
f1dbd097e4 | |||
aa8bae07ae | |||
75299da24c | |||
5aad5749a7 | |||
5bb2314787 | |||
b1b5b461bf | |||
23ba877bb0 | |||
8f3834bc13 | |||
c407ddfe8a | |||
3c6357815c | |||
079d3967d0 | |||
ae9c74d88e | |||
e7a515e548 | |||
2002265461 | |||
f441faad03 | |||
6fec14e508 | |||
b10c9ade77 | |||
2e951e4f44 | |||
0d32e62567 | |||
9dd2487529 | |||
1f7be0bbad | |||
57c2dcb3a3 | |||
099fd48844 | |||
04a60e251b | |||
d285548ae0 | |||
368c65e14b | |||
3a52307505 | |||
3c0f28331b | |||
c32943f2aa | |||
d00aade8db | |||
f6f3ce4a9b | |||
16e4a3f8fd | |||
d0e420eca8 | |||
f9b7406df9 | |||
efca9528da | |||
e42c308a6b | |||
787ceab031 | |||
7e47f88749 | |||
59fa83653f | |||
5abb10b5ab | |||
4b37723558 | |||
588dc5dd65 | |||
70966bbc19 | |||
8a9265efed | |||
2b8b27b4a9 | |||
d97bf66eed | |||
fc765e9e3d | |||
592074ad80 | |||
bd62cbe370 | |||
befa6c67a4 | |||
079c685831 | |||
0eef2c2f29 | |||
9b175ab1bc | |||
db9a7d90d5 | |||
cccdc1cacf | |||
90c58352dd | |||
6b9f0c0c3c | |||
de6a28b781 | |||
329a2daff4 | |||
f08d004bc2 | |||
8e84dcf85c | |||
a0cf00c81b | |||
ba7942b80b | |||
9edd1a938f | |||
3d18548c0a | |||
78cb3bb66d | |||
d5a9ac0e06 | |||
94ebe25ccb | |||
eccd122e6d | |||
e33dd761b1 |
@ -7,7 +7,7 @@
|
||||
},
|
||||
"neoconf": {
|
||||
"plugins": {
|
||||
"sumneko_lua": {
|
||||
"lua_ls": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
|
192
CHANGELOG.md
192
CHANGELOG.md
@ -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 `<leader>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 `<s-CR>` 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 `<leader>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 `<leader>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)
|
||||
|
||||
|
||||
|
101
doc/LazyVim.txt
101
doc/LazyVim.txt
@ -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**.
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
There’s a great video created by @elijahmanor
|
||||
<https://github.com/elijahmanor> with a walkthrough to get started.
|
||||
|
||||
There’s 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 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
|
||||
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:
|
||||
|
@ -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
|
||||
|
@ -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 = " ",
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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 = "*" },
|
||||
}
|
||||
|
@ -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",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
|
76
lua/lazyvim/plugins/extras/coding/copilot.lua
Normal file
76
lua/lazyvim/plugins/extras/coding/copilot.lua
Normal 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,
|
||||
},
|
||||
}
|
15
lua/lazyvim/plugins/extras/formatting/prettier.lua
Normal file
15
lua/lazyvim/plugins/extras/formatting/prettier.lua
Normal 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,
|
||||
},
|
||||
}
|
@ -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,
|
||||
},
|
||||
}
|
||||
|
27
lua/lazyvim/plugins/extras/linting/eslint.lua
Normal file
27
lua/lazyvim/plugins/extras/linting/eslint.lua
Normal 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,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
@ -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),
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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",
|
||||
|
@ -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
|
||||
|
@ -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" },
|
||||
|
Reference in New Issue
Block a user