Compare commits
71 Commits
Author | SHA1 | Date | |
---|---|---|---|
d9e95f8dcd | |||
490598b81a | |||
6669e63368 | |||
d9b1c79c3e | |||
f5d232b79c | |||
fd0a0e829d | |||
b96ea665b3 | |||
b20f016b04 | |||
24cb9a90e5 | |||
42d2411bfa | |||
ddd1fceb76 | |||
7336478d09 | |||
cb384ad69f | |||
f492daa009 | |||
225a875179 | |||
3af91550be | |||
d61e4bd553 | |||
b796b6e5a8 | |||
4df6301f1e | |||
6416761353 | |||
52b34ce3c3 | |||
79b4d67357 | |||
5f5a564a82 | |||
088914e1dd | |||
f57031db7c | |||
9131897b61 | |||
0968e24f82 | |||
320f5c6de7 | |||
826655b901 | |||
edd0fbb6a1 | |||
a5755408dd | |||
4a9a2e8861 | |||
0556c011c5 | |||
4792d498ab | |||
68ad526f3a | |||
ab89f46fba | |||
e7004bce30 | |||
3a28ce7919 | |||
2ff213126c | |||
e5626e9a2d | |||
d905ff08b9 | |||
182323623a | |||
663e142bcd | |||
dfba8bab93 | |||
e21f058fd4 | |||
c567164e71 | |||
b81ecf9f7a | |||
1aa9e26e84 | |||
3b5f363074 | |||
c5b22c0832 | |||
59c32788ae | |||
b7d514d15a | |||
ac1f188525 | |||
48f45d4469 | |||
40f73a2c13 | |||
a37b24764e | |||
e96def6fe4 | |||
835f77f3be | |||
5ac9938cc8 | |||
9b35481e0c | |||
65fb26fe97 | |||
2321847e72 | |||
bd4f350503 | |||
12771e9987 | |||
2ae2a63265 | |||
5a4cb1b7ee | |||
94267fe266 | |||
8650f2c99a | |||
128231a821 | |||
5bf979d234 | |||
744028ea4c |
114
CHANGELOG.md
114
CHANGELOG.md
@ -1,5 +1,119 @@
|
||||
# Changelog
|
||||
|
||||
## [1.9.0](https://github.com/LazyVim/LazyVim/compare/v1.8.0...v1.9.0) (2023-02-11)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **config:** allow to disable loading of the default keymaps/autocmds/options. Fixes [#238](https://github.com/LazyVim/LazyVim/issues/238) ([6669e63](https://github.com/LazyVim/LazyVim/commit/6669e63368b88430ff574b8f392e8afb6cb434cb))
|
||||
|
||||
## [1.8.0](https://github.com/LazyVim/LazyVim/compare/v1.7.2...v1.8.0) (2023-02-10)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **mini.ai:** added all mini.ai text-objects to which-key ([b96ea66](https://github.com/LazyVim/LazyVim/commit/b96ea665b3056a6a4877de8e8ae6834923a2f415))
|
||||
* **telescope:** improved Telescope mappings in normal and insert mode ([#231](https://github.com/LazyVim/LazyVim/issues/231)) ([fd0a0e8](https://github.com/LazyVim/LazyVim/commit/fd0a0e829d7ea6aa8179b1d1efdf7083a4936c44))
|
||||
|
||||
## [1.7.2](https://github.com/LazyVim/LazyVim/compare/v1.7.1...v1.7.2) (2023-02-09)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **leap:** don't use the x and X mappings in visual mode ([42d2411](https://github.com/LazyVim/LazyVim/commit/42d2411bfa1d6fcc5edc20ee6dbc0dff0f0fba6e))
|
||||
|
||||
## [1.7.1](https://github.com/LazyVim/LazyVim/compare/v1.7.0...v1.7.1) (2023-02-09)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **lsp:** remove debug ([cb384ad](https://github.com/LazyVim/LazyVim/commit/cb384ad69f71e351f6441d535c7757f63a8093ba))
|
||||
|
||||
## [1.7.0](https://github.com/LazyVim/LazyVim/compare/v1.6.0...v1.7.0) (2023-02-09)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **bufferline:** added keymaps to pin and delete non-pinned buffers. See [#218](https://github.com/LazyVim/LazyVim/issues/218) ([3af9155](https://github.com/LazyVim/LazyVim/commit/3af91550be67d9699567727fffcae8aabafc0898))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **lsp:** dont use expr=true for lsp rename. Fixes [#220](https://github.com/LazyVim/LazyVim/issues/220) ([d61e4bd](https://github.com/LazyVim/LazyVim/commit/d61e4bd553b011bb9ec8e01a2f8d2590a6bc9b5e))
|
||||
|
||||
## [1.6.0](https://github.com/LazyVim/LazyVim/compare/v1.5.0...v1.6.0) (2023-02-07)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **lsp:** allow disabling autoformat for certain buffers ([52b34ce](https://github.com/LazyVim/LazyVim/commit/52b34ce3c3e486c7c3012a370651fa289e4647a0))
|
||||
|
||||
## [1.5.0](https://github.com/LazyVim/LazyVim/compare/v1.4.0...v1.5.0) (2023-02-07)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **autocmds:** add groups to autocmds ([#151](https://github.com/LazyVim/LazyVim/issues/151)) ([f57031d](https://github.com/LazyVim/LazyVim/commit/f57031db7ce12ddf21c6a51a22a9370237a729b6))
|
||||
* **trouble:** keymaps for trouble quicklist / loclist ([#171](https://github.com/LazyVim/LazyVim/issues/171)) ([088914e](https://github.com/LazyVim/LazyVim/commit/088914e1dd218f910586c83bdb72fe554c88a6da))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **plugins:** lazy-loading on BufReadPre or BufReadPost, should also use BufNewFile. Fixes [#169](https://github.com/LazyVim/LazyVim/issues/169) ([5f5a564](https://github.com/LazyVim/LazyVim/commit/5f5a564a82a8a9734012c9131f28056524366c6a))
|
||||
|
||||
## [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 `<space>` 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 -> 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)
|
||||
|
||||
|
||||
|
141
README-CN.md
Normal file
141
README-CN.md
Normal file
@ -0,0 +1,141 @@
|
||||
<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">安装</a>
|
||||
·
|
||||
<a href="https://lazyvim.github.io/configuration">配置</a>
|
||||
·
|
||||
<a href="https://lazyvim.github.io">文档</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 是由 [💤 lazy.nvim](https://github.com/folke/lazy.nvim) 驱动的一套 Neovim 配置,可以轻松自定义和扩展您的配置。
|
||||
不必在从头开始或使用预制发行版之间做选择,
|
||||
LazyVim 提供了两全其美的方式 - 根据需要调整配置的灵活性,以及默认预配置的便利性。
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## ✨ 特性
|
||||
|
||||
- 🔥 将你的 Neovim 变成一个成熟的 IDE
|
||||
- 💤 使用 [lazy.nvim](https://github.com/folke/lazy.nvim) 轻松自定义和扩展您的配置
|
||||
- 🚀 快如闪电
|
||||
- 🧹 选项、自动命令和键盘映射的合理预设
|
||||
- 📦 预配置了大量插件,随时可用
|
||||
|
||||
## ⚡️ 要求
|
||||
|
||||
- Neovim >= **0.8.0** (需要用 **LuaJIT** 构建)
|
||||
- Git >= **2.19.0** (用于部分克隆支持)
|
||||
- 一个 [Nerd Font](https://www.nerdfonts.com/) 字体 **_(可选)_**
|
||||
|
||||
## 🚀 入门
|
||||
|
||||
您可以在 [此处](https://github.com/LazyVim/starter) 找到 **LazyVim** 的入门模板
|
||||
|
||||
<details><summary>在 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> 安装 <a href="https://github.com/LazyVim/starter">LazyVim Starter</a></summary>
|
||||
|
||||
- 备份您当前的 Neovim 文件
|
||||
|
||||
```sh
|
||||
mv ~/.config/nvim ~/.config/nvim.bak
|
||||
mv ~/.local/share/nvim ~/.local/share/nvim.bak
|
||||
```
|
||||
|
||||
- 克隆 starter
|
||||
|
||||
```sh
|
||||
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
||||
```
|
||||
|
||||
- 删除 `.git` 文件夹,以便稍后将其添加到您自己的存储库
|
||||
|
||||
```sh
|
||||
rm -rf ~/.config/nvim/.git
|
||||
```
|
||||
|
||||
- 启动 Neovim!
|
||||
|
||||
```sh
|
||||
nvim
|
||||
```
|
||||
|
||||
请参阅文件中有关如何自定义 **LazyVim** 的注释。
|
||||
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
[@elijahmanor](https://github.com/elijahmanor) 制作了一段很棒的视频,其中包含入门演练。
|
||||
|
||||
[](https://www.youtube.com/watch?v=N93cTbtLCIM)
|
||||
|
||||
## 📂 文件结构
|
||||
|
||||
config 下的文件会在适当的时候自动加载,所以你不需要手动引入这些文件。
|
||||
**LazyVim** 带有一组默认配置文件,这些文件将在您的配置**之前**加载。
|
||||
看[这里](https://github.com/LazyVim/LazyVim/tree/main/lua/lazyvim/config)
|
||||
|
||||
您可以在 `lua/plugins/` 下添加自定义插件配置(specs)。
|
||||
[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
|
||||
|
||||
参考[文档](https://lazyvim.github.io/)
|
138
README-DE.md.txt
Normal file
138
README-DE.md.txt
Normal 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.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## ✨ 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)
|
12
README.md
12
README.md
@ -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.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## ✨ 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.
|
||||
|
||||
[](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
|
||||
|
@ -1,4 +1,4 @@
|
||||
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 January 24
|
||||
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 February 11
|
||||
|
||||
==============================================================================
|
||||
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**.
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
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
|
||||
@ -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*
|
||||
|
@ -1,10 +1,18 @@
|
||||
-- This file is automatically loaded by plugins.init
|
||||
|
||||
local function augroup(name)
|
||||
return vim.api.nvim_create_augroup("lazyvim_" .. name, { clear = true })
|
||||
end
|
||||
|
||||
-- Check if we need to reload the file when it changed
|
||||
vim.api.nvim_create_autocmd({ "FocusGained", "TermClose", "TermLeave" }, { command = "checktime" })
|
||||
vim.api.nvim_create_autocmd({ "FocusGained", "TermClose", "TermLeave" }, {
|
||||
group = augroup("checktime"),
|
||||
command = "checktime",
|
||||
})
|
||||
|
||||
-- Highlight on yank
|
||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
group = augroup("highlight_yank"),
|
||||
callback = function()
|
||||
vim.highlight.on_yank()
|
||||
end,
|
||||
@ -12,6 +20,7 @@ vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
|
||||
-- resize splits if window got resized
|
||||
vim.api.nvim_create_autocmd({ "VimResized" }, {
|
||||
group = augroup("resize_splits"),
|
||||
callback = function()
|
||||
vim.cmd("tabdo wincmd =")
|
||||
end,
|
||||
@ -19,6 +28,7 @@ vim.api.nvim_create_autocmd({ "VimResized" }, {
|
||||
|
||||
-- go to last loc when opening a buffer
|
||||
vim.api.nvim_create_autocmd("BufReadPost", {
|
||||
group = augroup("last_loc"),
|
||||
callback = function()
|
||||
local mark = vim.api.nvim_buf_get_mark(0, '"')
|
||||
local lcount = vim.api.nvim_buf_line_count(0)
|
||||
@ -30,6 +40,7 @@ vim.api.nvim_create_autocmd("BufReadPost", {
|
||||
|
||||
-- close some filetypes with <q>
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
group = augroup("close_with_q"),
|
||||
pattern = {
|
||||
"qf",
|
||||
"help",
|
||||
@ -47,7 +58,9 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||
end,
|
||||
})
|
||||
|
||||
-- wrap and check for spell in text filetypes
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
group = augroup("wrap_spell"),
|
||||
pattern = { "gitcommit", "markdown" },
|
||||
callback = function()
|
||||
vim.opt_local.wrap = true
|
||||
|
@ -10,6 +10,12 @@ local defaults = {
|
||||
colorscheme = function()
|
||||
require("tokyonight").load()
|
||||
end,
|
||||
-- load the default settings
|
||||
defaults = {
|
||||
autocmds = true, -- lazyvim.config.autocmds
|
||||
keymaps = true, -- lazyvim.config.keymaps
|
||||
options = true, -- lazyvim.config.options
|
||||
},
|
||||
-- icons used by other plugins
|
||||
icons = {
|
||||
diagnostics = {
|
||||
@ -30,6 +36,7 @@ local defaults = {
|
||||
Color = " ",
|
||||
Constant = " ",
|
||||
Constructor = " ",
|
||||
Copilot = " ",
|
||||
Enum = " ",
|
||||
EnumMember = " ",
|
||||
Event = " ",
|
||||
@ -76,9 +83,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 }),
|
||||
@ -118,8 +126,7 @@ end
|
||||
---@param name "autocmds" | "options" | "keymaps"
|
||||
function M.load(name)
|
||||
local Util = require("lazy.core.util")
|
||||
-- always load lazyvim, then user file
|
||||
for _, mod in ipairs({ "lazyvim.config." .. name, "config." .. name }) do
|
||||
local function _load(mod)
|
||||
Util.try(function()
|
||||
require(mod)
|
||||
end, {
|
||||
@ -132,6 +139,11 @@ function M.load(name)
|
||||
end,
|
||||
})
|
||||
end
|
||||
-- always load lazyvim, then user file
|
||||
if M.defaults[name] then
|
||||
_load("lazyvim.config." .. name)
|
||||
end
|
||||
_load("config." .. name)
|
||||
if vim.bo.filetype == "lazy" then
|
||||
-- HACK: LazyVim may have overwritten options of the Lazy ui, so reset this here
|
||||
vim.cmd([[do VimResized]])
|
||||
@ -155,7 +167,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]
|
||||
|
@ -7,6 +7,8 @@ local function map(mode, lhs, rhs, opts)
|
||||
---@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
|
||||
@ -28,15 +30,15 @@ map("n", "<C-Left>", "<cmd>vertical resize -2<cr>", { desc = "Decrease window wi
|
||||
map("n", "<C-Right>", "<cmd>vertical resize +2<cr>", { desc = "Increase window width" })
|
||||
|
||||
-- Move Lines
|
||||
map("n", "<A-j>", ":m .+1<cr>==", { desc = "Move down" })
|
||||
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("i", "<A-j>", "<Esc>:m .+1<cr>==gi", { desc = "Move down" })
|
||||
map("n", "<A-k>", ":m .-2<cr>==", { desc = "Move up" })
|
||||
map("v", "<A-k>", ":m '<-2<cr>gv=gv", { desc = "Move up" })
|
||||
map("i", "<A-k>", "<Esc>:m .-2<cr>==gi", { desc = "Move up" })
|
||||
|
||||
-- buffers
|
||||
if Util.has("nvim-bufferline.lua") then
|
||||
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" })
|
||||
@ -91,8 +93,8 @@ map("n", "<leader>l", "<cmd>:Lazy<cr>", { desc = "Lazy" })
|
||||
-- new file
|
||||
map("n", "<leader>fn", "<cmd>enew<cr>", { desc = "New File" })
|
||||
|
||||
map("n", "<leader>xl", "<cmd>lopen<cr>", { desc = "Open Location List" })
|
||||
map("n", "<leader>xq", "<cmd>copen<cr>", { desc = "Open Quickfix List" })
|
||||
map("n", "<leader>xl", "<cmd>lopen<cr>", { desc = "Location List" })
|
||||
map("n", "<leader>xq", "<cmd>copen<cr>", { desc = "Quickfix List" })
|
||||
|
||||
-- stylua: ignore start
|
||||
|
||||
|
@ -5,24 +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.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
|
||||
@ -31,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
|
||||
@ -44,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
|
||||
|
@ -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")
|
@ -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",
|
||||
@ -171,8 +173,50 @@ return {
|
||||
}
|
||||
end,
|
||||
config = function(_, opts)
|
||||
local ai = require("mini.ai")
|
||||
ai.setup(opts)
|
||||
require("mini.ai").setup(opts)
|
||||
-- register all text objects with which-key
|
||||
if require("lazyvim.util").has("which-key.nvim") then
|
||||
---@type table<string, string|table>
|
||||
local i = {
|
||||
[" "] = "Whitespace",
|
||||
['"'] = 'Balanced "',
|
||||
["'"] = "Balanced '",
|
||||
["`"] = "Balanced `",
|
||||
["("] = "Balanced (",
|
||||
[")"] = "Balanced ) including white-space",
|
||||
[">"] = "Balanced > including white-space",
|
||||
["<lt>"] = "Balanced <",
|
||||
["]"] = "Balanced ] including white-space",
|
||||
["["] = "Balanced [",
|
||||
["}"] = "Balanced } including white-space",
|
||||
["{"] = "Balanced {",
|
||||
["?"] = "User Prompt",
|
||||
_ = "Underscore",
|
||||
a = "Argument",
|
||||
b = "Balanced ), ], }",
|
||||
c = "Class",
|
||||
f = "Function",
|
||||
o = "Block, conditional, loop",
|
||||
q = "Quote `, \", '",
|
||||
t = "Tag",
|
||||
}
|
||||
local a = vim.deepcopy(i)
|
||||
for k, v in pairs(a) do
|
||||
a[k] = v:gsub(" including.*", "")
|
||||
end
|
||||
|
||||
local ic = vim.deepcopy(i)
|
||||
local ac = vim.deepcopy(a)
|
||||
for key, name in pairs({ n = "Next", l = "Last" }) do
|
||||
i[key] = vim.tbl_extend("force", { name = "Inside " .. name .. " textobject" }, ic)
|
||||
a[key] = vim.tbl_extend("force", { name = "Around " .. name .. " textobject" }, ac)
|
||||
end
|
||||
require("which-key").register({
|
||||
mode = { "o", "x" },
|
||||
i = i,
|
||||
a = a,
|
||||
})
|
||||
end
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
@ -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 = "*" },
|
||||
|
@ -14,7 +14,13 @@ 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 },
|
||||
},
|
||||
@ -32,8 +38,14 @@ return {
|
||||
end,
|
||||
opts = {
|
||||
filesystem = {
|
||||
bind_to_cwd = false,
|
||||
follow_current_file = true,
|
||||
},
|
||||
window = {
|
||||
mappings = {
|
||||
["<space>"] = "none",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@ -121,6 +133,23 @@ return {
|
||||
["<C-Up>"] = function(...)
|
||||
return require("telescope.actions").cycle_history_prev(...)
|
||||
end,
|
||||
["<C-j>"] = function(...)
|
||||
return require("telescope.actions").move_selection_next(...)
|
||||
end,
|
||||
["<C-k>"] = function(...)
|
||||
return require("telescope.actions").move_selection_previous(...)
|
||||
end,
|
||||
["<C-n>"] = function(...)
|
||||
return require("telescope.actions").preview_scrolling_down(...)
|
||||
end,
|
||||
["<C-p>"] = function(...)
|
||||
return require("telescope.actions").preview_scrolling_up(...)
|
||||
end,
|
||||
},
|
||||
n = {
|
||||
["q"] = function(...)
|
||||
return require("telescope.actions").close(...)
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -138,6 +167,8 @@ return {
|
||||
leap.opts[k] = v
|
||||
end
|
||||
leap.add_default_mappings(true)
|
||||
vim.keymap.del({ "x", "o" }, "x")
|
||||
vim.keymap.del({ "x", "o" }, "X")
|
||||
end,
|
||||
},
|
||||
|
||||
@ -176,7 +207,7 @@ return {
|
||||
-- git signs
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
event = "BufReadPre",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
opts = {
|
||||
signs = {
|
||||
add = { text = "▎" },
|
||||
@ -213,10 +244,17 @@ return {
|
||||
-- references
|
||||
{
|
||||
"RRethy/vim-illuminate",
|
||||
event = "BufReadPost",
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
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 = {
|
||||
@ -243,6 +281,8 @@ return {
|
||||
keys = {
|
||||
{ "<leader>xx", "<cmd>TroubleToggle document_diagnostics<cr>", desc = "Document Diagnostics (Trouble)" },
|
||||
{ "<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)" },
|
||||
},
|
||||
},
|
||||
|
||||
@ -250,7 +290,7 @@ return {
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
cmd = { "TodoTrouble", "TodoTelescope" },
|
||||
event = "BufReadPost",
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
config = true,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
|
@ -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 })
|
||||
|
@ -1,3 +0,0 @@
|
||||
require("lazyvim.config").init()
|
||||
|
||||
return {}
|
@ -5,7 +5,12 @@ local M = {}
|
||||
M.autoformat = true
|
||||
|
||||
function M.toggle()
|
||||
M.autoformat = not M.autoformat
|
||||
if vim.b.autoformat == false then
|
||||
vim.b.autoformat = nil
|
||||
M.autoformat = true
|
||||
else
|
||||
M.autoformat = not M.autoformat
|
||||
end
|
||||
if M.autoformat then
|
||||
Util.info("Enabled format on save", { title = "Format" })
|
||||
else
|
||||
@ -15,6 +20,9 @@ end
|
||||
|
||||
function M.format()
|
||||
local buf = vim.api.nvim_get_current_buf()
|
||||
if vim.b.autoformat == false then
|
||||
return
|
||||
end
|
||||
local ft = vim.bo[buf].filetype
|
||||
local have_nls = #require("null-ls.sources").get_available(ft, "NULL_LS_FORMATTING") > 0
|
||||
|
||||
|
@ -2,7 +2,7 @@ return {
|
||||
-- lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
event = "BufReadPre",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = {
|
||||
{ "folke/neoconf.nvim", cmd = "Neoconf", config = true },
|
||||
{ "folke/neodev.nvim", opts = { experimental = { pathStrict = true } } },
|
||||
@ -11,7 +11,7 @@ return {
|
||||
{
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
cond = function()
|
||||
require("lazyvim.util").has("cmp")
|
||||
return require("lazyvim.util").has("nvim-cmp")
|
||||
end,
|
||||
},
|
||||
},
|
||||
@ -66,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
|
||||
@ -92,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
|
||||
@ -130,7 +125,7 @@ return {
|
||||
-- formatters
|
||||
{
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
event = "BufReadPre",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = { "mason.nvim" },
|
||||
opts = function()
|
||||
local nls = require("null-ls")
|
||||
@ -160,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
|
||||
|
@ -6,30 +6,45 @@ M._keys = nil
|
||||
---@return (LazyKeys|{has?:string})[]
|
||||
function M.get()
|
||||
local format = require("lazyvim.plugins.lsp.format").format
|
||||
if not M._keys then
|
||||
---@class PluginLspKeys
|
||||
-- stylua: ignore
|
||||
M._keys = M._keys or {
|
||||
{ "<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" },
|
||||
{ "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" },
|
||||
{ "gt", "<cmd>Telescope lsp_type_definitions<cr>", desc = "Goto Type Definition" },
|
||||
{ "K", vim.lsp.buf.hover, desc = "Hover" },
|
||||
{ "gK", vim.lsp.buf.signature_help, desc = "Signature Help", has = "signatureHelp" },
|
||||
{ "<c-k>", vim.lsp.buf.signature_help, mode = "i", desc = "Signature Help", has = "signatureHelp" },
|
||||
{ "]d", M.diagnostic_goto(true), desc = "Next Diagnostic" },
|
||||
{ "[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, "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>cr", M.rename, expr = true, desc = "Rename", has = "rename" },
|
||||
}
|
||||
-- stylua: ignore
|
||||
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" },
|
||||
{ "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" },
|
||||
{ "gt", "<cmd>Telescope lsp_type_definitions<cr>", desc = "Goto Type Definition" },
|
||||
{ "K", vim.lsp.buf.hover, desc = "Hover" },
|
||||
{ "gK", vim.lsp.buf.signature_help, desc = "Signature Help", has = "signatureHelp" },
|
||||
{ "<c-k>", vim.lsp.buf.signature_help, mode = "i", desc = "Signature Help", has = "signatureHelp" },
|
||||
{ "]d", M.diagnostic_goto(true), desc = "Next Diagnostic" },
|
||||
{ "[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, "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" },
|
||||
}
|
||||
if require("lazyvim.util").has("inc-rename.nvim") then
|
||||
M._keys[#M._keys + 1] = {
|
||||
"<leader>cr",
|
||||
function()
|
||||
require("inc_rename")
|
||||
return ":IncRename " .. vim.fn.expand("<cword>")
|
||||
end,
|
||||
expr = true,
|
||||
desc = "Rename",
|
||||
has = "rename",
|
||||
}
|
||||
else
|
||||
M._keys[#M._keys + 1] = { "<leader>cr", vim.lsp.buf.rename, desc = "Rename", has = "rename" }
|
||||
end
|
||||
end
|
||||
return M._keys
|
||||
end
|
||||
|
||||
@ -58,14 +73,6 @@ function M.on_attach(client, buffer)
|
||||
end
|
||||
end
|
||||
|
||||
function M.rename()
|
||||
if pcall(require, "inc_rename") then
|
||||
return ":IncRename " .. vim.fn.expand("<cword>")
|
||||
else
|
||||
vim.lsp.buf.rename()
|
||||
end
|
||||
end
|
||||
|
||||
function M.diagnostic_goto(next, severity)
|
||||
local go = next and vim.diagnostic.goto_next or vim.diagnostic.goto_prev
|
||||
severity = severity and vim.diagnostic.severity[severity] or nil
|
||||
|
@ -3,7 +3,7 @@ return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
version = false, -- last release is way too old and doesn't work on Windows
|
||||
build = ":TSUpdate",
|
||||
event = "BufReadPost",
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
keys = {
|
||||
{ "<c-space>", desc = "Increment selection" },
|
||||
{ "<bs>", desc = "Schrink selection", mode = "x" },
|
||||
@ -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,
|
||||
},
|
||||
|
@ -42,8 +42,12 @@ return {
|
||||
|
||||
-- bufferline
|
||||
{
|
||||
"akinsho/nvim-bufferline.lua",
|
||||
"akinsho/bufferline.nvim",
|
||||
event = "VeryLazy",
|
||||
keys = {
|
||||
{ "<leader>bp", "<Cmd>BufferLineTogglePin<CR>", desc = "Toggle pin" },
|
||||
{ "<leader>bP", "<Cmd>BufferLineGroupClose ungrouped<CR>", desc = "Delete non-pinned buffers" },
|
||||
},
|
||||
opts = {
|
||||
options = {
|
||||
diagnostics = "nvim_lsp",
|
||||
@ -71,10 +75,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 +145,7 @@ return {
|
||||
end,
|
||||
},
|
||||
},
|
||||
extensions = { "nvim-tree" },
|
||||
extensions = { "neo-tree" },
|
||||
}
|
||||
end,
|
||||
},
|
||||
@ -153,7 +153,7 @@ return {
|
||||
-- indent guides for Neovim
|
||||
{
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
event = "BufReadPost",
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
opts = {
|
||||
-- char = "▏",
|
||||
char = "│",
|
||||
@ -167,7 +167,7 @@ return {
|
||||
{
|
||||
"echasnovski/mini.indentscope",
|
||||
version = false, -- wait till new 0.7.0 release to put it back on semver
|
||||
event = "BufReadPre",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
opts = {
|
||||
-- symbol = "▏",
|
||||
symbol = "│",
|
||||
@ -188,9 +188,6 @@ return {
|
||||
{
|
||||
"folke/noice.nvim",
|
||||
event = "VeryLazy",
|
||||
deactivate = function()
|
||||
require("noice").disable()
|
||||
end,
|
||||
opts = {
|
||||
lsp = {
|
||||
override = {
|
||||
@ -210,8 +207,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"}},
|
||||
},
|
||||
},
|
||||
|
||||
@ -252,8 +249,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()
|
||||
@ -291,7 +286,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
|
||||
|
@ -129,13 +129,51 @@ import TabItem from '@theme/TabItem';
|
||||
return { content = table.concat(lines, "\n") }
|
||||
end
|
||||
|
||||
function M.recipes()
|
||||
local src = Util.read_file(vim.fs.normalize("~/projects/lazyvim.github.io/lua/recipes.lua"))
|
||||
local lines = vim.split(src, "\n")
|
||||
local ret = {}
|
||||
local header = {} ---@type string[]
|
||||
local block = {} ---@type string[]
|
||||
for _, line in ipairs(lines) do
|
||||
local comment = line:match("^ %-%- ?(.*)")
|
||||
if comment then
|
||||
header[#header + 1] = comment
|
||||
elseif line:find("^ {") then
|
||||
block = { "{" }
|
||||
elseif line:find("^ }") then
|
||||
block[#block + 1] = " }"
|
||||
vim.list_extend(ret, header)
|
||||
ret[#ret + 1] = "\n```lua"
|
||||
local code = Docs.fix_indent(table.concat(block, "\n"))
|
||||
ret[#ret + 1] = code
|
||||
ret[#ret + 1] = "```\n"
|
||||
header = {}
|
||||
block = {}
|
||||
else
|
||||
block[#block + 1] = line
|
||||
end
|
||||
end
|
||||
return { content = table.concat(ret, "\n") }
|
||||
end
|
||||
|
||||
function M.update2()
|
||||
local docs = vim.fs.normalize("~/projects/lazyvim.github.io/docs")
|
||||
|
||||
local config = Docs.extract("lua/lazyvim/config/init.lua", "\nlocal defaults = ({.-\n})")
|
||||
|
||||
Docs.save({
|
||||
config = config,
|
||||
}, docs .. "/configuration/index.md")
|
||||
|
||||
Docs.save({
|
||||
general = M.general(),
|
||||
}, docs .. "/configuration/general.md")
|
||||
|
||||
Docs.save({
|
||||
recipes = M.recipes(),
|
||||
}, docs .. "/configuration/recipes.md")
|
||||
|
||||
Docs.save({
|
||||
lazy = {
|
||||
content = [[```lua title="lua/config/lazy.lua"]] .. "\n" .. Util.read_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}
|
||||
|
Reference in New Issue
Block a user