Compare commits

..

58 Commits

Author SHA1 Message Date
0968e24f82 chore(main): release 1.4.0 (#186)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-02-07 17:00:11 +01:00
320f5c6de7 fix(mini.indent): no need to disable indent in alpha dashboard config. Fixes #199 2023-02-07 16:46:48 +01:00
826655b901 fix(lsp): properly merge lsp client capabilities 2023-02-07 16:46:48 +01:00
edd0fbb6a1 chore(build): auto-generate vimdoc 2023-02-07 08:17:32 +00:00
a5755408dd feat(icons): add copilot icon (#195) 2023-02-07 09:16:47 +01:00
4a9a2e8861 chore(build): auto-generate vimdoc 2023-02-06 21:39:20 +00:00
0556c011c5 docs: video 2023-02-06 22:38:35 +01:00
4792d498ab chore(build): auto-generate vimdoc 2023-02-06 21:38:19 +00:00
68ad526f3a docs: move video below install instructions 2023-02-06 22:37:36 +01:00
ab89f46fba chore(build): auto-generate vimdoc 2023-02-06 21:36:02 +00:00
e7004bce30 docs: video walkthrough to get started (#170) 2023-02-06 22:35:23 +01:00
3a28ce7919 fix(typescript): typescript extras Keymaps (#175) 2023-02-06 16:44:43 +01:00
2ff213126c fix(keymaps): move lines with silent and without triggering cmdline. Fixes #184 2023-02-06 08:43:59 +01:00
e5626e9a2d fix(keymaps): silent by default 2023-02-06 08:43:59 +01:00
d905ff08b9 chore(build): auto-generate vimdoc 2023-02-06 07:31:56 +00:00
182323623a fix(mini.surround): use merged plugin spec to build keys. Fixes #172. Fixes #177 2023-02-06 08:31:04 +01:00
663e142bcd chore(build): auto-generate vimdoc 2023-02-03 17:07:08 +00:00
dfba8bab93 docs: Update README.md (#167)
Pretty sure it's not meant to be `.toml`?
2023-02-03 18:06:22 +01:00
e21f058fd4 chore(main): release 1.3.4 (#152)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-02-02 09:30:39 +01:00
c567164e71 chore(build): auto-generate vimdoc 2023-02-02 08:29:25 +00:00
b81ecf9f7a fix(nvim-navic): use kinds icons for navic. Fixes #164 2023-02-02 09:28:17 +01:00
1aa9e26e84 chore(build): auto-generate vimdoc 2023-01-31 07:20:48 +00:00
3b5f363074 fix(mini.ai): load ai on VeryLazy. Keymaps interfer with which-key. #155 2023-01-31 08:20:00 +01:00
c5b22c0832 fix(noice): scroll doc window in normal, insert and select mode 2023-01-29 21:17:28 +01:00
59c32788ae chore(main): release 1.3.3 (#131)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-29 09:22:18 +01:00
b7d514d15a chore(build): auto-generate vimdoc 2023-01-29 08:18:22 +00:00
ac1f188525 fix(neo-tree): disable the <space> mapping (you can use <cr> instead), to make sure <leader> mappings still work. Fixes #146 2023-01-29 09:17:37 +01:00
48f45d4469 chore(build): auto-generate vimdoc 2023-01-28 14:43:10 +00:00
40f73a2c13 style: fix comment typo (#145) 2023-01-28 15:42:29 +01:00
a37b24764e chore(build): auto-generate vimdoc 2023-01-27 07:14:19 +00:00
e96def6fe4 docs: Added german Translation of the README (#136)
* Added German Translation of README

* Rename README.de-DE.md.txt to README-DE.md.txt
2023-01-27 08:13:30 +01:00
835f77f3be fix(lualine): fixed nei-tree extension (#132) 2023-01-25 19:01:55 +01:00
5ac9938cc8 fix(neo-tree): dont change cwd when opening neo-tree. Fixes #130 2023-01-25 14:54:34 +01:00
9b35481e0c chore(main): release 1.3.2 (#121)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-25 09:11:02 +01:00
65fb26fe97 refactor: removed deprecation warnings from before 1.0.0 2023-01-25 09:00:33 +01:00
2321847e72 refactor: move LazyVim init to core 2023-01-25 09:00:33 +01:00
bd4f350503 fix(config): return defaults when setup was not run yet. Fixes #126 2023-01-25 09:00:33 +01:00
12771e9987 chore(build): auto-generate vimdoc 2023-01-25 07:25:09 +00:00
2ae2a63265 fix(bufferline): plugin was renamed from nvim-bufferline.lua -> bufferline.nvim. Fixes #128 2023-01-25 08:19:44 +01:00
5a4cb1b7ee fix(illuminate): delete ]] and [[ keymaps set by ftplugins. Fixes #124 2023-01-25 08:15:12 +01:00
94267fe266 refactor: removed noice deactivate 2023-01-24 13:40:48 +01:00
8650f2c99a fix(config): don't set options to their defaults (#120) 2023-01-24 13:40:18 +01:00
128231a821 chore(main): release 1.3.1 (#118)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-24 08:53:46 +01:00
5bf979d234 fix(lsp): again 2023-01-24 08:52:28 +01:00
744028ea4c fix(lsp): check for nvim-cmp intsead of cmp 2023-01-24 08:50:18 +01:00
9848d56d8f chore(main): release 1.3.0 (#107)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-24 08:44:36 +01:00
7fe6a8edc2 chore(build): auto-generate vimdoc 2023-01-24 07:40:42 +00:00
10f809784d feat: added deactivate for neo-tree and noice 2023-01-24 08:39:41 +01:00
5aa85e47e4 fix(telescope): bind hidden/ignore to <a-i>, <a-h> instead of <c-i> since thats the same as <tab>. Fixes #117 2023-01-24 08:17:57 +01:00
adee0521bf feat(health): added some simple health checks 2023-01-24 08:17:10 +01:00
b81dc71211 fix(lsp): only load cmp-nvim-lsp when cmp is enabled 2023-01-24 07:50:07 +01:00
1b3b18d53b fix(options): don't set GUI font. Fixes #113 2023-01-23 23:42:01 +01:00
7595bfaa3b fix(lsp): ]w and [w now work as expected. Fixes #109 2023-01-23 19:21:14 +01:00
e2bfd2d664 chore(build): auto-generate vimdoc 2023-01-23 07:09:07 +00:00
012dbab586 feat(keymaps): do not create keymaps when a lazy keys handler exists 2023-01-23 08:08:12 +01:00
bb3f0fdc55 build: highlight extra module 2023-01-23 08:08:12 +01:00
638b227b1f chore(main): release 1.2.0 (#101)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-23 00:14:42 +01:00
1a55a167a0 feat(extras): added extra for mini.animate. Highly recommended! 2023-01-23 00:11:29 +01:00
21 changed files with 456 additions and 160 deletions

View File

@ -1,5 +1,82 @@
# Changelog
## [1.4.0](https://github.com/LazyVim/LazyVim/compare/v1.3.4...v1.4.0) (2023-02-07)
### Features
* **icons:** add copilot icon ([#195](https://github.com/LazyVim/LazyVim/issues/195)) ([a575540](https://github.com/LazyVim/LazyVim/commit/a5755408dd7183f52188f7377bef87b949134406))
### Bug Fixes
* **keymaps:** move lines with silent and without triggering cmdline. Fixes [#184](https://github.com/LazyVim/LazyVim/issues/184) ([2ff2131](https://github.com/LazyVim/LazyVim/commit/2ff213126ceb7c85619a084f9bde4c92199248f3))
* **keymaps:** silent by default ([e5626e9](https://github.com/LazyVim/LazyVim/commit/e5626e9a2dadf9b27287fc81b2dd59bd5291f684))
* **lsp:** properly merge lsp client capabilities ([826655b](https://github.com/LazyVim/LazyVim/commit/826655b901485da4a16e0c559ba7146f566a3122))
* **mini.indent:** no need to disable indent in alpha dashboard config. Fixes [#199](https://github.com/LazyVim/LazyVim/issues/199) ([320f5c6](https://github.com/LazyVim/LazyVim/commit/320f5c6de78a8671393ef221bccc9dce8265d3e5))
* **mini.surround:** use merged plugin spec to build keys. Fixes [#172](https://github.com/LazyVim/LazyVim/issues/172). Fixes [#177](https://github.com/LazyVim/LazyVim/issues/177) ([1823236](https://github.com/LazyVim/LazyVim/commit/182323623af2f91a21285025a603be1eb329853c))
* **typescript:** typescript extras Keymaps ([#175](https://github.com/LazyVim/LazyVim/issues/175)) ([3a28ce7](https://github.com/LazyVim/LazyVim/commit/3a28ce7919b05b4bcec2fdc461eac099d0905835))
## [1.3.4](https://github.com/LazyVim/LazyVim/compare/v1.3.3...v1.3.4) (2023-02-02)
### Bug Fixes
* **mini.ai:** load ai on VeryLazy. Keymaps interfer with which-key. [#155](https://github.com/LazyVim/LazyVim/issues/155) ([3b5f363](https://github.com/LazyVim/LazyVim/commit/3b5f36307438ad05beae6796ca005f6b56d6a360))
* **noice:** scroll doc window in normal, insert and select mode ([c5b22c0](https://github.com/LazyVim/LazyVim/commit/c5b22c0832603198f571ff68b6fb9d0c17f73d33))
* **nvim-navic:** use kinds icons for navic. Fixes [#164](https://github.com/LazyVim/LazyVim/issues/164) ([b81ecf9](https://github.com/LazyVim/LazyVim/commit/b81ecf9f7ac78e3f87a4d9b305fa0d3cfd6decf2))
## [1.3.3](https://github.com/LazyVim/LazyVim/compare/v1.3.2...v1.3.3) (2023-01-29)
### Bug Fixes
* **lualine:** fixed nei-tree extension ([#132](https://github.com/LazyVim/LazyVim/issues/132)) ([835f77f](https://github.com/LazyVim/LazyVim/commit/835f77f3bebf7b189b0a120ef5fabe6a654b046d))
* **neo-tree:** disable the `&lt;space&gt;` mapping (you can use `<cr>` instead), to make sure `<leader>` mappings still work. Fixes [#146](https://github.com/LazyVim/LazyVim/issues/146) ([ac1f188](https://github.com/LazyVim/LazyVim/commit/ac1f188525b78fa78cfac8908bdbf974f8cb5ff4))
* **neo-tree:** dont change cwd when opening neo-tree. Fixes [#130](https://github.com/LazyVim/LazyVim/issues/130) ([5ac9938](https://github.com/LazyVim/LazyVim/commit/5ac9938cc8a1aac5d1c3b694900e6f67553f4de3))
## [1.3.2](https://github.com/LazyVim/LazyVim/compare/v1.3.1...v1.3.2) (2023-01-25)
### Bug Fixes
* **bufferline:** plugin was renamed from nvim-bufferline.lua -&gt; bufferline.nvim. Fixes [#128](https://github.com/LazyVim/LazyVim/issues/128) ([2ae2a63](https://github.com/LazyVim/LazyVim/commit/2ae2a6326524baef7c271c4d01f950bffe6aa755))
* **config:** don't set options to their defaults ([#120](https://github.com/LazyVim/LazyVim/issues/120)) ([8650f2c](https://github.com/LazyVim/LazyVim/commit/8650f2c99a95845bbf8037f49682f9aa75b0795d))
* **config:** return defaults when setup was not run yet. Fixes [#126](https://github.com/LazyVim/LazyVim/issues/126) ([bd4f350](https://github.com/LazyVim/LazyVim/commit/bd4f3505037ef95047d63faab959e4777462ffe4))
* **illuminate:** delete `]]` and `[[` keymaps set by ftplugins. Fixes [#124](https://github.com/LazyVim/LazyVim/issues/124) ([5a4cb1b](https://github.com/LazyVim/LazyVim/commit/5a4cb1b7eedec850f4d20ac47837a03180993987))
## [1.3.1](https://github.com/LazyVim/LazyVim/compare/v1.3.0...v1.3.1) (2023-01-24)
### Bug Fixes
* **lsp:** again ([5bf979d](https://github.com/LazyVim/LazyVim/commit/5bf979d234c5af60efb976bd56dded16823df743))
* **lsp:** check for nvim-cmp intsead of cmp ([744028e](https://github.com/LazyVim/LazyVim/commit/744028ea4c87acbb1674c20bae094fa4abca9c7d))
## [1.3.0](https://github.com/LazyVim/LazyVim/compare/v1.2.0...v1.3.0) (2023-01-24)
### Features
* added deactivate for neo-tree and noice ([10f8097](https://github.com/LazyVim/LazyVim/commit/10f809784d9d8a8eba5937ff56fe9ab8807a6832))
* **health:** added some simple health checks ([adee052](https://github.com/LazyVim/LazyVim/commit/adee0521bff6fd126163312e3693320f7aa29259))
* **keymaps:** do not create keymaps when a lazy keys handler exists ([012dbab](https://github.com/LazyVim/LazyVim/commit/012dbab586529484cfec4d1c399b621a01e4164e))
### Bug Fixes
* **lsp:** `]w` and `[w` now work as expected. Fixes [#109](https://github.com/LazyVim/LazyVim/issues/109) ([7595bfa](https://github.com/LazyVim/LazyVim/commit/7595bfaa3b35e424e54f7600588e1c134a237ef8))
* **lsp:** only load cmp-nvim-lsp when cmp is enabled ([b81dc71](https://github.com/LazyVim/LazyVim/commit/b81dc712119bc3b690028f4c0056eeacf8644037))
* **options:** don't set GUI font. Fixes [#113](https://github.com/LazyVim/LazyVim/issues/113) ([1b3b18d](https://github.com/LazyVim/LazyVim/commit/1b3b18d53bb0b6f97864c5a21fe5c3955147f7f0))
* **telescope:** bind hidden/ignore to `&lt;a-i&gt;`, `<a-h>` instead of `<c-i`> since thats the same as `<tab>`. Fixes [#117](https://github.com/LazyVim/LazyVim/issues/117) ([5aa85e4](https://github.com/LazyVim/LazyVim/commit/5aa85e47e42e86eb854fc42a4f4a46f1de50a56f))
## [1.2.0](https://github.com/LazyVim/LazyVim/compare/v1.1.0...v1.2.0) (2023-01-22)
### Features
* **extras:** added extra for mini.animate. Highly recommended! ([1a55a16](https://github.com/LazyVim/LazyVim/commit/1a55a167a0eb3eb020af8422fa81cd93fb2d444e))
## [1.1.0](https://github.com/LazyVim/LazyVim/compare/v1.0.0...v1.1.0) (2023-01-22)

138
README-DE.md.txt Normal file
View File

@ -0,0 +1,138 @@
<div align="center">
<img src="https://user-images.githubusercontent.com/292349/213446185-2db63fd5-8c84-459c-9f04-e286382d6e80.png">
</div>
<hr>
<h4 align="center">
<a href="https://lazyvim.github.io/installation">Install</a>
·
<a href="https://lazyvim.github.io/configuration">Configure</a>
·
<a href="https://lazyvim.github.io">Docs</a>
</h4>
<div align="center"><p>
<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 ist ein Neovim setup aufgebaut auf [💤 lazy.nvim](https://github.com/folke/lazy.nvim).
Es erleichter 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.
![image](https://user-images.githubusercontent.com/292349/213447056-92290767-ea16-430c-8727-ce994c93e9cc.png)
![image](https://user-images.githubusercontent.com/292349/211285846-0b7bb3bf-0462-4029-b64c-4ee1d037fc1c.png)
## ✨ Features
- 🔥 Transformiere dein Neovim in eine komplette IDE
- 💤 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
## ⚡️ Vorraussetzungen
- Neovim >= **0.8.0** (gebraucht um mit **LuaJIT** zu bauen)
- Git >= **2.19.0** (um Teil-Klone zu unterstützen)
- eine [Nerd Font](https://www.nerdfonts.com/) **_(optional)_**
## 🚀 Einstieg
Sie können eine Startvorlage für **LazyVim** [hier](https://github.com/LazyVim/starter) finden
<details><summary>Versuchen Sie's mit Docker</summary>
```sh
docker run -w /root -it --rm alpine:edge sh -uelic '
apk add git lazygit neovim ripgrep alpine-sdk --update
git clone https://github.com/LazyVim/starter ~/.config/nvim
cd ~/.config/nvim
nvim
'
```
</details>
<details><summary>Installieren von <a href="https://github.com/LazyVim/starter">LazyVim Starter</a></summary>
- Neovim Files sichern:
```sh
mv ~/.config/nvim ~/.config/nvim.bak
mv ~/.local/share/nvim ~/.local/share/nvim.bak
```
- Den Starter Klonen:
```sh
git clone https://github.com/LazyVim/starter ~/.config/nvim
```
- Den `.git` Folder löschen, um die Konfiguration zu einer eigenen distro hinzuzufügen:
```sh
rm -rf ~/.config/nvim/.git
```
- Neovim starten!
```sh
nvim
```
Refer to the comments in the files on how to customize **LazyVim**.
</details>
## 📂 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](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.toml
</pre>
## ⚙️ Configuration
Refer to the [docs](https://lazyvim.github.io)

View File

@ -42,10 +42,10 @@ Rather than having to choose between starting from scratch or 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.
![image](https://user-images.githubusercontent.com/292349/213447056-92290767-ea16-430c-8727-ce994c93e9cc.png)
![image](https://user-images.githubusercontent.com/292349/211285846-0b7bb3bf-0462-4029-b64c-4ee1d037fc1c.png)
![image](https://user-images.githubusercontent.com/292349/213447056-92290767-ea16-430c-8727-ce994c93e9cc.png)
## ✨ Features
- 🔥 Transform your Neovim into a full-fledged IDE
@ -108,6 +108,12 @@ docker run -w /root -it --rm alpine:edge sh -uelic '
</details>
---
There's a great video created by [@elijahmanor](https://github.com/elijahmanor) with a walkthrough to get started.
[![Watch the video](https://img.youtube.com/vi/N93cTbtLCIM/hqdefault.jpg)](https://www.youtube.com/watch?v=N93cTbtLCIM)
## 📂 File Structure
The files under config will be automatically loaded at the appropriate time,
@ -130,7 +136,7 @@ will be automatically loaded by [lazy.nvim](https://github.com/folke/lazy.nvim)
│   ├── spec1.lua
│   ├── **
│   └── spec2.lua
└── init.toml
└── init.lua
</pre>
## ⚙️ Configuration

View File

@ -1,4 +1,4 @@
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 January 22
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 February 07
==============================================================================
Table of Contents *LazyVim-table-of-contents*
@ -58,12 +58,12 @@ 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/213447056-92290767-ea16-430c-8727-ce994c93e9cc.png" title="fig:"/>
<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/211285846-0b7bb3bf-0462-4029-b64c-4ee1d037fc1c.png" title="fig:"/>
<img src="https://user-images.githubusercontent.com/292349/213447056-92290767-ea16-430c-8727-ce994c93e9cc.png" title="fig:"/>
<p class="caption">image</p>
</div>
@ -125,6 +125,14 @@ 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 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
@ -147,7 +155,7 @@ be automatically loaded by lazy.nvim <https://github.com/folke/lazy.nvim>
   spec1.lua
  
   spec2.lua
init.toml
init.lua
</pre>
CONFIGURATION *LazyVim-configuration*

View File

@ -30,6 +30,7 @@ local defaults = {
Color = "",
Constant = "",
Constructor = "",
Copilot = "",
Enum = "",
EnumMember = "",
Event = "",
@ -76,9 +77,10 @@ function M.setup(opts)
.. "Please upgrade **lazy.nvim**",
{ title = "LazyVim" }
)
error("Exiting")
end
if vim.fn.argc() == 0 then
if vim.fn.argc(-1) == 0 then
-- autocmds and keymaps can wait to load
vim.api.nvim_create_autocmd("User", {
group = vim.api.nvim_create_augroup("LazyVim", { clear = true }),
@ -155,7 +157,7 @@ end
setmetatable(M, {
__index = function(_, key)
if options == nil then
M.setup()
return vim.deepcopy(defaults)[key]
end
---@cast options LazyVimConfig
return options[key]

View File

@ -2,129 +2,140 @@
local Util = require("lazyvim.util")
local function map(mode, lhs, rhs, opts)
local keys = require("lazy.core.handler").handlers.keys
---@cast keys LazyKeysHandler
-- do not create the keymap if a lazy keys handler exists
if not keys.active[keys.parse({ lhs, mode = mode }).id] then
opts = opts or {}
opts.silent = opts.silent ~= false
vim.keymap.set(mode, lhs, rhs, opts)
end
end
-- better up/down
vim.keymap.set("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
vim.keymap.set("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
map("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
map("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
-- Move to window using the <ctrl> hjkl keys
vim.keymap.set("n", "<C-h>", "<C-w>h", { desc = "Go to left window" })
vim.keymap.set("n", "<C-j>", "<C-w>j", { desc = "Go to lower window" })
vim.keymap.set("n", "<C-k>", "<C-w>k", { desc = "Go to upper window" })
vim.keymap.set("n", "<C-l>", "<C-w>l", { desc = "Go to right window" })
map("n", "<C-h>", "<C-w>h", { desc = "Go to left window" })
map("n", "<C-j>", "<C-w>j", { desc = "Go to lower window" })
map("n", "<C-k>", "<C-w>k", { desc = "Go to upper window" })
map("n", "<C-l>", "<C-w>l", { desc = "Go to right window" })
-- Resize window using <ctrl> arrow keys
vim.keymap.set("n", "<C-Up>", "<cmd>resize +2<cr>", { desc = "Increase window height" })
vim.keymap.set("n", "<C-Down>", "<cmd>resize -2<cr>", { desc = "Decrease window height" })
vim.keymap.set("n", "<C-Left>", "<cmd>vertical resize -2<cr>", { desc = "Decrease window width" })
vim.keymap.set("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
vim.keymap.set("n", "<A-j>", ":m .+1<cr>==", { desc = "Move down" })
vim.keymap.set("v", "<A-j>", ":m '>+1<cr>gv=gv", { desc = "Move down" })
vim.keymap.set("i", "<A-j>", "<Esc>:m .+1<cr>==gi", { desc = "Move down" })
vim.keymap.set("n", "<A-k>", ":m .-2<cr>==", { desc = "Move up" })
vim.keymap.set("v", "<A-k>", ":m '<-2<cr>gv=gv", { desc = "Move up" })
vim.keymap.set("i", "<A-k>", "<Esc>:m .-2<cr>==gi", { 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
if Util.has("nvim-bufferline.lua") then
vim.keymap.set("n", "<S-h>", "<cmd>BufferLineCyclePrev<cr>", { desc = "Prev buffer" })
vim.keymap.set("n", "<S-l>", "<cmd>BufferLineCycleNext<cr>", { desc = "Next buffer" })
vim.keymap.set("n", "[b", "<cmd>BufferLineCyclePrev<cr>", { desc = "Prev buffer" })
vim.keymap.set("n", "]b", "<cmd>BufferLineCycleNext<cr>", { desc = "Next buffer" })
if Util.has("bufferline.nvim") then
map("n", "<S-h>", "<cmd>BufferLineCyclePrev<cr>", { desc = "Prev buffer" })
map("n", "<S-l>", "<cmd>BufferLineCycleNext<cr>", { desc = "Next buffer" })
map("n", "[b", "<cmd>BufferLineCyclePrev<cr>", { desc = "Prev buffer" })
map("n", "]b", "<cmd>BufferLineCycleNext<cr>", { desc = "Next buffer" })
else
vim.keymap.set("n", "<S-h>", "<cmd>bprevious<cr>", { desc = "Prev buffer" })
vim.keymap.set("n", "<S-l>", "<cmd>bnext<cr>", { desc = "Next buffer" })
vim.keymap.set("n", "[b", "<cmd>bprevious<cr>", { desc = "Prev buffer" })
vim.keymap.set("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" })
end
vim.keymap.set("n", "<leader>bb", "<cmd>e #<cr>", { desc = "Switch to Other Buffer" })
vim.keymap.set("n", "<leader>`", "<cmd>e #<cr>", { desc = "Switch to Other 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>
vim.keymap.set({ "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
vim.keymap.set(
map(
"n",
"<leader>ur",
"<Cmd>nohlsearch<Bar>diffupdate<Bar>normal! <C-L><CR>",
{ desc = "Redraw / clear hlsearch / diff update" }
)
vim.keymap.set("n", "gw", "*N")
vim.keymap.set("x", "gw", "*N")
map("n", "gw", "*N")
map("x", "gw", "*N")
-- https://github.com/mhinz/vim-galore#saner-behavior-of-n-and-n
vim.keymap.set("n", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
vim.keymap.set("x", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
vim.keymap.set("o", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
vim.keymap.set("n", "N", "'nN'[v:searchforward]", { expr = true, desc = "Prev search result" })
vim.keymap.set("x", "N", "'nN'[v:searchforward]", { expr = true, desc = "Prev search result" })
vim.keymap.set("o", "N", "'nN'[v:searchforward]", { expr = true, desc = "Prev search result" })
map("n", "n", "'Nn'[v:searchforward]", { 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]", { 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
vim.keymap.set("i", ",", ",<c-g>u")
vim.keymap.set("i", ".", ".<c-g>u")
vim.keymap.set("i", ";", ";<c-g>u")
map("i", ",", ",<c-g>u")
map("i", ".", ".<c-g>u")
map("i", ";", ";<c-g>u")
-- save file
vim.keymap.set({ "i", "v", "n", "s" }, "<C-s>", "<cmd>w<cr><esc>", { desc = "Save file" })
map({ "i", "v", "n", "s" }, "<C-s>", "<cmd>w<cr><esc>", { desc = "Save file" })
-- better indenting
vim.keymap.set("v", "<", "<gv")
vim.keymap.set("v", ">", ">gv")
map("v", "<", "<gv")
map("v", ">", ">gv")
-- lazy
vim.keymap.set("n", "<leader>l", "<cmd>:Lazy<cr>", { desc = "Lazy" })
map("n", "<leader>l", "<cmd>:Lazy<cr>", { desc = "Lazy" })
-- new file
vim.keymap.set("n", "<leader>fn", "<cmd>enew<cr>", { desc = "New File" })
map("n", "<leader>fn", "<cmd>enew<cr>", { desc = "New File" })
vim.keymap.set("n", "<leader>xl", "<cmd>lopen<cr>", { desc = "Open Location List" })
vim.keymap.set("n", "<leader>xq", "<cmd>copen<cr>", { desc = "Open Quickfix List" })
map("n", "<leader>xl", "<cmd>lopen<cr>", { desc = "Open Location List" })
map("n", "<leader>xq", "<cmd>copen<cr>", { desc = "Open Quickfix List" })
-- stylua: ignore start
-- toggle options
vim.keymap.set("n", "<leader>uf", require("lazyvim.plugins.lsp.format").toggle, { desc = "Toggle format on Save" })
vim.keymap.set("n", "<leader>us", function() Util.toggle("spell") end, { desc = "Toggle Spelling" })
vim.keymap.set("n", "<leader>uw", function() Util.toggle("wrap") end, { desc = "Toggle Word Wrap" })
vim.keymap.set("n", "<leader>ul", function() Util.toggle("relativenumber", true) Util.toggle("number") end, { desc = "Toggle Line Numbers" })
vim.keymap.set("n", "<leader>ud", Util.toggle_diagnostics, { desc = "Toggle Diagnostics" })
map("n", "<leader>uf", require("lazyvim.plugins.lsp.format").toggle, { desc = "Toggle format on Save" })
map("n", "<leader>us", function() Util.toggle("spell") end, { desc = "Toggle Spelling" })
map("n", "<leader>uw", function() Util.toggle("wrap") end, { desc = "Toggle Word Wrap" })
map("n", "<leader>ul", function() Util.toggle("relativenumber", true) Util.toggle("number") end, { desc = "Toggle Line Numbers" })
map("n", "<leader>ud", Util.toggle_diagnostics, { desc = "Toggle Diagnostics" })
local conceallevel = vim.o.conceallevel > 0 and vim.o.conceallevel or 3
vim.keymap.set("n", "<leader>uc", function() Util.toggle("conceallevel", false, {0, conceallevel}) end, { desc = "Toggle Conceal" })
map("n", "<leader>uc", function() Util.toggle("conceallevel", false, {0, conceallevel}) end, { desc = "Toggle Conceal" })
-- lazygit
vim.keymap.set("n", "<leader>gg", function() Util.float_term({ "lazygit" }, { cwd = Util.get_root() }) end, { desc = "Lazygit (root dir)" })
vim.keymap.set("n", "<leader>gG", function() Util.float_term({ "lazygit" }) end, { desc = "Lazygit (cwd)" })
map("n", "<leader>gg", function() Util.float_term({ "lazygit" }, { cwd = Util.get_root() }) end, { desc = "Lazygit (root dir)" })
map("n", "<leader>gG", function() Util.float_term({ "lazygit" }) end, { desc = "Lazygit (cwd)" })
-- quit
vim.keymap.set("n", "<leader>qq", "<cmd>qa<cr>", { desc = "Quit all" })
map("n", "<leader>qq", "<cmd>qa<cr>", { desc = "Quit all" })
-- highlights under cursor
if vim.fn.has("nvim-0.9.0") == 1 then
vim.keymap.set("n", "<leader>ui", vim.show_pos, { desc = "Inspect Pos" })
map("n", "<leader>ui", vim.show_pos, { desc = "Inspect Pos" })
end
-- floating terminal
vim.keymap.set("n", "<leader>ft", function() Util.float_term(nil, { cwd = Util.get_root() }) end, { desc = "Terminal (root dir)" })
vim.keymap.set("n", "<leader>fT", function() Util.float_term() end, { desc = "Terminal (cwd)" })
vim.keymap.set("t", "<esc><esc>", "<c-\\><c-n>", {desc = "Enter Normal Mode"})
map("n", "<leader>ft", function() Util.float_term(nil, { cwd = Util.get_root() }) end, { desc = "Terminal (root dir)" })
map("n", "<leader>fT", function() Util.float_term() end, { desc = "Terminal (cwd)" })
map("t", "<esc><esc>", "<c-\\><c-n>", {desc = "Enter Normal Mode"})
-- windows
vim.keymap.set("n", "<leader>ww", "<C-W>p", { desc = "Other window" })
vim.keymap.set("n", "<leader>wd", "<C-W>c", { desc = "Delete window" })
vim.keymap.set("n", "<leader>w-", "<C-W>s", { desc = "Split window below" })
vim.keymap.set("n", "<leader>w|", "<C-W>v", { desc = "Split window right" })
vim.keymap.set("n", "<leader>-", "<C-W>s", { desc = "Split window below" })
vim.keymap.set("n", "<leader>|", "<C-W>v", { desc = "Split window right" })
map("n", "<leader>ww", "<C-W>p", { desc = "Other window" })
map("n", "<leader>wd", "<C-W>c", { desc = "Delete window" })
map("n", "<leader>w-", "<C-W>s", { desc = "Split window below" })
map("n", "<leader>w|", "<C-W>v", { desc = "Split window right" })
map("n", "<leader>-", "<C-W>s", { desc = "Split window below" })
map("n", "<leader>|", "<C-W>v", { desc = "Split window right" })
-- tabs
vim.keymap.set("n", "<leader><tab>l", "<cmd>tablast<cr>", { desc = "Last Tab" })
vim.keymap.set("n", "<leader><tab>f", "<cmd>tabfirst<cr>", { desc = "First Tab" })
vim.keymap.set("n", "<leader><tab><tab>", "<cmd>tabnew<cr>", { desc = "New Tab" })
vim.keymap.set("n", "<leader><tab>]", "<cmd>tabnext<cr>", { desc = "Next Tab" })
vim.keymap.set("n", "<leader><tab>d", "<cmd>tabclose<cr>", { desc = "Close Tab" })
vim.keymap.set("n", "<leader><tab>[", "<cmd>tabprevious<cr>", { desc = "Previous Tab" })
map("n", "<leader><tab>l", "<cmd>tablast<cr>", { desc = "Last Tab" })
map("n", "<leader><tab>f", "<cmd>tabfirst<cr>", { desc = "First Tab" })
map("n", "<leader><tab><tab>", "<cmd>tabnew<cr>", { desc = "New Tab" })
map("n", "<leader><tab>]", "<cmd>tabnext<cr>", { desc = "Next Tab" })
map("n", "<leader><tab>d", "<cmd>tabclose<cr>", { desc = "Close Tab" })
map("n", "<leader><tab>[", "<cmd>tabprevious<cr>", { desc = "Previous Tab" })

View File

@ -5,25 +5,21 @@ vim.g.maplocalleader = " "
local opt = vim.opt
opt.autowrite = true -- enable auto write
opt.clipboard = "unnamedplus" -- sync with system clipboard
opt.cmdheight = 1
opt.autowrite = true -- Enable auto write
opt.clipboard = "unnamedplus" -- Sync with system clipboard
opt.completeopt = "menu,menuone,noselect"
opt.conceallevel = 3 -- Hide * markup for bold and italic
opt.confirm = true -- confirm to save changes before exiting modified buffer
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.formatoptions = "jcroqlnt" -- tcqj
opt.grepformat = "%f:%l:%c:%m"
opt.grepprg = "rg --vimgrep"
opt.guifont = "FiraCode Nerd Font:h11"
opt.hidden = true -- Enable modified buffers in background
opt.ignorecase = true -- Ignore case
opt.inccommand = "nosplit" -- preview incremental substitute
opt.joinspaces = false -- No double spaces with join after a dot
opt.laststatus = 0
opt.list = true -- Show some invisible characters (tabs...
opt.mouse = "a" -- enable mouse mode
opt.mouse = "a" -- Enable mouse mode
opt.number = true -- Print line number
opt.pumblend = 10 -- Popup blend
opt.pumheight = 10 -- Maximum number of entries in a popup
@ -32,7 +28,8 @@ opt.scrolloff = 4 -- Lines of context
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" }
opt.shiftround = true -- Round indent
opt.shiftwidth = 2 -- Size of an indent
opt.showmode = false -- dont show mode since we have a statusline
opt.shortmess:append { W = true, I = true, c = true }
opt.showmode = false -- Dont show mode since we have a statusline
opt.sidescrolloff = 8 -- Columns of context
opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
opt.smartcase = true -- Don't ignore case with capitals
@ -45,15 +42,15 @@ opt.termguicolors = true -- True color support
opt.timeoutlen = 300
opt.undofile = true
opt.undolevels = 10000
opt.updatetime = 200 -- save swap file and trigger CursorHold
opt.updatetime = 200 -- Save swap file and trigger CursorHold
opt.wildmode = "longest:full,full" -- Command-line completion mode
opt.winminwidth = 5 -- minimum window width
opt.winminwidth = 5 -- Minimum window width
opt.wrap = false -- Disable line wrap
if vim.fn.has("nvim-0.9.0") == 1 then
opt.splitkeep = "screen"
opt.shortmess = "filnxtToOFWIcC"
opt.shortmess:append { C = true }
end
-- fix markdown indentation settings
-- Fix markdown indentation settings
vim.g.markdown_recommended_style = 0

View File

@ -1,16 +0,0 @@
require("lazy.core.util").warn(
[[`config.settings` is deprecated.
Please configure LazyVim as a plugin:
```lua
{
"LazyVim/LazyVim",
opts = {
-- your config comes here
},
}
```
]],
{ title = "LazyVim" }
)
return require("lazyvim.config")

21
lua/lazyvim/health.lua Normal file
View File

@ -0,0 +1,21 @@
local M = {}
function M.check()
vim.health.report_start("LazyVim")
if vim.fn.has("nvim-0.8.0") == 1 then
vim.health.report_ok("Using Neovim >= 0.8.0")
else
vim.health.report_error("Neovim >= 0.8.0 is required")
end
for _, cmd in ipairs({ "git", "rg", "fd", "lazygit" }) do
if vim.fn.executable(cmd) == 1 then
vim.health.report_ok(("`%s` is installed"):format(cmd))
else
vim.health.report_warn(("`%s` is not installed"):format(cmd))
end
end
end
return M

View File

@ -92,8 +92,9 @@ return {
-- surround
{
"echasnovski/mini.surround",
keys = function(plugin, keys)
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" } },
@ -143,10 +144,11 @@ return {
-- better text-objects
{
"echasnovski/mini.ai",
keys = {
{ "a", mode = { "x", "o" } },
{ "i", mode = { "x", "o" } },
},
-- keys = {
-- { "a", mode = { "x", "o" } },
-- { "i", mode = { "x", "o" } },
-- },
event = "VeryLazy",
dependencies = {
{
"nvim-treesitter/nvim-treesitter-textobjects",

View File

@ -1,8 +1,4 @@
-- only add for >=9.0.1, since there's an endless loop in earlier versions
if not require("lazyvim.config").has(">=9.1.0") then
require("lazyvim.config").setup()
return {}
end
require("lazyvim.config").init()
return {
{ "folke/lazy.nvim", version = "*" },

View File

@ -14,10 +14,19 @@ return {
end,
desc = "Explorer NeoTree (root dir)",
},
{ "<leader>fE", "<cmd>Neotree toggle<CR>", desc = "Explorer NeoTree (cwd)" },
{
"<leader>fE",
function()
require("neo-tree.command").execute({ toggle = true, dir = vim.loop.cwd() })
end,
desc = "Explorer NeoTree (cwd)",
},
{ "<leader>e", "<leader>fe", desc = "Explorer NeoTree (root dir)", remap = true },
{ "<leader>E", "<leader>fE", desc = "Explorer NeoTree (cwd)", remap = true },
},
deactivate = function()
vim.cmd([[Neotree close]])
end,
init = function()
vim.g.neo_tree_remove_legacy_commands = 1
if vim.fn.argc() == 1 then
@ -29,8 +38,14 @@ return {
end,
opts = {
filesystem = {
bind_to_cwd = false,
follow_current_file = true,
},
window = {
mappings = {
["<space>"] = "none",
},
},
},
},
@ -106,10 +121,10 @@ return {
["<c-t>"] = function(...)
return require("trouble.providers.telescope").open_with_trouble(...)
end,
["<C-i>"] = function()
["<a-i>"] = function()
Util.telescope("find_files", { no_ignore = true })()
end,
["<C-h>"] = function()
["<a-h>"] = function()
Util.telescope("find_files", { hidden = true })()
end,
["<C-Down>"] = function(...)
@ -214,6 +229,13 @@ return {
opts = { delay = 200 },
config = function(_, opts)
require("illuminate").configure(opts)
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 })
end,
})
end,
-- stylua: ignore
keys = {

View File

@ -24,8 +24,8 @@ return {
require("lazyvim.util").on_attach(function(client, buffer)
if client.name == "tsserver" then
-- stylua: ignore
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
vim.keymap.set("n", "<leader>co", "<cmd>TypescriptOrganizeImports<CR>", { buffer = buffer, desc = "Organize Imports" })
vim.keymap.set("n", "<leader>cR", "<cmd>TypescriptRenameFile<CR>", { desc = "Rename File", buffer = buffer })
end
end)
require("typescript").setup({ server = opts })

View File

@ -0,0 +1,40 @@
return {
-- animations
{
"echasnovski/mini.animate",
event = "VeryLazy",
opts = function()
-- don't use animate when scrolling with the mouse
local mouse_scrolled = false
for _, scroll in ipairs({ "Up", "Down" }) do
local key = "<ScrollWheel" .. scroll .. ">"
vim.keymap.set({ "", "i" }, key, function()
mouse_scrolled = true
return key
end, { expr = true })
end
local animate = require("mini.animate")
return {
resize = {
timing = animate.gen_timing.linear({ duration = 100, unit = "total" }),
},
scroll = {
timing = animate.gen_timing.linear({ duration = 150, unit = "total" }),
subscroll = animate.gen_subscroll.equal({
predicate = function(total_scroll)
if mouse_scrolled then
mouse_scrolled = false
return false
end
return total_scroll > 1
end,
}),
},
}
end,
config = function(_, opts)
require("mini.animate").setup(opts)
end,
},
}

View File

@ -1,3 +0,0 @@
require("lazyvim.config").init()
return {}

View File

@ -8,7 +8,12 @@ return {
{ "folke/neodev.nvim", opts = { experimental = { pathStrict = true } } },
"mason.nvim",
"williamboman/mason-lspconfig.nvim",
"hrsh7th/cmp-nvim-lsp",
{
"hrsh7th/cmp-nvim-lsp",
cond = function()
return require("lazyvim.util").has("nvim-cmp")
end,
},
},
---@class PluginLspOpts
opts = {
@ -61,13 +66,6 @@ return {
},
---@param opts PluginLspOpts
config = function(plugin, opts)
if plugin.servers then
require("lazyvim.util").deprecate("lspconfig.servers", "lspconfig.opts.servers")
end
if plugin.setup_server then
require("lazyvim.util").deprecate("lspconfig.setup_server", "lspconfig.opts.setup[SERVER]")
end
-- setup autoformat
require("lazyvim.plugins.lsp.format").autoformat = opts.autoformat
-- setup formatting and keymaps
@ -87,8 +85,10 @@ return {
local capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
local function setup(server)
local server_opts = servers[server] or {}
server_opts.capabilities = capabilities
local server_opts = vim.tbl_deep_extend("force", {
capabilities = vim.deepcopy(capabilities),
}, servers[server] or {})
if opts.setup[server] then
if opts.setup[server](server, server_opts) then
return
@ -155,9 +155,6 @@ return {
},
---@param opts MasonSettings | {ensure_installed: string[]}
config = function(plugin, opts)
if plugin.ensure_installed then
require("lazyvim.util").deprecate("treesitter.ensure_installed", "treesitter.opts.ensure_installed")
end
require("mason").setup(opts)
local mr = require("mason-registry")
for _, tool in ipairs(opts.ensure_installed) do

View File

@ -23,8 +23,8 @@ function M.get()
{ "[d", M.diagnostic_goto(false), desc = "Prev Diagnostic" },
{ "]e", M.diagnostic_goto(true, "ERROR"), desc = "Next Error" },
{ "[e", M.diagnostic_goto(false, "ERROR"), desc = "Prev Error" },
{ "]w", M.diagnostic_goto(true, "WARNING"), desc = "Next Warning" },
{ "[w", M.diagnostic_goto(false, "WARNING"), desc = "Prev Warning" },
{ "]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" },

View File

@ -41,10 +41,7 @@ return {
},
},
---@param opts TSConfig
config = function(plugin, opts)
if plugin.ensure_installed then
require("lazyvim.util").deprecate("treesitter.ensure_installed", "treesitter.opts.ensure_installed")
end
config = function(_, opts)
require("nvim-treesitter.configs").setup(opts)
end,
},

View File

@ -42,7 +42,7 @@ return {
-- bufferline
{
"akinsho/nvim-bufferline.lua",
"akinsho/bufferline.nvim",
event = "VeryLazy",
opts = {
options = {
@ -71,10 +71,6 @@ return {
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
opts = function(plugin)
if plugin.override then
require("lazyvim.util").deprecate("lualine.override", "lualine.opts")
end
local icons = require("lazyvim.config").icons
local function fg(name)
@ -145,7 +141,7 @@ return {
end,
},
},
extensions = { "nvim-tree" },
extensions = { "neo-tree" },
}
end,
},
@ -207,8 +203,8 @@ return {
{ "<leader>snl", function() require("noice").cmd("last") end, desc = "Noice Last Message" },
{ "<leader>snh", function() require("noice").cmd("history") end, desc = "Noice History" },
{ "<leader>sna", function() require("noice").cmd("all") end, desc = "Noice All" },
{ "<c-f>", function() if not require("noice.lsp").scroll(4) then return "<c-f>" end end, silent = true, expr = true, desc = "Scroll forward" },
{ "<c-b>", function() if not require("noice.lsp").scroll(-4) then return "<c-b>" end end, silent = true, expr = true, desc = "Scroll backward"},
{ "<c-f>", function() if not require("noice.lsp").scroll(4) then return "<c-f>" end end, silent = true, expr = true, desc = "Scroll forward", mode = {"i", "n", "s"} },
{ "<c-b>", function() if not require("noice.lsp").scroll(-4) then return "<c-b>" end end, silent = true, expr = true, desc = "Scroll backward", mode = {"i", "n", "s"}},
},
},
@ -249,8 +245,6 @@ return {
return dashboard
end,
config = function(_, dashboard)
vim.b.miniindentscope_disable = true
-- close Lazy and re-open when the dashboard is ready
if vim.o.filetype == "lazy" then
vim.cmd.close()
@ -288,7 +282,14 @@ return {
end
end)
end,
opts = { separator = " ", highlight = true, depth_limit = 5 },
opts = function()
return {
separator = " ",
highlight = true,
depth_limit = 5,
icons = require("lazyvim.config").icons.kinds,
}
end,
},
-- icons

View File

@ -157,7 +157,7 @@ function M.update2()
([[
To use this, add it to your **lazy.nvim** imports:
```lua title="lua/config/lazy.lua"
```lua title="lua/config/lazy.lua" {4}
require("lazy").setup({
spec = {
{ "folke/LazyVim", import = "lazyvim.plugins" },

View File

@ -92,7 +92,7 @@ function M.telescope(builtin, opts)
end
end
-- FIXME: create a togglable termiminal
-- FIXME: create a togglable terminal
-- Opens a floating terminal (interactive by default)
---@param cmd? string[]|string
---@param opts? LazyCmdOptions|{interactive?:boolean}