mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
Merge branch 'main' into dev
This commit is contained in:
commit
40aeb255b8
58 changed files with 1221 additions and 579 deletions
2
.github/.release-please-manifest.json
vendored
2
.github/.release-please-manifest.json
vendored
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
".": "15.8.1"
|
||||
".": "15.10.1"
|
||||
}
|
||||
|
|
|
|||
83
CHANGELOG.md
83
CHANGELOG.md
|
|
@ -1,5 +1,88 @@
|
|||
# Changelog
|
||||
|
||||
## [15.10.1](https://github.com/LazyVim/LazyVim/compare/v15.10.0...v15.10.1) (2025-10-20)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **avante:** correct key mapping declarations ([#6656](https://github.com/LazyVim/LazyVim/issues/6656)) ([41d1b8d](https://github.com/LazyVim/LazyVim/commit/41d1b8dc72d4270c49db3365edba670d9fa01fbd))
|
||||
* **blink:** added work-around back for unsupported native snippets ([899533a](https://github.com/LazyVim/LazyVim/commit/899533a101e4bacf35dadf091977b4d12875dbf6))
|
||||
* **treesitter:** added buf to treesitter start just to be sure ([3ffb471](https://github.com/LazyVim/LazyVim/commit/3ffb471c187a66562b19bdf68382be9f82ac670d))
|
||||
|
||||
## [15.10.0](https://github.com/LazyVim/LazyVim/compare/v15.9.0...v15.10.0) (2025-10-20)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **ai:** add avante.nvim for a better AI experience ([#4440](https://github.com/LazyVim/LazyVim/issues/4440)) ([2682ce0](https://github.com/LazyVim/LazyVim/commit/2682ce0ab95c0a88867855ada41948107db8232e))
|
||||
* **extra:** allow users to add custom bundles through opts.init_options.bundles to jdtls ([#6265](https://github.com/LazyVim/LazyVim/issues/6265)) ([faeb24b](https://github.com/LazyVim/LazyVim/commit/faeb24ba956f103c5551bde11506991d8b594bc5))
|
||||
* **extras:** add Dart language ([#4749](https://github.com/LazyVim/LazyVim/issues/4749)) ([90f84e7](https://github.com/LazyVim/LazyVim/commit/90f84e7e755f72bb99dc8a9dedbfef05e58eb09d))
|
||||
* **extras:** added ember lang support ([#6203](https://github.com/LazyVim/LazyVim/issues/6203)) ([ac4cce0](https://github.com/LazyVim/LazyVim/commit/ac4cce0f2f436b3e2dd93ad9179178436ab8c600))
|
||||
* **extras:** added twig language ([#5464](https://github.com/LazyVim/LazyVim/issues/5464)) ([a6eb51e](https://github.com/LazyVim/LazyVim/commit/a6eb51e5b5897749bed8721ce98cd2491b2ea8e2))
|
||||
* **extras:** ai: add `claudecode.nvim` ([#6229](https://github.com/LazyVim/LazyVim/issues/6229)) ([e7a3e80](https://github.com/LazyVim/LazyVim/commit/e7a3e80ee1327ac012c7bb7257bb2d49f9f2fd89))
|
||||
* **extras:** automatically update lazyvim.json for renamed or deprecated extras ([37ecd06](https://github.com/LazyVim/LazyVim/commit/37ecd06fad65d5c188ad2d2e55d47a8fd1594d16))
|
||||
* **extras:** renamed extra omnisharp -> dotnet + added fautocomplete to lspconfig ([1b2e6e8](https://github.com/LazyVim/LazyVim/commit/1b2e6e8986b3cfee19635920129fc08df4f32b38))
|
||||
* **extras:** utils: add `gh.nvim` ([#6250](https://github.com/LazyVim/LazyVim/issues/6250)) ([8db9c75](https://github.com/LazyVim/LazyVim/commit/8db9c75e8d3a8609926dcb868d2e462e0f0b1d3d))
|
||||
* **go:** add linting with golangci-lint ([#6311](https://github.com/LazyVim/LazyVim/issues/6311)) ([248876a](https://github.com/LazyVim/LazyVim/commit/248876adb6b1f54031be350e45bbf0c7835d486f))
|
||||
* **haskell:** update `haskell-tools` version and add formatters + linters ([#6230](https://github.com/LazyVim/LazyVim/issues/6230)) ([82382f4](https://github.com/LazyVim/LazyVim/commit/82382f455ad37bc4fa928fe4a6fb9379a924fa3a))
|
||||
* **lang/fsharp:** add F# support to omnisharp extra ([#6538](https://github.com/LazyVim/LazyVim/issues/6538)) ([80a980a](https://github.com/LazyVim/LazyVim/commit/80a980ab00a871777c37ec3f0db9c394509b2465))
|
||||
* **lang:** add neotest config for PHP tests ([#5958](https://github.com/LazyVim/LazyVim/issues/5958)) ([9b077c7](https://github.com/LazyVim/LazyVim/commit/9b077c7a8ec96050f3a3b73219c8b904d3d83ab0))
|
||||
* **lang:** add solidity language support ([#4742](https://github.com/LazyVim/LazyVim/issues/4742)) ([2cd46d4](https://github.com/LazyVim/LazyVim/commit/2cd46d42ba357a42b11c5e4f5e16641bde0516d6))
|
||||
* **lang:** add Typst language support ([#4042](https://github.com/LazyVim/LazyVim/issues/4042)) ([645846b](https://github.com/LazyVim/LazyVim/commit/645846be5c7d798c7e87e61d00e8cae4fd3741c7))
|
||||
* **lang:** julia support ([#6231](https://github.com/LazyVim/LazyVim/issues/6231)) ([5d186c0](https://github.com/LazyVim/LazyVim/commit/5d186c009a85efbdad2b92115d4268c7c4a7aa18))
|
||||
* **lang:** nix add `statix` linter ([#6244](https://github.com/LazyVim/LazyVim/issues/6244)) ([2a866f6](https://github.com/LazyVim/LazyVim/commit/2a866f6c8c974c88cb9c723560cbec4308d304a2))
|
||||
* **sidekick:** added sidekick cli status to lualine ([16917db](https://github.com/LazyVim/LazyVim/commit/16917db94a056fe01b3bac604bc89da4077bd9cd))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **extras.lang:** fix Scala extra by using nvimMetals only ([#5726](https://github.com/LazyVim/LazyVim/issues/5726)) ([f118dca](https://github.com/LazyVim/LazyVim/commit/f118dca334d40cf8e78e0f0d5aa3108b972e8d84))
|
||||
* **fzf-lua:** added some missing keymaps similar to snacks picker. Closes [#6036](https://github.com/LazyVim/LazyVim/issues/6036). Closes [#5830](https://github.com/LazyVim/LazyVim/issues/5830) ([69a5744](https://github.com/LazyVim/LazyVim/commit/69a57448032253ca086d999c0d53d6e33ad4e505))
|
||||
* **helm:** broken helm highlighting ([#5335](https://github.com/LazyVim/LazyVim/issues/5335)) ([4d0d87f](https://github.com/LazyVim/LazyVim/commit/4d0d87f6268969987e5c58f59e086c886e77e1ae))
|
||||
* **keymap:** remove select mode remaps of printable characters ([#6296](https://github.com/LazyVim/LazyVim/issues/6296)) ([83468be](https://github.com/LazyVim/LazyVim/commit/83468be35062d06896c233d90d2f1c1cd24d84f3))
|
||||
* **tailwind:** additional settings ([#5266](https://github.com/LazyVim/LazyVim/issues/5266)) ([d2f9885](https://github.com/LazyVim/LazyVim/commit/d2f9885d6b8244818066cc16a5c72cb656748f6c))
|
||||
* **telescope:** sync keymaps with snacks picker + added some that were missing ([1a08e9f](https://github.com/LazyVim/LazyVim/commit/1a08e9f50f8c11a329c3017c4bfdd4b96b7ec541))
|
||||
* **twig:** correct mason url ([9d345de](https://github.com/LazyVim/LazyVim/commit/9d345dec446f577f75d36a147164ae258ffc2d8c))
|
||||
* **typescript:** better default pwa-node DAP config. Closes [#6386](https://github.com/LazyVim/LazyVim/issues/6386) ([e4d3432](https://github.com/LazyVim/LazyVim/commit/e4d34328f244fc0c7f91587258e767bfb55d0648))
|
||||
* **typescript:** support chrome, node and msedge dap adapters ([#6649](https://github.com/LazyVim/LazyVim/issues/6649)) ([0b65d33](https://github.com/LazyVim/LazyVim/commit/0b65d33d8545d179207c8827025f40764de61d06))
|
||||
* **util.project:** different mapping on dashboard than `snacks.projects` ([#5737](https://github.com/LazyVim/LazyVim/issues/5737)) ([e389447](https://github.com/LazyVim/LazyVim/commit/e38944799e7fc45baea0483f5c955472f3ffde27))
|
||||
|
||||
|
||||
### Reverts
|
||||
|
||||
* "feat(extra): allow users to add custom bundles through opts.init_options.bundles to jdtls ([#6265](https://github.com/LazyVim/LazyVim/issues/6265))" ([#6650](https://github.com/LazyVim/LazyVim/issues/6650)) ([a582f00](https://github.com/LazyVim/LazyVim/commit/a582f004473a3bade99c19c62fea649fb0b1c20f))
|
||||
|
||||
## [15.9.0](https://github.com/LazyVim/LazyVim/compare/v15.8.1...v15.9.0) (2025-10-19)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **docker:** associate 'Containerfile' with 'dockerfile' filetype ([#5974](https://github.com/LazyVim/LazyVim/issues/5974)) ([97af4a2](https://github.com/LazyVim/LazyVim/commit/97af4a23bccac85eb02e489f573db68863d6ed33))
|
||||
* **extras.rest:** add keymap for changing environment ([#5678](https://github.com/LazyVim/LazyVim/issues/5678)) ([1da659d](https://github.com/LazyVim/LazyVim/commit/1da659db4a3fbcd6d171f3b38d0092ced0887e61))
|
||||
* **java:** enable `blink.cmp` capabilities to show signature documentation ([#5218](https://github.com/LazyVim/LazyVim/issues/5218)) ([9618e32](https://github.com/LazyVim/LazyVim/commit/9618e327edfb79d9cbb037a2039c4315a95df63f))
|
||||
* **lang/omnisharp:** switch neotest adapter to vstest ([#6540](https://github.com/LazyVim/LazyVim/issues/6540)) ([4086d44](https://github.com/LazyVim/LazyVim/commit/4086d44a0b5c576630c603c7b71c6be5198d9eaf))
|
||||
* **neotest:** extra keymap to attach to a test ([#6198](https://github.com/LazyVim/LazyVim/issues/6198)) ([66e927f](https://github.com/LazyVim/LazyVim/commit/66e927fd9d0b0ff2886b9fe1465d9396461a2665))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **blink:** remove snippet expand override (no longer needed). Closes [#6044](https://github.com/LazyVim/LazyVim/issues/6044) ([336e2c3](https://github.com/LazyVim/LazyVim/commit/336e2c3ea67636c4eea3cf8f7538feb86b5a0610))
|
||||
* **chezmoi:** add `hidden=false` to fzf picker ([#6095](https://github.com/LazyVim/LazyVim/issues/6095)) ([1aa1b59](https://github.com/LazyVim/LazyVim/commit/1aa1b59a7ec7cab61fa7b096db53df15ec5008e7))
|
||||
* **copilot-chat:** use up to date config for chat headers ([#6543](https://github.com/LazyVim/LazyVim/issues/6543)) ([2c5eef7](https://github.com/LazyVim/LazyVim/commit/2c5eef7df7520fbc6fe0d90150cd26ac9e4f325b))
|
||||
* **extras/rust:** fix config key for files.exclude ([#5664](https://github.com/LazyVim/LazyVim/issues/5664)) ([762a34d](https://github.com/LazyVim/LazyVim/commit/762a34d5ad95447b241287e8d540b657a699d141))
|
||||
* **extras:** adjust switch source/header shortcut ([#6567](https://github.com/LazyVim/LazyVim/issues/6567)) ([b36b858](https://github.com/LazyVim/LazyVim/commit/b36b8589b62f55b181367afe954606c73233c0a1))
|
||||
* **extras:** remove procMacro ignored ([#6117](https://github.com/LazyVim/LazyVim/issues/6117)) ([4a3702e](https://github.com/LazyVim/LazyVim/commit/4a3702e050881fea262ccae980ae1ff9e849d275))
|
||||
* **lang.omnisharp:** update CSharpier command and arguments for Mason compatibility ([#6156](https://github.com/LazyVim/LazyVim/issues/6156)) ([dfebe70](https://github.com/LazyVim/LazyVim/commit/dfebe70b8d09514dd3ee85e12463f266f93c5dd7))
|
||||
* **lang.rust:** rust-analyzer hanging on root scanned ([#6178](https://github.com/LazyVim/LazyVim/issues/6178)) ([7bf8c22](https://github.com/LazyVim/LazyVim/commit/7bf8c22c56283fa6d5d35246dcd0f49d37a5c709))
|
||||
* **latex:** ensure tex extra installs latex tree-sitter parser ([#6357](https://github.com/LazyVim/LazyVim/issues/6357)) ([ae74622](https://github.com/LazyVim/LazyVim/commit/ae74622e6666ea4c3e6c58c4ef2d3f313d8e8f20))
|
||||
* **mini.animate:** schedule the toggle mapping to correctly take effect ([#6483](https://github.com/LazyVim/LazyVim/issues/6483)) ([bd23357](https://github.com/LazyVim/LazyVim/commit/bd233579a66018f526b6b0970e33afde4cde399e))
|
||||
* **sql:** fix autocomplete when `omni` is used as a `blink.cmp` source ([#5652](https://github.com/LazyVim/LazyVim/issues/5652)) ([f6f72b9](https://github.com/LazyVim/LazyVim/commit/f6f72b90d41d9347b93a07d0b680195541f64c55))
|
||||
* **treesitter:** attach textobject keymaps to existing buffers on load. Closes [#6642](https://github.com/LazyVim/LazyVim/issues/6642). Closes [#6639](https://github.com/LazyVim/LazyVim/issues/6639) ([92a7728](https://github.com/LazyVim/LazyVim/commit/92a77287321236f52ff38648a38cf314ab223137))
|
||||
* **typescript:** make_position_params with offset encoding. ([#6277](https://github.com/LazyVim/LazyVim/issues/6277)) ([22152e9](https://github.com/LazyVim/LazyVim/commit/22152e958f3f7c2b732cb6429ccc90541e0ad17f))
|
||||
* **ui:** ignore sidekick_terminal in mini-indentscope ([#6619](https://github.com/LazyVim/LazyVim/issues/6619)) ([f0b32b5](https://github.com/LazyVim/LazyVim/commit/f0b32b5955889d4d2d3636a52d2ddf5d113646df))
|
||||
* **util:** add some kulala keymaps back to global ([#5960](https://github.com/LazyVim/LazyVim/issues/5960)) ([a16739e](https://github.com/LazyVim/LazyVim/commit/a16739e3328c2687d96f868839c575765c49baad))
|
||||
* **vscode:** don't sync undo/redo with vscode ([#5957](https://github.com/LazyVim/LazyVim/issues/5957)) ([706ec44](https://github.com/LazyVim/LazyVim/commit/706ec4443a33ec474f2329b5b806e9cdb85cce43))
|
||||
|
||||
## [15.8.1](https://github.com/LazyVim/LazyVim/compare/v15.8.0...v15.8.1) (2025-10-18)
|
||||
|
||||
|
||||
|
|
|
|||
151
README-FR.md
Normal file
151
README-FR.md
Normal file
|
|
@ -0,0 +1,151 @@
|
|||
<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 est une configuration Neovim basée sur [💤 lazy.nvim](https://github.com/folke/lazy.nvim)
|
||||
facilitant la personnalisation et l'ajout d'extensions.
|
||||
Plutôt que d'imposer le choix entre partir de rien et utiliser
|
||||
une distribution toute faite, LazyVim offre le meilleur des deux mondes
|
||||
: la flexibilité d'une config ajustable selon vos besoins, et le confort
|
||||
d'une configuration pensée et peaufinée à l'avance.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## ✨ Fonctionnalités
|
||||
|
||||
- 🔥 Transforme Neovim en un environnement de développement complet
|
||||
- 💤 Customise et étends ta config sans effort grâce à [lazy.nvim](https://github.com/folke/lazy.nvim)
|
||||
- 🚀 Rapide comme l'éclair !
|
||||
- 🧹 Configuration par défaut propre et intuitive pour les options, les autocmds, et les keymaps
|
||||
- 📦 Livré avec une variété de plugins pre-configurés et prêts à être utilisés
|
||||
|
||||
## ⚡️ Pré-requis
|
||||
|
||||
- Neovim >= **0.9.0** (doit être compilé avec **LuaJIT**)
|
||||
- Git >= **2.19.0** (pour supporter le clonage partiel)
|
||||
- Un [Nerd Font](https://www.nerdfonts.com/) **_(optionel)_**
|
||||
- Un compileur **C** pour `nvim-treesitter`. Voir [ici](https://github.com/nvim-treesitter/nvim-treesitter#requirements)
|
||||
|
||||
## 🚀 Comment commencer
|
||||
|
||||
Un template pour **LazyVim** peut être trouvé [ici](https://github.com/LazyVim/starter)
|
||||
|
||||
<details><summary>Essayer avec Docker</summary>
|
||||
|
||||
```sh
|
||||
docker run -w /root -it --rm alpine:edge sh -uelic '
|
||||
apk add git lazygit fzf curl neovim ripgrep alpine-sdk --update
|
||||
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
||||
cd ~/.config/nvim
|
||||
nvim
|
||||
'
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>Installer le <a href="https://github.com/LazyVim/starter">LazyVim Starter</a></summary>
|
||||
|
||||
- Sauvegardez votre configuration Neovim :
|
||||
|
||||
```sh
|
||||
mv ~/.config/nvim ~/.config/nvim.bak
|
||||
mv ~/.local/share/nvim ~/.local/share/nvim.bak
|
||||
```
|
||||
|
||||
- Clonez le starter
|
||||
|
||||
```sh
|
||||
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
||||
```
|
||||
|
||||
- Supprimez le dossier `.git`, afin que vous puissiez l'ajouter à votre repo plus tard
|
||||
|
||||
```sh
|
||||
rm -rf ~/.config/nvim/.git
|
||||
```
|
||||
|
||||
- Lancez Neovim !
|
||||
|
||||
```sh
|
||||
nvim
|
||||
```
|
||||
|
||||
Consultez les commentaires dans les fichiers pour savoir comment personnaliser **LazyVim**.
|
||||
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
Il y a une superbe vidéo (en anglais) de [@elijahmanor](https://github.com/elijahmanor)
|
||||
qui vous guide pas-à-pas pour commencer.
|
||||
|
||||
[](https://www.youtube.com/watch?v=N93cTbtLCIM)
|
||||
|
||||
[@dusty-phillips](https://github.com/dusty-phillips) a écrit un livre exhaustif
|
||||
sur LazyVim, nommé [LazyVim for Ambitious Developers](https://lazyvim-ambitious-devs.phillips.codes)
|
||||
disponible gratuitement en ligne.
|
||||
|
||||
## 📂 Structure de fichier
|
||||
|
||||
Les fichiers dans le dossier config vont être chargés automatiquement en temps voulu,
|
||||
donc pas besoin de `require` ces fichiers manuellement.
|
||||
**LazyVim** vient avec un ensemble de fichiers de configuration par défaut qui seront chargés
|
||||
**_avant_** les vôtres. Voir [ici](https://github.com/LazyVim/LazyVim/tree/main/lua/lazyvim/config)
|
||||
|
||||
Vous pouvez ajouter vos configurations de plugins sous `lua/plugins/`.
|
||||
Ici, tous les fichiers seront automatiquement chargés par [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
|
||||
|
||||
Veuillez vous référer à la [documentation](https://lazyvim.github.io)
|
||||
147
README-PL.md
Normal file
147
README-PL.md
Normal file
|
|
@ -0,0 +1,147 @@
|
|||
<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 to konfiguracja Neovim oparta na [💤 lazy.nvim](https://github.com/folke/lazy.nvim)
|
||||
która ułatwia dostosowywanie i rozszerzanie konfiguracji.
|
||||
Zamiast wybierać między rozpoczynaniem od zera a używaniem gotowej dystrybucji, LazyVim oferuje najlepsze z obu światów – elastyczność pozwalającą na dostosowanie konfiguracji do własnych potrzeb oraz wygodę wstępnie skonfigurowanego środowiska.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## ✨ Funkcje
|
||||
|
||||
- 🔥 Przekształć Neovim w pełnoprawne IDE
|
||||
- 💤 Łatwo dostosowuj i rozszerzaj swoją konfigurację dzięki [lazy.nvim](https://github.com/folke/lazy.nvim)
|
||||
- 🚀 Niezwykle szybkie działanie
|
||||
- 🧹 Przemyślane domyślne ustawienia opcji, autocmd i skrótów klawiszowych
|
||||
- 📦 Zawiera bogaty zestaw wstępnie skonfigurowanych wtyczek gotowych do użycia
|
||||
|
||||
## ⚡️ Wymagania
|
||||
|
||||
- Neovim >= **0.9.0** (musi być skompilowany z **LuaJIT**)
|
||||
- Git >= **2.19.0** (dla obsługi częściowego klonowania repozytoriów)
|
||||
- [Nerd Font](https://www.nerdfonts.com/) **_(opcjonalnie)_**
|
||||
- Kompilator **C** wymagany dla `nvim-treesitter`. Szczegóły [tutaj](https://github.com/nvim-treesitter/nvim-treesitter#requirements)
|
||||
|
||||
## 🚀 Pierwsze kroki
|
||||
|
||||
Szablon startowy dla **LazyVim** znajdziesz [tutaj](https://github.com/LazyVim/starter)
|
||||
|
||||
<details><summary>Wypróbuj z Dockerem</summary>
|
||||
|
||||
```sh
|
||||
docker run -w /root -it --rm alpine:edge sh -uelic '
|
||||
apk add git lazygit fzf curl neovim ripgrep alpine-sdk --update
|
||||
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
||||
cd ~/.config/nvim
|
||||
nvim
|
||||
'
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>Zainstaluj <a href="https://github.com/LazyVim/starter">Starter LazyVim</a></summary>
|
||||
|
||||
- Wykonaj kopię zapasową swoich obecnych plików Neovim:
|
||||
|
||||
```sh
|
||||
mv ~/.config/nvim ~/.config/nvim.bak
|
||||
mv ~/.local/share/nvim ~/.local/share/nvim.bak
|
||||
```
|
||||
|
||||
- Sklonuj repozytorium startowe:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
||||
```
|
||||
|
||||
- Usuń folder `.git`, aby później móc dodać własne repozytorium:
|
||||
|
||||
```sh
|
||||
rm -rf ~/.config/nvim/.git
|
||||
```
|
||||
|
||||
- Uruchom Neovim!
|
||||
|
||||
```sh
|
||||
nvim
|
||||
```
|
||||
|
||||
W plikach znajdziesz komentarze, które pomogą Ci dostosować **LazyVim**.
|
||||
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
[@elijahmanor](https://github.com/elijahmanor) stworzył świetne wideo z przewodnikiem, jak zacząć.
|
||||
|
||||
[](https://www.youtube.com/watch?v=N93cTbtLCIM)
|
||||
|
||||
[@dusty-phillips](https://github.com/dusty-phillips) napisał obszerną książkę
|
||||
[LazyVim for Ambitious Developers](https://lazyvim-ambitious-devs.phillips.codes),
|
||||
która jest dostępna za darmo online.
|
||||
|
||||
## 📂 Struktura plików
|
||||
|
||||
Pliki w katalogu `config` są automatycznie ładowane w odpowiednim momencie,
|
||||
więc nie musisz ich ręcznie dołączać.
|
||||
**LazyVim** zawiera zestaw domyślnych plików konfiguracyjnych,
|
||||
które zostaną załadowane **_przed_** Twoimi własnymi. Szczegóły znajdziesz [tutaj](https://github.com/LazyVim/LazyVim/tree/main/lua/lazyvim/config).
|
||||
|
||||
Możesz dodać własne specyfikacje wtyczek w katalogu `lua/plugins/`.
|
||||
Wszystkie pliki w tym folderze zostaną automatycznie załadowane przez [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>
|
||||
|
||||
## ⚙️ Konfiguracja
|
||||
|
||||
Zapoznaj się z [dokumentacją](https://lazyvim.github.io).
|
||||
|
|
@ -111,10 +111,6 @@ docker run -w /root -it --rm alpine:edge sh -uelic '
|
|||
|
||||
---
|
||||
|
||||
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)
|
||||
|
||||
[@dusty-phillips](https://github.com/dusty-phillips) wrote a comprehensive book called
|
||||
[LazyVim for Ambitious Developers](https://lazyvim-ambitious-devs.phillips.codes)
|
||||
available for free online.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
*LazyVim.txt* For Neovim Last change: 2025 October 18
|
||||
*LazyVim.txt* For Neovim Last change: 2025 October 22
|
||||
|
||||
==============================================================================
|
||||
Table of Contents *LazyVim-table-of-contents*
|
||||
|
|
@ -97,11 +97,6 @@ Install the LazyVim Starter ~
|
|||
Refer to the comments in the files on how to customize **LazyVim**.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
There’s a great video created by @elijahmanor
|
||||
<https://github.com/elijahmanor> with a walkthrough to get started.
|
||||
|
||||
<https://www.youtube.com/watch?v=N93cTbtLCIM>
|
||||
|
||||
@dusty-phillips <https://github.com/dusty-phillips> wrote a comprehensive book
|
||||
called LazyVim for Ambitious Developers
|
||||
<https://lazyvim-ambitious-devs.phillips.codes> available for free online.
|
||||
|
|
@ -127,9 +122,7 @@ Refer to the docs <https://lazyvim.github.io>
|
|||
|
||||
1. *image*: https://user-images.githubusercontent.com/292349/211285846-0b7bb3bf-0462-4029-b64c-4ee1d037fc1c.png
|
||||
2. *image*: https://user-images.githubusercontent.com/292349/213447056-92290767-ea16-430c-8727-ce994c93e9cc.png
|
||||
3. *@elijahmanor*:
|
||||
4. *Watch the video*: https://img.youtube.com/vi/N93cTbtLCIM/hqdefault.jpg
|
||||
5. *@dusty-phillips*:
|
||||
3. *@dusty-phillips*:
|
||||
|
||||
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util")
|
|||
---@class LazyVimConfig: LazyVimOptions
|
||||
local M = {}
|
||||
|
||||
M.version = "15.8.1" -- x-release-please-version
|
||||
M.version = "15.10.1" -- x-release-please-version
|
||||
LazyVim.config = M
|
||||
|
||||
---@class LazyVimOptions
|
||||
|
|
|
|||
|
|
@ -80,8 +80,8 @@ map({ "i", "x", "n", "s" }, "<C-s>", "<cmd>w<cr><esc>", { desc = "Save File" })
|
|||
map("n", "<leader>K", "<cmd>norm! K<cr>", { desc = "Keywordprg" })
|
||||
|
||||
-- better indenting
|
||||
map("v", "<", "<gv")
|
||||
map("v", ">", ">gv")
|
||||
map("x", "<", "<gv")
|
||||
map("x", ">", ">gv")
|
||||
|
||||
-- commenting
|
||||
map("n", "gco", "o<esc>Vcx<esc><cmd>normal gcc<cr>fxa<bs>", { desc = "Add Comment Below" })
|
||||
|
|
@ -107,7 +107,7 @@ map("n", "[q", vim.cmd.cprev, { desc = "Previous Quickfix" })
|
|||
map("n", "]q", vim.cmd.cnext, { desc = "Next Quickfix" })
|
||||
|
||||
-- formatting
|
||||
map({ "n", "v" }, "<leader>cf", function()
|
||||
map({ "n", "x" }, "<leader>cf", function()
|
||||
LazyVim.format({ force = true })
|
||||
end, { desc = "Format" })
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ return {
|
|||
},
|
||||
})
|
||||
end,
|
||||
mode = { "n", "v" },
|
||||
mode = { "n", "x" },
|
||||
desc = "Search and Replace",
|
||||
},
|
||||
},
|
||||
|
|
@ -64,7 +64,7 @@ return {
|
|||
defaults = {},
|
||||
spec = {
|
||||
{
|
||||
mode = { "n", "v" },
|
||||
mode = { "n", "x" },
|
||||
{ "<leader><tab>", group = "tabs" },
|
||||
{ "<leader>c", group = "code" },
|
||||
{ "<leader>d", group = "debug" },
|
||||
|
|
@ -167,8 +167,8 @@ return {
|
|||
end, "Prev Hunk")
|
||||
map("n", "]H", function() gs.nav_hunk("last") end, "Last Hunk")
|
||||
map("n", "[H", function() gs.nav_hunk("first") end, "First Hunk")
|
||||
map({ "n", "v" }, "<leader>ghs", ":Gitsigns stage_hunk<CR>", "Stage Hunk")
|
||||
map({ "n", "v" }, "<leader>ghr", ":Gitsigns reset_hunk<CR>", "Reset Hunk")
|
||||
map({ "n", "x" }, "<leader>ghs", ":Gitsigns stage_hunk<CR>", "Stage Hunk")
|
||||
map({ "n", "x" }, "<leader>ghr", ":Gitsigns reset_hunk<CR>", "Reset Hunk")
|
||||
map("n", "<leader>ghS", gs.stage_buffer, "Stage Buffer")
|
||||
map("n", "<leader>ghu", gs.undo_stage_hunk, "Undo Stage Hunk")
|
||||
map("n", "<leader>ghR", gs.reset_buffer, "Reset Buffer")
|
||||
|
|
|
|||
|
|
@ -1,338 +0,0 @@
|
|||
local M = {}
|
||||
local function createPrompt(description, note, prompt)
|
||||
return {
|
||||
name = description,
|
||||
description = description,
|
||||
prompt = prompt,
|
||||
details = string.format(
|
||||
[[
|
||||
You are a %s expert. Your task is to %s.
|
||||
NOTE:
|
||||
%s
|
||||
RETURN ONLY THE CODE AND NECESSARY COMMENTS WHEN ASKED.]],
|
||||
description,
|
||||
prompt,
|
||||
note
|
||||
),
|
||||
}
|
||||
end
|
||||
function M.getPrompts()
|
||||
return {
|
||||
createPrompt(
|
||||
"前端工程师",
|
||||
[[- Ensure your solutions are responsive and compatible across different devices and browsers.
|
||||
- Focus on performance, accessibility, and user experience.]],
|
||||
"develop and optimize user interfaces using modern frontend technologies"
|
||||
),
|
||||
createPrompt(
|
||||
"threejs工程师",
|
||||
[[- Ensure your solutions are efficient and render smoothly on different devices.
|
||||
- Focus on realistic rendering, lighting, and interactive elements.]],
|
||||
"create and optimize 3D graphics using Three.js"
|
||||
),
|
||||
createPrompt(
|
||||
"Vim/Nvim 高手",
|
||||
[[- Provide detailed steps and explanations.
|
||||
- Focus on enhancing productivity and customization.]],
|
||||
"help users with advanced configurations, optimizations, and troubleshooting for Vim/Neovim"
|
||||
),
|
||||
createPrompt(
|
||||
"CSS 工程师",
|
||||
[[- Ensure your solutions are responsive and compatible across different devices and browsers.
|
||||
- Focus on performance, maintainability, and user experience.]],
|
||||
"develop and optimize stylesheets for web applications using modern CSS techniques"
|
||||
),
|
||||
createPrompt(
|
||||
"React 工程师",
|
||||
[[- Ensure your solutions are responsive and compatible across different devices and browsers.
|
||||
- Focus on performance, accessibility, and user experience.]],
|
||||
"develop and optimize user interfaces using React"
|
||||
),
|
||||
|
||||
createPrompt(
|
||||
"Vue 工程师",
|
||||
[[- Ensure your solutions are responsive and compatible across different devices and browsers.
|
||||
- Focus on performance, accessibility, and user experience.]],
|
||||
"develop and optimize user interfaces using Vue.js"
|
||||
),
|
||||
|
||||
createPrompt(
|
||||
"Vue3 工程师",
|
||||
[[- Ensure your solutions are responsive and compatible across different devices and browsers.
|
||||
- Focus on performance, accessibility, and user experience.]],
|
||||
"develop and optimize user interfaces using Vue 3"
|
||||
),
|
||||
|
||||
createPrompt(
|
||||
"Node.js 工程师",
|
||||
[[- Ensure your solutions are scalable, efficient, and secure.
|
||||
- Focus on performance, maintainability, and best practices.]],
|
||||
"develop and optimize server-side applications using Node.js"
|
||||
),
|
||||
|
||||
createPrompt(
|
||||
"Electron 工程师",
|
||||
[[- Ensure your solutions are efficient, maintainable, and follow best practices.
|
||||
- Focus on performance, security, and user experience.]],
|
||||
"develop and optimize desktop applications using Electron"
|
||||
),
|
||||
|
||||
createPrompt(
|
||||
"SASS/LESS 工程师",
|
||||
[[- Ensure your solutions are responsive, maintainable, and compatible across different devices and browsers.
|
||||
- Focus on performance, code reusability, and maintainability.]],
|
||||
"develop and optimize stylesheets using SASS and LESS"
|
||||
),
|
||||
createPrompt(
|
||||
"Uni-app 工程师",
|
||||
[[- Ensure your solutions are efficient, maintainable, and follow best practices.
|
||||
- Focus on performance, cross-platform compatibility, and user experience.]],
|
||||
"develop and optimize applications using Uni-app"
|
||||
),
|
||||
createPrompt(
|
||||
"Linux 工程师",
|
||||
[[- Provide detailed steps and explanations for any configurations or optimizations.
|
||||
- Ensure solutions are secure, efficient, and maintainable.
|
||||
- Focus on performance, security, and best practices.]],
|
||||
"manage, optimize, and troubleshoot Linux systems"
|
||||
),
|
||||
createPrompt(
|
||||
"TailwindCSS 工程师",
|
||||
[[- Ensure your solutions are responsive, maintainable, and compatible across different devices and browsers.
|
||||
- Focus on performance, code reusability, and maintainability.]],
|
||||
"develop and optimize stylesheets using TailwindCSS"
|
||||
),
|
||||
createPrompt(
|
||||
"Bootstrap 工程师",
|
||||
[[- Ensure your solutions are responsive, maintainable, and compatible across different devices and browsers.
|
||||
- Focus on performance, code reusability, and maintainability.]],
|
||||
"develop and optimize stylesheets and components using Bootstrap"
|
||||
),
|
||||
createPrompt(
|
||||
"jQuery 工程师",
|
||||
[[- Ensure your solutions are efficient, maintainable, and follow best practices.
|
||||
- Focus on performance, code reusability, and maintainability.]],
|
||||
"develop and optimize web applications using jQuery"
|
||||
),
|
||||
createPrompt(
|
||||
"TypeScript 工程师",
|
||||
[[- Ensure your solutions are efficient, maintainable, and follow best practices.
|
||||
- Focus on performance, type safety, and code readability.]],
|
||||
"develop and optimize applications using TypeScript"
|
||||
),
|
||||
createPrompt(
|
||||
"ECharts 工程师",
|
||||
[[- Ensure your solutions are efficient, maintainable, and follow best practices.
|
||||
- Focus on performance, interactivity, and visual appeal.]],
|
||||
"develop and optimize charts and visualizations using ECharts"
|
||||
),
|
||||
createPrompt(
|
||||
"Docker 工程师",
|
||||
[[- Ensure your solutions are efficient, maintainable, and follow best practices.
|
||||
- Focus on performance, scalability, and security.]],
|
||||
"develop and optimize containerized applications using Docker"
|
||||
),
|
||||
createPrompt(
|
||||
"Lua 工程师",
|
||||
[[- Ensure your solutions are efficient, maintainable, and follow best practices.
|
||||
- Focus on performance, readability, and code reusability.]],
|
||||
"develop and optimize applications using Lua"
|
||||
),
|
||||
createPrompt(
|
||||
"Regexp 工程师",
|
||||
[[- Ensure your solutions are efficient, maintainable, and follow best practices.
|
||||
- Focus on performance, readability, and code reusability.]],
|
||||
"develop and optimize regular expressions"
|
||||
),
|
||||
createPrompt(
|
||||
"Markdown 专家",
|
||||
[[- Ensure your solutions are efficient, maintainable, and follow best practices.
|
||||
- Focus on readability, structure, and formatting.]],
|
||||
"create and optimize documents using Markdown"
|
||||
),
|
||||
createPrompt(
|
||||
"SVG 工程师",
|
||||
[[- Ensure your solutions are efficient, maintainable, and follow best practices.
|
||||
- Focus on performance, visual appeal, and scalability.]],
|
||||
"create and optimize graphics using SVG"
|
||||
),
|
||||
createPrompt(
|
||||
"Git 专家",
|
||||
[[- Provide detailed steps and explanations for any configurations or optimizations.
|
||||
- Ensure solutions are efficient, maintainable, and follow best practices.
|
||||
- Focus on performance, collaboration, and best practices.]],
|
||||
"manage and optimize version control using Git"
|
||||
),
|
||||
createPrompt(
|
||||
"Shell 脚本专家",
|
||||
[[- Ensure your solutions are efficient, maintainable, and follow best practices.
|
||||
- Focus on performance, readability, and code reusability.]],
|
||||
"develop and optimize shell scripts"
|
||||
),
|
||||
createPrompt(
|
||||
"HTML 工程师",
|
||||
[[- Ensure your solutions are efficient, maintainable, and follow best practices.
|
||||
- Focus on performance, accessibility, and code reusability.]],
|
||||
"develop and optimize web pages using HTML"
|
||||
),
|
||||
createPrompt(
|
||||
"Canvas 工程师",
|
||||
[[- Ensure your solutions are efficient, maintainable, and follow best practices.
|
||||
- Focus on performance, visual appeal, and interactivity.]],
|
||||
"develop and optimize graphics using the HTML5 Canvas API"
|
||||
),
|
||||
createPrompt(
|
||||
"MySQL 工程师",
|
||||
[[- Ensure your solutions are efficient, maintainable, and follow best practices.
|
||||
- Focus on performance, query optimization, and data integrity.]],
|
||||
"develop and optimize database queries and structures using MySQL"
|
||||
),
|
||||
createPrompt(
|
||||
"C 工程师",
|
||||
[[- Ensure your solutions are efficient, maintainable, and follow best practices.
|
||||
- Focus on performance, memory management, and code readability.]],
|
||||
"develop and optimize software using C"
|
||||
),
|
||||
createPrompt(
|
||||
"Windows Batch Script 专家",
|
||||
[[- Ensure your solutions are efficient, maintainable, and follow best practices.
|
||||
- Focus on performance, readability, and code reusability.]],
|
||||
"develop and optimize batch scripts for Windows"
|
||||
),
|
||||
createPrompt(
|
||||
"PowerShell 脚本专家",
|
||||
[[- Ensure your solutions are efficient, maintainable, and follow best practices.
|
||||
- Focus on performance, readability, and code reusability.]],
|
||||
"develop and optimize scripts using PowerShell"
|
||||
),
|
||||
createPrompt(
|
||||
"CSS3 工程师",
|
||||
[[- Ensure your solutions are responsive and compatible across different devices and browsers.
|
||||
- Focus on performance, maintainability, and user experience.]],
|
||||
"develop and optimize stylesheets for web applications using CSS3"
|
||||
),
|
||||
createPrompt(
|
||||
"HTML5 工程师",
|
||||
[[- Ensure your solutions are efficient, maintainable, and follow best practices.
|
||||
- Focus on performance, accessibility, and code reusability.]],
|
||||
"develop and optimize web pages using HTML5"
|
||||
),
|
||||
createPrompt(
|
||||
"EJS 工程师",
|
||||
[[- Ensure your solutions are efficient, maintainable, and follow best practices.
|
||||
- Focus on performance, readability, and code reusability.]],
|
||||
"develop and optimize templates using EJS (Embedded JavaScript)"
|
||||
),
|
||||
createPrompt(
|
||||
"Prisma 工程师",
|
||||
[[- Ensure your solutions are efficient, maintainable, and follow best practices.
|
||||
- Focus on performance, scalability, and data integrity.]],
|
||||
"develop and optimize database schemas and queries using Prisma"
|
||||
),
|
||||
createPrompt(
|
||||
"NestJS 工程师",
|
||||
[[- Ensure your solutions are efficient, maintainable, and follow best practices.
|
||||
- Focus on performance, scalability, and code readability.]],
|
||||
"develop and optimize applications using NestJS"
|
||||
),
|
||||
createPrompt(
|
||||
"Layui 工程师",
|
||||
[[- Ensure your solutions are efficient, maintainable, and follow best practices.
|
||||
- Focus on performance, user experience, and code readability.]],
|
||||
"develop and optimize web applications using Layui"
|
||||
),
|
||||
createPrompt(
|
||||
"Egg.js 工程师",
|
||||
[[- Ensure your solutions are efficient, maintainable, and follow best practices.
|
||||
- Focus on performance, scalability, and code readability.]],
|
||||
"develop and optimize applications using Egg.js"
|
||||
),
|
||||
createPrompt(
|
||||
"WebGL 工程师",
|
||||
[[- Ensure your solutions are efficient, maintainable, and follow best practices.
|
||||
- Focus on performance, rendering quality, and code readability.]],
|
||||
"develop and optimize web graphics applications using WebGL"
|
||||
),
|
||||
}
|
||||
end
|
||||
return {
|
||||
{
|
||||
"yetone/avante.nvim",
|
||||
build = vim.fn.has("win32") ~= 0 and "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false"
|
||||
or "make",
|
||||
event = "VeryLazy",
|
||||
version = false, -- Never set this value to "*"! Never!
|
||||
---@module 'avante'
|
||||
---@type avante.Config
|
||||
opts = {
|
||||
instructions_file = "avante.md",
|
||||
provider = "openrouter",
|
||||
providers = {
|
||||
openrouter = {
|
||||
__inherited_from = "openai",
|
||||
endpoint = "https://openrouter.ai/api/v1",
|
||||
api_key_name = "OPENROUTER_API_KEY",
|
||||
model = "alibaba/tongyi-deepresearch-30b-a3b:free",
|
||||
},
|
||||
},
|
||||
shortcuts = M.getPrompts(),
|
||||
windows = {
|
||||
width = 40,
|
||||
sidebar_header = {
|
||||
enabled = true, -- true, false to enable/disable the header
|
||||
align = "center", -- left, center, right for title
|
||||
rounded = true,
|
||||
},
|
||||
edit = {
|
||||
border = "rounded",
|
||||
start_insert = false, -- Start insert mode when opening the edit window
|
||||
},
|
||||
ask = {
|
||||
floating = false, -- Open the 'AvanteAsk' prompt in a floating window
|
||||
start_insert = false, -- Start insert mode when opening the ask window
|
||||
border = "rounded",
|
||||
---@type "ours" | "theirs"
|
||||
focus_on_apply = "theirs", -- which diff to focus after applying
|
||||
},
|
||||
},
|
||||
},
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"MunifTanjim/nui.nvim",
|
||||
--- The below dependencies are optional,
|
||||
"nvim-mini/mini.pick", -- for file_selector provider mini.pick
|
||||
"nvim-telescope/telescope.nvim", -- for file_selector provider telescope
|
||||
"hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions
|
||||
"ibhagwan/fzf-lua", -- for file_selector provider fzf
|
||||
"stevearc/dressing.nvim", -- for input provider dressing
|
||||
"folke/snacks.nvim", -- for input provider snacks
|
||||
"nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
|
||||
"zbirenbaum/copilot.lua", -- for providers='copilot'
|
||||
{
|
||||
-- Make sure to set this up properly if you have lazy=true
|
||||
"MeanderingProgrammer/render-markdown.nvim",
|
||||
opts = {
|
||||
file_types = { "markdown", "Avante" },
|
||||
},
|
||||
ft = { "markdown", "Avante" },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"saghen/blink.cmp",
|
||||
optional = true,
|
||||
dependencies = { "Kaiser-Yang/blink-cmp-avante", "saghen/blink.compat" },
|
||||
opts = {
|
||||
sources = {
|
||||
default = { "avante" },
|
||||
providers = {
|
||||
avante = {
|
||||
module = "blink-cmp-avante",
|
||||
name = "Avante",
|
||||
opts = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
22
lua/lazyvim/plugins/extras/ai/claudecode.lua
Normal file
22
lua/lazyvim/plugins/extras/ai/claudecode.lua
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
return {
|
||||
"coder/claudecode.nvim",
|
||||
opts = {},
|
||||
keys = {
|
||||
{ "<leader>a", "", desc = "+ai", mode = { "n", "v" } },
|
||||
{ "<leader>ac", "<cmd>ClaudeCode<cr>", desc = "Toggle Claude" },
|
||||
{ "<leader>af", "<cmd>ClaudeCodeFocus<cr>", desc = "Focus Claude" },
|
||||
{ "<leader>ar", "<cmd>ClaudeCode --resume<cr>", desc = "Resume Claude" },
|
||||
{ "<leader>aC", "<cmd>ClaudeCode --continue<cr>", desc = "Continue Claude" },
|
||||
{ "<leader>ab", "<cmd>ClaudeCodeAdd %<cr>", desc = "Add current buffer" },
|
||||
{ "<leader>as", "<cmd>ClaudeCodeSend<cr>", mode = "v", desc = "Send to Claude" },
|
||||
{
|
||||
"<leader>as",
|
||||
"<cmd>ClaudeCodeTreeAdd<cr>",
|
||||
desc = "Add file",
|
||||
ft = { "NvimTree", "neo-tree", "oil" },
|
||||
},
|
||||
-- Diff management
|
||||
{ "<leader>aa", "<cmd>ClaudeCodeDiffAccept<cr>", desc = "Accept diff" },
|
||||
{ "<leader>ad", "<cmd>ClaudeCodeDiffDeny<cr>", desc = "Deny diff" },
|
||||
},
|
||||
}
|
||||
|
|
@ -8,8 +8,11 @@ return {
|
|||
user = user:sub(1, 1):upper() .. user:sub(2)
|
||||
return {
|
||||
auto_insert_mode = true,
|
||||
question_header = " " .. user .. " ",
|
||||
answer_header = " Copilot ",
|
||||
headers = {
|
||||
user = " " .. user .. " ",
|
||||
assistant = " Copilot ",
|
||||
tool = " Tool ",
|
||||
},
|
||||
window = {
|
||||
width = 0.4,
|
||||
},
|
||||
|
|
@ -17,14 +20,14 @@ return {
|
|||
end,
|
||||
keys = {
|
||||
{ "<c-s>", "<CR>", ft = "copilot-chat", desc = "Submit Prompt", remap = true },
|
||||
{ "<leader>a", "", desc = "+ai", mode = { "n", "v" } },
|
||||
{ "<leader>a", "", desc = "+ai", mode = { "n", "x" } },
|
||||
{
|
||||
"<leader>aa",
|
||||
function()
|
||||
return require("CopilotChat").toggle()
|
||||
end,
|
||||
desc = "Toggle (CopilotChat)",
|
||||
mode = { "n", "v" },
|
||||
mode = { "n", "x" },
|
||||
},
|
||||
{
|
||||
"<leader>ax",
|
||||
|
|
@ -32,7 +35,7 @@ return {
|
|||
return require("CopilotChat").reset()
|
||||
end,
|
||||
desc = "Clear (CopilotChat)",
|
||||
mode = { "n", "v" },
|
||||
mode = { "n", "x" },
|
||||
},
|
||||
{
|
||||
"<leader>aq",
|
||||
|
|
@ -46,7 +49,7 @@ return {
|
|||
end)
|
||||
end,
|
||||
desc = "Quick Chat (CopilotChat)",
|
||||
mode = { "n", "v" },
|
||||
mode = { "n", "x" },
|
||||
},
|
||||
{
|
||||
"<leader>ap",
|
||||
|
|
@ -54,7 +57,7 @@ return {
|
|||
require("CopilotChat").select_prompt()
|
||||
end,
|
||||
desc = "Prompt Actions (CopilotChat)",
|
||||
mode = { "n", "v" },
|
||||
mode = { "n", "x" },
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
|
|
|
|||
|
|
@ -39,6 +39,19 @@ return {
|
|||
return { fg = Snacks.util.color(hl) }
|
||||
end,
|
||||
})
|
||||
|
||||
table.insert(opts.sections.lualine_x, 2, {
|
||||
function()
|
||||
local status = require("sidekick.status").cli()
|
||||
return " " .. (#status > 1 and #status or "")
|
||||
end,
|
||||
cond = function()
|
||||
return #require("sidekick.status").cli() > 0
|
||||
end,
|
||||
color = function()
|
||||
return { fg = Snacks.util.color("Special") }
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
|
|
@ -114,7 +127,7 @@ return {
|
|||
picker = {
|
||||
actions = {
|
||||
sidekick_send = function(...)
|
||||
return require("sidekick.cli.snacks").send(...)
|
||||
return require("sidekick.cli.picker.snacks").send(...)
|
||||
end,
|
||||
},
|
||||
win = {
|
||||
|
|
|
|||
|
|
@ -37,9 +37,7 @@ return {
|
|||
---@type blink.cmp.Config
|
||||
opts = {
|
||||
snippets = {
|
||||
expand = function(snippet, _)
|
||||
return LazyVim.cmp.expand(snippet)
|
||||
end,
|
||||
preset = "default",
|
||||
},
|
||||
|
||||
appearance = {
|
||||
|
|
@ -108,6 +106,9 @@ return {
|
|||
},
|
||||
---@param opts blink.cmp.Config | { sources: { compat: string[] } }
|
||||
config = function(_, opts)
|
||||
if opts.snippets and opts.snippets.preset == "default" then
|
||||
opts.snippets.expand = LazyVim.cmp.expand
|
||||
end
|
||||
-- setup compat sources
|
||||
local enabled = opts.sources.default
|
||||
for _, source in ipairs(opts.sources.compat or {}) do
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
if lazyvim_docs then
|
||||
-- Set to `false` to prevent "non-lsp snippets"" from appearing inside completion windows
|
||||
-- Motivation: Less clutter in completion windows and a more direct usage of snippits
|
||||
-- Motivation: Less clutter in completion windows and a more direct usage of snippets
|
||||
vim.g.lazyvim_mini_snippets_in_completion = true
|
||||
|
||||
-- NOTE: Please also read:
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ return {
|
|||
-- Populate the keys based on the user's options
|
||||
local opts = LazyVim.opts("mini.surround")
|
||||
local mappings = {
|
||||
{ opts.mappings.add, desc = "Add Surrounding", mode = { "n", "v" } },
|
||||
{ opts.mappings.add, desc = "Add Surrounding", mode = { "n", "x" } },
|
||||
{ opts.mappings.delete, desc = "Delete Surrounding" },
|
||||
{ opts.mappings.find, desc = "Find Right Surrounding" },
|
||||
{ opts.mappings.find_left, desc = "Find Left Surrounding" },
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ return {
|
|||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>du", function() require("dapui").toggle({ }) end, desc = "Dap UI" },
|
||||
{ "<leader>de", function() require("dapui").eval() end, desc = "Eval", mode = {"n", "v"} },
|
||||
{ "<leader>de", function() require("dapui").eval() end, desc = "Eval", mode = {"n", "x"} },
|
||||
},
|
||||
opts = {},
|
||||
config = function(_, opts)
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ return {
|
|||
keys = {
|
||||
{ "<C-a>", function() return M.dial(true) end, expr = true, desc = "Increment", mode = {"n", "v"} },
|
||||
{ "<C-x>", function() return M.dial(false) end, expr = true, desc = "Decrement", mode = {"n", "v"} },
|
||||
{ "g<C-a>", function() return M.dial(true, true) end, expr = true, desc = "Increment", mode = {"n", "v"} },
|
||||
{ "g<C-x>", function() return M.dial(false, true) end, expr = true, desc = "Decrement", mode = {"n", "v"} },
|
||||
{ "g<C-a>", function() return M.dial(true, true) end, expr = true, desc = "Increment", mode = {"n", "x"} },
|
||||
{ "g<C-x>", function() return M.dial(false, true) end, expr = true, desc = "Decrement", mode = {"n", "x"} },
|
||||
},
|
||||
opts = function()
|
||||
local augend = require("dial.augend")
|
||||
|
|
|
|||
|
|
@ -218,6 +218,7 @@ return {
|
|||
{ "<leader><space>", LazyVim.pick("files"), desc = "Find Files (Root Dir)" },
|
||||
-- find
|
||||
{ "<leader>fb", "<cmd>FzfLua buffers sort_mru=true sort_lastused=true<cr>", desc = "Buffers" },
|
||||
{ "<leader>fB", "<cmd>FzfLua buffers<cr>", desc = "Buffers (all)" },
|
||||
{ "<leader>fc", LazyVim.pick.config_files(), desc = "Find Config File" },
|
||||
{ "<leader>ff", LazyVim.pick("files"), desc = "Find Files (Root Dir)" },
|
||||
{ "<leader>fF", LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" },
|
||||
|
|
@ -226,15 +227,19 @@ return {
|
|||
{ "<leader>fR", LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" },
|
||||
-- git
|
||||
{ "<leader>gc", "<cmd>FzfLua git_commits<CR>", desc = "Commits" },
|
||||
{ "<leader>gd", "<cmd>FzfLua git_diff<cr>", desc = "Git Diff (hunks)" },
|
||||
{ "<leader>gl", "<cmd>FzfLua git_commits<CR>", desc = "Commits" },
|
||||
{ "<leader>gs", "<cmd>FzfLua git_status<CR>", desc = "Status" },
|
||||
{ "<leader>gS", "<cmd>FzfLua git_stash<cr>", desc = "Git Stash" },
|
||||
-- search
|
||||
{ '<leader>s"', "<cmd>FzfLua registers<cr>", desc = "Registers" },
|
||||
{ "<leader>s/", "<cmd>FzfLua search_history<cr>", desc = "Search History" },
|
||||
{ "<leader>sa", "<cmd>FzfLua autocmds<cr>", desc = "Auto Commands" },
|
||||
{ "<leader>sb", "<cmd>FzfLua grep_curbuf<cr>", desc = "Buffer" },
|
||||
{ "<leader>sb", "<cmd>FzfLua lines<cr>", desc = "Buffer Lines" },
|
||||
{ "<leader>sc", "<cmd>FzfLua command_history<cr>", desc = "Command History" },
|
||||
{ "<leader>sC", "<cmd>FzfLua commands<cr>", desc = "Commands" },
|
||||
{ "<leader>sd", "<cmd>FzfLua diagnostics_document<cr>", desc = "Document Diagnostics" },
|
||||
{ "<leader>sD", "<cmd>FzfLua diagnostics_workspace<cr>", desc = "Workspace Diagnostics" },
|
||||
{ "<leader>sd", "<cmd>FzfLua diagnostics_workspace<cr>", desc = "Diagnostics" },
|
||||
{ "<leader>sD", "<cmd>FzfLua diagnostics_document<cr>", desc = "Buffer Diagnostics" },
|
||||
{ "<leader>sg", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" },
|
||||
{ "<leader>sG", LazyVim.pick("live_grep", { root = false }), desc = "Grep (cwd)" },
|
||||
{ "<leader>sh", "<cmd>FzfLua help_tags<cr>", desc = "Help Pages" },
|
||||
|
|
@ -248,8 +253,8 @@ return {
|
|||
{ "<leader>sq", "<cmd>FzfLua quickfix<cr>", desc = "Quickfix List" },
|
||||
{ "<leader>sw", LazyVim.pick("grep_cword"), desc = "Word (Root Dir)" },
|
||||
{ "<leader>sW", LazyVim.pick("grep_cword", { root = false }), desc = "Word (cwd)" },
|
||||
{ "<leader>sw", LazyVim.pick("grep_visual"), mode = "v", desc = "Selection (Root Dir)" },
|
||||
{ "<leader>sW", LazyVim.pick("grep_visual", { root = false }), mode = "v", desc = "Selection (cwd)" },
|
||||
{ "<leader>sw", LazyVim.pick("grep_visual"), mode = "x", desc = "Selection (Root Dir)" },
|
||||
{ "<leader>sW", LazyVim.pick("grep_visual", { root = false }), mode = "x", desc = "Selection (cwd)" },
|
||||
{ "<leader>uC", LazyVim.pick("colorschemes"), desc = "Colorscheme with Preview" },
|
||||
{
|
||||
"<leader>ss",
|
||||
|
|
|
|||
|
|
@ -101,6 +101,7 @@ return {
|
|||
"<cmd>Telescope buffers sort_mru=true sort_lastused=true ignore_current_buffer=true<cr>",
|
||||
desc = "Buffers",
|
||||
},
|
||||
{ "<leader>fB", "<cmd>Telescope buffers<cr>", desc = "Buffers (all)" },
|
||||
{ "<leader>fc", LazyVim.pick.config_files(), desc = "Find Config File" },
|
||||
{ "<leader>ff", LazyVim.pick("files"), desc = "Find Files (Root Dir)" },
|
||||
{ "<leader>fF", LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" },
|
||||
|
|
@ -109,15 +110,18 @@ return {
|
|||
{ "<leader>fR", LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" },
|
||||
-- git
|
||||
{ "<leader>gc", "<cmd>Telescope git_commits<CR>", desc = "Commits" },
|
||||
{ "<leader>gl", "<cmd>Telescope git_commits<CR>", desc = "Commits" },
|
||||
{ "<leader>gs", "<cmd>Telescope git_status<CR>", desc = "Status" },
|
||||
{ "<leader>gS", "<cmd>Telescope git_stash<cr>", desc = "Git Stash" },
|
||||
-- search
|
||||
{ '<leader>s"', "<cmd>Telescope registers<cr>", desc = "Registers" },
|
||||
{ "<leader>s/", "<cmd>Telescope search_history<cr>", desc = "Search History" },
|
||||
{ "<leader>sa", "<cmd>Telescope autocommands<cr>", desc = "Auto Commands" },
|
||||
{ "<leader>sb", "<cmd>Telescope current_buffer_fuzzy_find<cr>", desc = "Buffer" },
|
||||
{ "<leader>sb", "<cmd>Telescope current_buffer_fuzzy_find<cr>", desc = "Buffer Lines" },
|
||||
{ "<leader>sc", "<cmd>Telescope command_history<cr>", desc = "Command History" },
|
||||
{ "<leader>sC", "<cmd>Telescope commands<cr>", desc = "Commands" },
|
||||
{ "<leader>sd", "<cmd>Telescope diagnostics bufnr=0<cr>", desc = "Document Diagnostics" },
|
||||
{ "<leader>sD", "<cmd>Telescope diagnostics<cr>", desc = "Workspace Diagnostics" },
|
||||
{ "<leader>sd", "<cmd>Telescope diagnostics<cr>", desc = "Diagnostics" },
|
||||
{ "<leader>sD", "<cmd>Telescope diagnostics bufnr=0<cr>", desc = "Buffer Diagnostics" },
|
||||
{ "<leader>sg", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" },
|
||||
{ "<leader>sG", LazyVim.pick("live_grep", { root = false }), desc = "Grep (cwd)" },
|
||||
{ "<leader>sh", "<cmd>Telescope help_tags<cr>", desc = "Help Pages" },
|
||||
|
|
@ -132,8 +136,8 @@ return {
|
|||
{ "<leader>sq", "<cmd>Telescope quickfix<cr>", desc = "Quickfix List" },
|
||||
{ "<leader>sw", LazyVim.pick("grep_string", { word_match = "-w" }), desc = "Word (Root Dir)" },
|
||||
{ "<leader>sW", LazyVim.pick("grep_string", { root = false, word_match = "-w" }), desc = "Word (cwd)" },
|
||||
{ "<leader>sw", LazyVim.pick("grep_string"), mode = "v", desc = "Selection (Root Dir)" },
|
||||
{ "<leader>sW", LazyVim.pick("grep_string", { root = false }), mode = "v", desc = "Selection (cwd)" },
|
||||
{ "<leader>sw", LazyVim.pick("grep_string"), mode = "x", desc = "Selection (Root Dir)" },
|
||||
{ "<leader>sW", LazyVim.pick("grep_string", { root = false }), mode = "x", desc = "Selection (cwd)" },
|
||||
{ "<leader>uC", LazyVim.pick("colorscheme", { enable_preview = true }), desc = "Colorscheme with Preview" },
|
||||
{
|
||||
"<leader>ss",
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ return {
|
|||
-- Ensure mason installs the server
|
||||
clangd = {
|
||||
keys = {
|
||||
{ "<leader>ch", "<cmd>ClangdSwitchSourceHeader<cr>", desc = "Switch Source/Header (C/C++)" },
|
||||
{ "<leader>ch", "<cmd>LspClangdSwitchSourceHeader<cr>", desc = "Switch Source/Header (C/C++)" },
|
||||
},
|
||||
root_markers = {
|
||||
"compile_commands.json",
|
||||
|
|
|
|||
|
|
@ -76,13 +76,13 @@ return {
|
|||
end
|
||||
|
||||
vim.keymap.set(
|
||||
{ "n", "v" },
|
||||
{ "n", "x" },
|
||||
"[c",
|
||||
"<CMD>call search('^; -\\+$', 'bw')<CR>",
|
||||
{ silent = true, buffer = true, desc = "Jumps to the begining of previous evaluation output." }
|
||||
)
|
||||
vim.keymap.set(
|
||||
{ "n", "v" },
|
||||
{ "n", "x" },
|
||||
"]c",
|
||||
"<CMD>call search('^; -\\+$', 'w')<CR>",
|
||||
{ silent = true, buffer = true, desc = "Jumps to the begining of next evaluation output." }
|
||||
|
|
|
|||
40
lua/lazyvim/plugins/extras/lang/dart.lua
Normal file
40
lua/lazyvim/plugins/extras/lang/dart.lua
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
return {
|
||||
recommended = function()
|
||||
return LazyVim.extras.wants({
|
||||
ft = "dart",
|
||||
root = { "pubspec.yaml" },
|
||||
})
|
||||
end,
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
dartls = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = { ensure_installed = { "dart" } },
|
||||
},
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
dart = { "dart_format" },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvim-neotest/neotest",
|
||||
optional = true,
|
||||
dependencies = {
|
||||
"sidlatau/neotest-dart",
|
||||
},
|
||||
opts = {
|
||||
adapters = {
|
||||
["neotest-dart"] = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -2,7 +2,14 @@ return {
|
|||
recommended = function()
|
||||
return LazyVim.extras.wants({
|
||||
ft = "dockerfile",
|
||||
root = { "Dockerfile", "docker-compose.yml", "compose.yml", "docker-compose.yaml", "compose.yaml" },
|
||||
root = {
|
||||
"Dockerfile",
|
||||
"Containerfile",
|
||||
"docker-compose.yml",
|
||||
"compose.yml",
|
||||
"docker-compose.yaml",
|
||||
"compose.yaml",
|
||||
},
|
||||
})
|
||||
end,
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
return {
|
||||
recommended = function()
|
||||
return LazyVim.extras.wants({
|
||||
ft = { "cs", "vb" },
|
||||
root = { "*.sln", "*.csproj", "omnisharp.json", "function.json" },
|
||||
ft = { "cs", "vb", "fsharp" },
|
||||
root = { "*.sln", "*.csproj", "*.fsproj", "omnisharp.json", "function.json", "paket.dependencies", "paket.lock" },
|
||||
})
|
||||
end,
|
||||
|
||||
{ "Hoffs/omnisharp-extended-lsp.nvim", lazy = true },
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = { ensure_installed = { "c_sharp" } },
|
||||
opts = { ensure_installed = { "c_sharp", "fsharp" } },
|
||||
},
|
||||
{
|
||||
"nvimtools/none-ls.nvim",
|
||||
|
|
@ -18,6 +18,7 @@ return {
|
|||
local nls = require("null-ls")
|
||||
opts.sources = opts.sources or {}
|
||||
table.insert(opts.sources, nls.builtins.formatting.csharpier)
|
||||
table.insert(opts.sources, nls.builtins.formatting.fantomas)
|
||||
end,
|
||||
},
|
||||
{
|
||||
|
|
@ -26,23 +27,19 @@ return {
|
|||
opts = {
|
||||
formatters_by_ft = {
|
||||
cs = { "csharpier" },
|
||||
},
|
||||
formatters = {
|
||||
csharpier = {
|
||||
command = "dotnet-csharpier",
|
||||
args = { "--write-stdout" },
|
||||
},
|
||||
fsharp = { "fantomas" },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"mason-org/mason.nvim",
|
||||
opts = { ensure_installed = { "csharpier", "netcoredbg" } },
|
||||
opts = { ensure_installed = { "csharpier", "netcoredbg", "fantomas" } },
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
fsautocomplete = {},
|
||||
omnisharp = {
|
||||
handlers = {
|
||||
["textDocument/definition"] = function(...)
|
||||
|
|
@ -104,12 +101,12 @@ return {
|
|||
"nvim-neotest/neotest",
|
||||
optional = true,
|
||||
dependencies = {
|
||||
"Issafalcon/neotest-dotnet",
|
||||
"Nsidorenco/neotest-vstest",
|
||||
},
|
||||
opts = {
|
||||
adapters = {
|
||||
["neotest-dotnet"] = {
|
||||
-- Here we can set options for neotest-dotnet
|
||||
["neotest-vstest"] = {
|
||||
-- Here we can set options for neotest-vstest
|
||||
},
|
||||
},
|
||||
},
|
||||
29
lua/lazyvim/plugins/extras/lang/ember.lua
Normal file
29
lua/lazyvim/plugins/extras/lang/ember.lua
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
return {
|
||||
recommended = function()
|
||||
return LazyVim.extras.wants({
|
||||
ft = { "handlebars", "typescript", "javascript", "typescript.glimmer", "javascript.glimmer" },
|
||||
root = { "ember-cli-build.js", ".git" },
|
||||
})
|
||||
end,
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = { ensure_installed = { "css", "glimmer", "glimmer_javascript", "glimmer_typescript" } },
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
ember = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"conform.nvim",
|
||||
opts = function(_, opts)
|
||||
if LazyVim.has_extra("formatting.prettier") then
|
||||
opts.formatters_by_ft = opts.formatters_by_ft or {}
|
||||
opts.formatters_by_ft.glimmer = { "prettier" }
|
||||
end
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
@ -97,6 +97,22 @@ return {
|
|||
})
|
||||
end,
|
||||
},
|
||||
-- Add linting
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
optional = true,
|
||||
dependencies = {
|
||||
{
|
||||
"mason-org/mason.nvim",
|
||||
opts = { ensure_installed = { "golangci-lint" } },
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
linters_by_ft = {
|
||||
go = { "golangcilint" },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
optional = true,
|
||||
|
|
|
|||
|
|
@ -14,17 +14,40 @@ return {
|
|||
|
||||
{
|
||||
"mrcjkb/haskell-tools.nvim",
|
||||
version = "^3",
|
||||
version = false,
|
||||
ft = { "haskell", "lhaskell", "cabal", "cabalproject" },
|
||||
dependencies = {
|
||||
{ "nvim-telescope/telescope.nvim", optional = true },
|
||||
keys = {
|
||||
{
|
||||
"<localleader>e",
|
||||
"<cmd>HlsEvalAll<cr>",
|
||||
ft = "haskell",
|
||||
desc = "Evaluate All",
|
||||
},
|
||||
{
|
||||
"<localleader>h",
|
||||
function()
|
||||
require("haskell-tools").hoogle.hoogle_signature()
|
||||
end,
|
||||
ft = "haskell",
|
||||
desc = "Hoogle Signature",
|
||||
},
|
||||
{
|
||||
"<localleader>r",
|
||||
function()
|
||||
require("haskell-tools").repl.toggle()
|
||||
end,
|
||||
ft = "haskell",
|
||||
desc = "REPL (Package)",
|
||||
},
|
||||
{
|
||||
"<localleader>R",
|
||||
function()
|
||||
require("haskell-tools").repl.toggle(vim.api.nvim_buf_get_name(0))
|
||||
end,
|
||||
ft = "haskell",
|
||||
desc = "REPL (Buffer)",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local ok, telescope = pcall(require, "telescope")
|
||||
if ok then
|
||||
telescope.load_extension("ht")
|
||||
end
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
|
|
@ -67,17 +90,48 @@ return {
|
|||
},
|
||||
|
||||
{
|
||||
"luc-tielen/telescope_hoogle",
|
||||
ft = { "haskell", "lhaskell", "cabal", "cabalproject" },
|
||||
dependencies = {
|
||||
{ "nvim-telescope/telescope.nvim", optional = true },
|
||||
"nvim-telescope/telescope.nvim",
|
||||
optional = true,
|
||||
specs = {
|
||||
{
|
||||
"luc-tielen/telescope_hoogle",
|
||||
ft = { "haskell", "lhaskell", "cabal", "cabalproject" },
|
||||
opts = function()
|
||||
LazyVim.on_load("telescope.nvim", function()
|
||||
require("telescope").load_extension("ht")
|
||||
end)
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<localleader>H",
|
||||
"<cmd>Telescope hoogle<cr>",
|
||||
ft = "haskell",
|
||||
desc = "Hoogle",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
optional = true,
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
haskell = { "fourmolu" },
|
||||
cabal = { "cabal_fmt" },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
optional = true,
|
||||
opts = {
|
||||
linters_by_ft = {
|
||||
haskell = { "hlint" },
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local ok, telescope = pcall(require, "telescope")
|
||||
if ok then
|
||||
telescope.load_extension("hoogle")
|
||||
end
|
||||
end,
|
||||
},
|
||||
|
||||
-- Make sure lspconfig doesn't start hls,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ return {
|
|||
})
|
||||
end,
|
||||
|
||||
{ "towolf/vim-helm", ft = "helm" },
|
||||
{ "qvalentin/helm-ls.nvim", ft = "helm" },
|
||||
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = { ensure_installed = { "helm" } },
|
||||
|
|
@ -18,17 +19,6 @@ return {
|
|||
servers = {
|
||||
helm_ls = {},
|
||||
},
|
||||
setup = {
|
||||
yamlls = function()
|
||||
LazyVim.lsp.on_attach(function(client, buffer)
|
||||
if vim.bo[buffer].filetype == "helm" then
|
||||
vim.schedule(function()
|
||||
vim.cmd("LspStop ++force yamlls")
|
||||
end)
|
||||
end
|
||||
end, "yamlls")
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -169,7 +169,9 @@ return {
|
|||
},
|
||||
settings = opts.settings,
|
||||
-- enable CMP capabilities
|
||||
capabilities = LazyVim.has("cmp-nvim-lsp") and require("cmp_nvim_lsp").default_capabilities() or nil,
|
||||
capabilities = LazyVim.has("blink.cmp") and require("blink.cmp").get_lsp_capabilities() or LazyVim.has(
|
||||
"cmp-nvim-lsp"
|
||||
) and require("cmp_nvim_lsp").default_capabilities() or nil,
|
||||
}, opts.jdtls)
|
||||
|
||||
-- Existing server will be reused if the root_dir matches.
|
||||
|
|
@ -207,7 +209,7 @@ return {
|
|||
})
|
||||
wk.add({
|
||||
{
|
||||
mode = "v",
|
||||
mode = "x",
|
||||
buffer = args.buf,
|
||||
{ "<leader>cx", group = "extract" },
|
||||
{
|
||||
|
|
|
|||
66
lua/lazyvim/plugins/extras/lang/julia.lua
Normal file
66
lua/lazyvim/plugins/extras/lang/julia.lua
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
return {
|
||||
recommended = function()
|
||||
return LazyVim.extras.wants({
|
||||
ft = { "julia" },
|
||||
root = { "Project.toml" },
|
||||
})
|
||||
end,
|
||||
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = { ensure_installed = { "julia" } },
|
||||
},
|
||||
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
julials = {
|
||||
settings = {
|
||||
-- use the same default settings as the Julia VS Code extension
|
||||
julia = {
|
||||
completionmode = "qualify",
|
||||
lint = { missingrefs = "none" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- cmp integration
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
optional = true,
|
||||
dependencies = { "kdheepak/cmp-latex-symbols" },
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sources, {
|
||||
name = "latex_symbols",
|
||||
option = {
|
||||
strategy = 0, -- mixed
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- blink.cmp integration
|
||||
{
|
||||
"saghen/blink.cmp",
|
||||
optional = true,
|
||||
dependencies = { "kdheepak/cmp-latex-symbols", "saghen/blink.compat" },
|
||||
opts = {
|
||||
sources = {
|
||||
compat = { "latex_symbols" },
|
||||
providers = {
|
||||
latex_symbols = {
|
||||
kind = "LatexSymbols",
|
||||
async = true,
|
||||
opts = {
|
||||
strategy = 0, -- mixed
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -108,7 +108,7 @@ return {
|
|||
priority = 10,
|
||||
},
|
||||
|
||||
-- Redirect Lean's stderr messages somehwere (to a buffer by default)
|
||||
-- Redirect Lean's stderr messages somewhere (to a buffer by default)
|
||||
stderr = {
|
||||
enable = true,
|
||||
-- height of the window
|
||||
|
|
|
|||
|
|
@ -24,4 +24,13 @@ return {
|
|||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
optional = true,
|
||||
opts = {
|
||||
linters_by_ft = {
|
||||
nix = { "statix" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,4 +83,21 @@ return {
|
|||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"nvim-neotest/neotest",
|
||||
optional = true,
|
||||
dependencies = {
|
||||
"V13Axel/neotest-pest",
|
||||
"olimorris/neotest-phpunit",
|
||||
},
|
||||
opts = {
|
||||
adapters = {
|
||||
"neotest-pest",
|
||||
["neotest-phpunit"] = {
|
||||
root_ignore_files = { "tests/Pest.php" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,11 +103,7 @@ return {
|
|||
{ "<leader>dPc", function() require('dap-python').test_class() end, desc = "Debug Class", ft = "python" },
|
||||
},
|
||||
config = function()
|
||||
if vim.fn.has("win32") == 1 then
|
||||
require("dap-python").setup(LazyVim.get_pkg_path("debugpy", "/venv/Scripts/pythonw.exe"))
|
||||
else
|
||||
require("dap-python").setup(LazyVim.get_pkg_path("debugpy", "/venv/bin/python"))
|
||||
end
|
||||
require("dap-python").setup("debugpy-adapter")
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -17,12 +17,12 @@ return {
|
|||
-- of files supported by R.nvim. This is an
|
||||
-- opportunity to create mappings local to buffers.
|
||||
vim.keymap.set("n", "<Enter>", "<Plug>RDSendLine", { buffer = true })
|
||||
vim.keymap.set("v", "<Enter>", "<Plug>RSendSelection", { buffer = true })
|
||||
vim.keymap.set("x", "<Enter>", "<Plug>RSendSelection", { buffer = true })
|
||||
|
||||
local wk = require("which-key")
|
||||
wk.add({
|
||||
buffer = true,
|
||||
mode = { "n", "v" },
|
||||
mode = { "n", "x" },
|
||||
{ "<localleader>a", group = "all" },
|
||||
{ "<localleader>b", group = "between marks" },
|
||||
{ "<localleader>c", group = "chunks" },
|
||||
|
|
|
|||
|
|
@ -85,16 +85,12 @@ return {
|
|||
},
|
||||
procMacro = {
|
||||
enable = true,
|
||||
ignored = {
|
||||
["async-trait"] = { "async_trait" },
|
||||
["napi-derive"] = { "napi" },
|
||||
["async-recursion"] = { "async_recursion" },
|
||||
},
|
||||
},
|
||||
files = {
|
||||
excludeDirs = {
|
||||
exclude = {
|
||||
".direnv",
|
||||
".git",
|
||||
".jj",
|
||||
".github",
|
||||
".gitlab",
|
||||
"bin",
|
||||
|
|
@ -103,6 +99,8 @@ return {
|
|||
"venv",
|
||||
".venv",
|
||||
},
|
||||
-- Avoid Roots Scanned hanging, see https://github.com/rust-lang/rust-analyzer/issues/12613#issuecomment-2096386344
|
||||
watcher = "client",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -11,66 +11,70 @@ return {
|
|||
},
|
||||
{
|
||||
"scalameta/nvim-metals",
|
||||
ft = { "scala", "sbt" },
|
||||
config = function() end,
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
metals = {
|
||||
keys = {
|
||||
{
|
||||
"<leader>me",
|
||||
function()
|
||||
require("telescope").extensions.metals.commands()
|
||||
end,
|
||||
desc = "Metals commands",
|
||||
},
|
||||
{
|
||||
"<leader>mc",
|
||||
function()
|
||||
require("metals").compile_cascade()
|
||||
end,
|
||||
desc = "Metals compile cascade",
|
||||
},
|
||||
{
|
||||
"<leader>mh",
|
||||
function()
|
||||
require("metals").hover_worksheet()
|
||||
end,
|
||||
desc = "Metals hover worksheet",
|
||||
},
|
||||
},
|
||||
init_options = {
|
||||
statusBarProvider = "off",
|
||||
},
|
||||
settings = {
|
||||
showImplicitArguments = true,
|
||||
excludedPackages = { "akka.actor.typed.javadsl", "com.github.swagger.akka.javadsl" },
|
||||
},
|
||||
},
|
||||
},
|
||||
setup = {
|
||||
metals = function(_, opts)
|
||||
local metals = require("metals")
|
||||
local metals_config = vim.tbl_deep_extend("force", metals.bare_config(), opts)
|
||||
metals_config.on_attach = LazyVim.has("nvim-dap") and metals.setup_dap or nil
|
||||
|
||||
local nvim_metals_group = vim.api.nvim_create_augroup("nvim-metals", { clear = true })
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "scala", "sbt" },
|
||||
callback = function()
|
||||
metals.initialize_or_attach(metals_config)
|
||||
end,
|
||||
group = nvim_metals_group,
|
||||
})
|
||||
return true
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>me",
|
||||
function()
|
||||
require("telescope").extensions.metals.commands()
|
||||
end,
|
||||
desc = "Metals commands",
|
||||
},
|
||||
{
|
||||
"<leader>mc",
|
||||
function()
|
||||
require("metals").compile_cascade()
|
||||
end,
|
||||
desc = "Metals compile cascade",
|
||||
},
|
||||
{
|
||||
"<leader>mh",
|
||||
function()
|
||||
require("metals").hover_worksheet()
|
||||
end,
|
||||
desc = "Metals hover worksheet",
|
||||
},
|
||||
},
|
||||
},
|
||||
ft = { "scala", "sbt", "java" },
|
||||
opts = function()
|
||||
local metals_config = require("metals").bare_config()
|
||||
|
||||
metals_config.init_options.statusBarProvider = "off"
|
||||
|
||||
metals_config.settings = {
|
||||
verboseCompilation = true,
|
||||
showImplicitArguments = true,
|
||||
showImplicitConversionsAndClasses = true,
|
||||
showInferredType = true,
|
||||
superMethodLensesEnabled = true,
|
||||
excludedPackages = {
|
||||
"akka.actor.typed.javadsl",
|
||||
"org.apache.pekko.actor.typed.javadsl",
|
||||
"com.github.swagger.akka.javadsl",
|
||||
},
|
||||
testUserInterface = "Test Explorer",
|
||||
}
|
||||
|
||||
metals_config.on_attach = function(client, bufnr)
|
||||
-- your on_attach function
|
||||
require("metals").setup_dap()
|
||||
end
|
||||
|
||||
return metals_config
|
||||
end,
|
||||
config = function(self, metals_config)
|
||||
local nvim_metals_group = vim.api.nvim_create_augroup("nvim-metals", { clear = true })
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = self.ft,
|
||||
callback = function()
|
||||
require("metals").initialize_or_attach(metals_config)
|
||||
end,
|
||||
group = nvim_metals_group,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
optional = true,
|
||||
|
|
|
|||
37
lua/lazyvim/plugins/extras/lang/solidity.lua
Normal file
37
lua/lazyvim/plugins/extras/lang/solidity.lua
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
return {
|
||||
recommended = function()
|
||||
return LazyVim.extras.wants({
|
||||
ft = "solidity",
|
||||
root = {
|
||||
"foundry.toml",
|
||||
"hardhat.config.js",
|
||||
"hardhat.config.ts",
|
||||
},
|
||||
})
|
||||
end,
|
||||
-- Add Solidity & related to treesitter
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = { ensure_installed = { "solidity" } },
|
||||
},
|
||||
|
||||
-- Correctly setup lspconfig for Solidity
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
solidity_ls = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- Formatter for Solidity
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
optional = true,
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
solidity = { "forge_fmt" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -28,6 +28,11 @@ end
|
|||
|
||||
local sql_ft = { "sql", "mysql", "plsql" }
|
||||
|
||||
-- disable nvim default `sql_completion` plugin to be compatible with blink.cmp's omni
|
||||
-- while still showing some keywords from the syntax autocomplete sources
|
||||
vim.g.omni_sql_default_compl_type = "syntax"
|
||||
vim.g.loaded_sql_completion = true
|
||||
|
||||
return {
|
||||
recommended = function()
|
||||
return LazyVim.extras.wants({
|
||||
|
|
|
|||
|
|
@ -24,6 +24,20 @@ return {
|
|||
filetypes_include = {},
|
||||
-- to fully override the default_config, change the below
|
||||
-- filetypes = {}
|
||||
|
||||
-- additional settings for the server, e.g:
|
||||
-- tailwindCSS = { includeLanguages = { someLang = "html" } }
|
||||
-- can be addeded to the settings table and will be merged with
|
||||
-- this defaults for Phoenix projects
|
||||
settings = {
|
||||
tailwindCSS = {
|
||||
includeLanguages = {
|
||||
elixir = "html-eex",
|
||||
eelixir = "html-eex",
|
||||
heex = "html-eex",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
setup = {
|
||||
|
|
@ -39,17 +53,6 @@ return {
|
|||
return not vim.tbl_contains(opts.filetypes_exclude or {}, ft)
|
||||
end, opts.filetypes)
|
||||
|
||||
-- Additional settings for Phoenix projects
|
||||
opts.settings = {
|
||||
tailwindCSS = {
|
||||
includeLanguages = {
|
||||
elixir = "html-eex",
|
||||
eelixir = "html-eex",
|
||||
heex = "html-eex",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Add additional filetypes
|
||||
vim.list_extend(opts.filetypes, opts.filetypes_include or {})
|
||||
end,
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ return {
|
|||
opts = function(_, opts)
|
||||
opts.highlight = opts.highlight or {}
|
||||
if type(opts.ensure_installed) == "table" then
|
||||
vim.list_extend(opts.ensure_installed, { "bibtex" })
|
||||
vim.list_extend(opts.ensure_installed, { "bibtex", "latex" })
|
||||
end
|
||||
if type(opts.highlight.disable) == "table" then
|
||||
vim.list_extend(opts.highlight.disable, { "latex" })
|
||||
|
|
|
|||
58
lua/lazyvim/plugins/extras/lang/twig.lua
Normal file
58
lua/lazyvim/plugins/extras/lang/twig.lua
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
return {
|
||||
recommended = function()
|
||||
return LazyVim.extras.wants({
|
||||
ft = "twig",
|
||||
})
|
||||
end,
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = { ensure_installed = { "twig" } },
|
||||
},
|
||||
{
|
||||
"mason-org/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"twigcs",
|
||||
"twig-cs-fixer",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
twiggy_language_server = {
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvimtools/none-ls.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
local nls = require("null-ls")
|
||||
opts.sources = opts.sources or {}
|
||||
table.insert(opts.sources, nls.builtins.diagnostics.twigcs)
|
||||
-- Twig-CS-Fixer builtin not available in none-ls
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
optional = true,
|
||||
opts = {
|
||||
linters_by_ft = {
|
||||
twig = { "twigcs" },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
optional = true,
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
twig = { "twig-cs-fixer" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -76,7 +76,8 @@ return {
|
|||
{
|
||||
"gD",
|
||||
function()
|
||||
local params = vim.lsp.util.make_position_params()
|
||||
local win = vim.api.nvim_get_current_win()
|
||||
local params = vim.lsp.util.make_position_params(win, "utf-16")
|
||||
LazyVim.lsp.execute({
|
||||
command = "typescript.goToSourceDefinition",
|
||||
arguments = { params.textDocument.uri, params.position },
|
||||
|
|
@ -232,31 +233,34 @@ return {
|
|||
},
|
||||
opts = function()
|
||||
local dap = require("dap")
|
||||
if not dap.adapters["pwa-node"] then
|
||||
require("dap").adapters["pwa-node"] = {
|
||||
type = "server",
|
||||
host = "localhost",
|
||||
port = "${port}",
|
||||
executable = {
|
||||
command = "node",
|
||||
-- 💀 Make sure to update this path to point to your installation
|
||||
args = {
|
||||
LazyVim.get_pkg_path("js-debug-adapter", "/js-debug/src/dapDebugServer.js"),
|
||||
"${port}",
|
||||
|
||||
for _, adapterType in ipairs({ "node", "chrome", "msedge" }) do
|
||||
local pwaType = "pwa-" .. adapterType
|
||||
|
||||
if not dap.adapters[pwaType] then
|
||||
dap.adapters[pwaType] = {
|
||||
type = "server",
|
||||
host = "localhost",
|
||||
port = "${port}",
|
||||
executable = {
|
||||
command = "js-debug-adapter",
|
||||
args = { "${port}" },
|
||||
},
|
||||
},
|
||||
}
|
||||
end
|
||||
if not dap.adapters["node"] then
|
||||
dap.adapters["node"] = function(cb, config)
|
||||
if config.type == "node" then
|
||||
config.type = "pwa-node"
|
||||
end
|
||||
local nativeAdapter = dap.adapters["pwa-node"]
|
||||
if type(nativeAdapter) == "function" then
|
||||
nativeAdapter(cb, config)
|
||||
else
|
||||
cb(nativeAdapter)
|
||||
}
|
||||
end
|
||||
|
||||
-- Define adapters without the "pwa-" prefix for VSCode compatibility
|
||||
if not dap.adapters[adapterType] then
|
||||
dap.adapters[adapterType] = function(cb, config)
|
||||
local nativeAdapter = dap.adapters[pwaType]
|
||||
|
||||
config.type = pwaType
|
||||
|
||||
if type(nativeAdapter) == "function" then
|
||||
nativeAdapter(cb, config)
|
||||
else
|
||||
cb(nativeAdapter)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -269,6 +273,10 @@ return {
|
|||
|
||||
for _, language in ipairs(js_filetypes) do
|
||||
if not dap.configurations[language] then
|
||||
local runtimeExecutable = nil
|
||||
if language:find("typescript") then
|
||||
runtimeExecutable = vim.fn.executable("tsx") == 1 and "tsx" or "ts-node"
|
||||
end
|
||||
dap.configurations[language] = {
|
||||
{
|
||||
type = "pwa-node",
|
||||
|
|
@ -276,6 +284,16 @@ return {
|
|||
name = "Launch file",
|
||||
program = "${file}",
|
||||
cwd = "${workspaceFolder}",
|
||||
sourceMaps = true,
|
||||
runtimeExecutable = runtimeExecutable,
|
||||
skipFiles = {
|
||||
"<node_internals>/**",
|
||||
"node_modules/**",
|
||||
},
|
||||
resolveSourceMapLocations = {
|
||||
"${workspaceFolder}/**",
|
||||
"!**/node_modules/**",
|
||||
},
|
||||
},
|
||||
{
|
||||
type = "pwa-node",
|
||||
|
|
@ -283,6 +301,16 @@ return {
|
|||
name = "Attach",
|
||||
processId = require("dap.utils").pick_process,
|
||||
cwd = "${workspaceFolder}",
|
||||
sourceMaps = true,
|
||||
runtimeExecutable = runtimeExecutable,
|
||||
skipFiles = {
|
||||
"<node_internals>/**",
|
||||
"node_modules/**",
|
||||
},
|
||||
resolveSourceMapLocations = {
|
||||
"${workspaceFolder}/**",
|
||||
"!**/node_modules/**",
|
||||
},
|
||||
},
|
||||
}
|
||||
end
|
||||
|
|
@ -290,6 +318,15 @@ return {
|
|||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"jay-babu/mason-nvim-dap.nvim",
|
||||
optional = true,
|
||||
opts = {
|
||||
-- chrome adapter is deprecated, use js-debug-adapter instead
|
||||
automatic_installation = { exclude = { "chrome" } },
|
||||
},
|
||||
},
|
||||
|
||||
-- Filetype icons
|
||||
{
|
||||
"nvim-mini/mini.icons",
|
||||
|
|
|
|||
80
lua/lazyvim/plugins/extras/lang/typst.lua
Normal file
80
lua/lazyvim/plugins/extras/lang/typst.lua
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
return {
|
||||
recommended = function()
|
||||
return LazyVim.extras.wants({
|
||||
ft = { "typst" },
|
||||
})
|
||||
end,
|
||||
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = { "typst" },
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
tinymist = {
|
||||
keys = {
|
||||
{
|
||||
"<leader>cP",
|
||||
function()
|
||||
local buf_name = vim.api.nvim_buf_get_name(0)
|
||||
local file_name = vim.fn.fnamemodify(buf_name, ":t")
|
||||
LazyVim.lsp.execute({
|
||||
command = "tinymist.pinMain",
|
||||
arguments = { buf_name },
|
||||
})
|
||||
LazyVim.info("Tinymist: Pinned " .. file_name)
|
||||
end,
|
||||
desc = "Pin main file",
|
||||
},
|
||||
},
|
||||
single_file_support = true, -- Fixes LSP attachment in non-Git directories
|
||||
settings = {
|
||||
formatterMode = "typstyle",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
optional = true,
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
typst = { "typstyle", lsp_format = "prefer" },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"chomosuke/typst-preview.nvim",
|
||||
cmd = { "TypstPreview", "TypstPreviewToggle", "TypstPreviewUpdate" },
|
||||
keys = {
|
||||
{
|
||||
"<leader>cp",
|
||||
ft = "typst",
|
||||
"<cmd>TypstPreviewToggle<cr>",
|
||||
desc = "Toggle Typst Preview",
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
dependencies_bin = {
|
||||
tinymist = "tinymist",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"folke/ts-comments.nvim",
|
||||
opts = {
|
||||
lang = {
|
||||
typst = { "// %s", "/* %s */" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -106,6 +106,7 @@ return {
|
|||
-- stylua: ignore
|
||||
keys = {
|
||||
{"<leader>t", "", desc = "+test"},
|
||||
{ "<leader>ta", function() require("neotest").run.attach() end, desc = "Attach to Test (Neotest)" },
|
||||
{ "<leader>tt", function() require("neotest").run.run(vim.fn.expand("%")) end, desc = "Run File (Neotest)" },
|
||||
{ "<leader>tT", function() require("neotest").run.run(vim.uv.cwd()) end, desc = "Run All Test Files (Neotest)" },
|
||||
{ "<leader>tr", function() require("neotest").run.run() end, desc = "Run Nearest (Neotest)" },
|
||||
|
|
|
|||
|
|
@ -32,15 +32,19 @@ return {
|
|||
end,
|
||||
})
|
||||
|
||||
Snacks.toggle({
|
||||
name = "Mini Animate",
|
||||
get = function()
|
||||
return not vim.g.minianimate_disable
|
||||
end,
|
||||
set = function(state)
|
||||
vim.g.minianimate_disable = not state
|
||||
end,
|
||||
}):map("<leader>ua")
|
||||
-- schedule setting the mapping to override the default mapping from `keymaps.lua`
|
||||
-- seems `keymaps.lua` is the last event to execute on `VeryLazy` and it overwrites it
|
||||
vim.schedule(function()
|
||||
Snacks.toggle({
|
||||
name = "Mini Animate",
|
||||
get = function()
|
||||
return not vim.g.minianimate_disable
|
||||
end,
|
||||
set = function(state)
|
||||
vim.g.minianimate_disable = not state
|
||||
end,
|
||||
}):map("<leader>ua")
|
||||
end)
|
||||
|
||||
local animate = require("mini.animate")
|
||||
return vim.tbl_deep_extend("force", opts, {
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ return {
|
|||
"mason",
|
||||
"neo-tree",
|
||||
"notify",
|
||||
"sidekick_terminal",
|
||||
"snacks_dashboard",
|
||||
"snacks_notif",
|
||||
"snacks_terminal",
|
||||
|
|
@ -44,7 +45,7 @@ return {
|
|||
end,
|
||||
},
|
||||
|
||||
-- disable inent-blankline scope when mini-indentscope is enabled
|
||||
-- disable indent-blankline scope when mini-indentscope is enabled
|
||||
{
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
optional = true,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ local pick_chezmoi = function()
|
|||
fzf_lua.actions.vimcmd_entry("ChezmoiEdit", selected, { cwd = os.getenv("HOME") })
|
||||
end,
|
||||
}
|
||||
fzf_lua.files({ cmd = "chezmoi managed --include=files,symlinks", actions = actions })
|
||||
fzf_lua.files({ cmd = "chezmoi managed --include=files,symlinks", actions = actions, hidden = false })
|
||||
elseif LazyVim.pick.picker.name == "snacks" then
|
||||
local results = require("chezmoi.commands").list({
|
||||
args = {
|
||||
|
|
|
|||
51
lua/lazyvim/plugins/extras/util/gh.lua
Normal file
51
lua/lazyvim/plugins/extras/util/gh.lua
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
return {
|
||||
|
||||
-- depends on the git extra for highlighting and auto-completion of github issues/prs
|
||||
{ import = "lazyvim.plugins.extras.lang.git" },
|
||||
|
||||
{ "ldelossa/litee.nvim", lazy = true },
|
||||
|
||||
-- gh.nvim
|
||||
{
|
||||
"ldelossa/gh.nvim",
|
||||
opts = {},
|
||||
config = function(_, opts)
|
||||
require("litee.lib").setup()
|
||||
require("litee.gh").setup(opts)
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>G", "", desc = "+Github" },
|
||||
{ "<leader>Gc", "", desc = "+Commits" },
|
||||
{ "<leader>Gcc", "<cmd>GHCloseCommit<cr>", desc = "Close" },
|
||||
{ "<leader>Gce", "<cmd>GHExpandCommit<cr>", desc = "Expand" },
|
||||
{ "<leader>Gco", "<cmd>GHOpenToCommit<cr>", desc = "Open To" },
|
||||
{ "<leader>Gcp", "<cmd>GHPopOutCommit<cr>", desc = "Pop Out" },
|
||||
{ "<leader>Gcz", "<cmd>GHCollapseCommit<cr>", desc = "Collapse" },
|
||||
{ "<leader>Gi", "", desc = "+Issues" },
|
||||
{ "<leader>Gip", "<cmd>GHPreviewIssue<cr>", desc = "Preview" },
|
||||
{ "<leader>Gio", "<cmd>GHOpenIssue<cr>", desc = "Open" },
|
||||
{ "<leader>Gl", "", desc = "+Litee" },
|
||||
{ "<leader>Glt", "<cmd>LTPanel<cr>", desc = "Toggle Panel" },
|
||||
{ "<leader>Gp", "", desc = "+Pull Request" },
|
||||
{ "<leader>Gpc", "<cmd>GHClosePR<cr>", desc = "Close" },
|
||||
{ "<leader>Gpd", "<cmd>GHPRDetails<cr>", desc = "Details" },
|
||||
{ "<leader>Gpe", "<cmd>GHExpandPR<cr>", desc = "Expand" },
|
||||
{ "<leader>Gpo", "<cmd>GHOpenPR<cr>", desc = "Open" },
|
||||
{ "<leader>Gpp", "<cmd>GHPopOutPR<cr>", desc = "PopOut" },
|
||||
{ "<leader>Gpr", "<cmd>GHRefreshPR<cr>", desc = "Refresh" },
|
||||
{ "<leader>Gpt", "<cmd>GHOpenToPR<cr>", desc = "Open To" },
|
||||
{ "<leader>Gpz", "<cmd>GHCollapsePR<cr>", desc = "Collapse" },
|
||||
{ "<leader>Gr", "", desc = "+Review" },
|
||||
{ "<leader>Grb", "<cmd>GHStartReview<cr>", desc = "Begin" },
|
||||
{ "<leader>Grc", "<cmd>GHCloseReview<cr>", desc = "Close" },
|
||||
{ "<leader>Grd", "<cmd>GHDeleteReview<cr>", desc = "Delete" },
|
||||
{ "<leader>Gre", "<cmd>GHExpandReview<cr>", desc = "Expand" },
|
||||
{ "<leader>Grs", "<cmd>GHSubmitReview<cr>", desc = "Submit" },
|
||||
{ "<leader>Grz", "<cmd>GHCollapseReview<cr>", desc = "Collapse" },
|
||||
{ "<leader>Gt", "", desc = "+Threads" },
|
||||
{ "<leader>Gtc", "<cmd>GHCreateThread<cr>", desc = "Create" },
|
||||
{ "<leader>Gtn", "<cmd>GHNextThread<cr>", desc = "Next" },
|
||||
{ "<leader>Gtt", "<cmd>GHToggleThread<cr>", desc = "Toggle" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -126,7 +126,7 @@ return {
|
|||
"goolord/alpha-nvim",
|
||||
optional = true,
|
||||
opts = function(_, dashboard)
|
||||
local button = dashboard.button("p", " " .. " Projects", pick)
|
||||
local button = dashboard.button("P", " " .. " Projects (util.project)", pick)
|
||||
button.opts.hl = "AlphaButtons"
|
||||
button.opts.hl_shortcut = "AlphaShortcut"
|
||||
table.insert(dashboard.section.buttons.val, 4, button)
|
||||
|
|
@ -139,7 +139,7 @@ return {
|
|||
opts = function(_, opts)
|
||||
local items = {
|
||||
{
|
||||
name = "Projects",
|
||||
name = "Projects (util.project)",
|
||||
action = pick,
|
||||
section = string.rep(" ", 22) .. "Telescope",
|
||||
},
|
||||
|
|
@ -157,9 +157,9 @@ return {
|
|||
end
|
||||
local projects = {
|
||||
action = pick,
|
||||
desc = " Projects",
|
||||
desc = " Projects (util.project)",
|
||||
icon = " ",
|
||||
key = "p",
|
||||
key = "P",
|
||||
}
|
||||
|
||||
projects.desc = projects.desc .. string.rep(" ", 43 - #projects.desc)
|
||||
|
|
@ -175,9 +175,9 @@ return {
|
|||
opts = function(_, opts)
|
||||
table.insert(opts.dashboard.preset.keys, 3, {
|
||||
action = pick,
|
||||
desc = "Projects",
|
||||
desc = "Projects (util.project)",
|
||||
icon = " ",
|
||||
key = "p",
|
||||
key = "P",
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -8,10 +8,11 @@ return {
|
|||
"mistweaverco/kulala.nvim",
|
||||
ft = "http",
|
||||
keys = {
|
||||
{ "<leader>R", "", desc = "+Rest", ft = "http" },
|
||||
{ "<leader>Rb", "<cmd>lua require('kulala').scratchpad()<cr>", desc = "Open scratchpad", ft = "http" },
|
||||
{ "<leader>R", "", desc = "+Rest" },
|
||||
{ "<leader>Rb", "<cmd>lua require('kulala').scratchpad()<cr>", desc = "Open scratchpad" },
|
||||
{ "<leader>Rc", "<cmd>lua require('kulala').copy()<cr>", desc = "Copy as cURL", ft = "http" },
|
||||
{ "<leader>RC", "<cmd>lua require('kulala').from_curl()<cr>", desc = "Paste from curl", ft = "http" },
|
||||
{ "<leader>Re", "<cmd>lua require('kulala').set_selected_env()<cr>", desc = "Set environment", ft = "http" },
|
||||
{
|
||||
"<leader>Rg",
|
||||
"<cmd>lua require('kulala').download_graphql_schema()<cr>",
|
||||
|
|
@ -22,7 +23,7 @@ return {
|
|||
{ "<leader>Rn", "<cmd>lua require('kulala').jump_next()<cr>", desc = "Jump to next request", ft = "http" },
|
||||
{ "<leader>Rp", "<cmd>lua require('kulala').jump_prev()<cr>", desc = "Jump to previous request", ft = "http" },
|
||||
{ "<leader>Rq", "<cmd>lua require('kulala').close()<cr>", desc = "Close window", ft = "http" },
|
||||
{ "<leader>Rr", "<cmd>lua require('kulala').replay()<cr>", desc = "Replay the last request", ft = "http" },
|
||||
{ "<leader>Rr", "<cmd>lua require('kulala').replay()<cr>", desc = "Replay the last request" },
|
||||
{ "<leader>Rs", "<cmd>lua require('kulala').run()<cr>", desc = "Send the request", ft = "http" },
|
||||
{ "<leader>RS", "<cmd>lua require('kulala').show_stats()<cr>", desc = "Show stats", ft = "http" },
|
||||
{ "<leader>Rt", "<cmd>lua require('kulala').toggle_view()<cr>", desc = "Toggle headers/body", ft = "http" },
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ local enabled = {
|
|||
}
|
||||
|
||||
local Config = require("lazy.core.config")
|
||||
local vscode = require("vscode")
|
||||
Config.options.checker.enabled = false
|
||||
Config.options.change_detection.enabled = false
|
||||
Config.options.defaults.cond = function(plugin)
|
||||
|
|
@ -36,23 +37,30 @@ vim.api.nvim_create_autocmd("User", {
|
|||
callback = function()
|
||||
-- VSCode-specific keymaps for search and navigation
|
||||
vim.keymap.set("n", "<leader><space>", "<cmd>Find<cr>")
|
||||
vim.keymap.set("n", "<leader>/", [[<cmd>lua require('vscode').action('workbench.action.findInFiles')<cr>]])
|
||||
vim.keymap.set("n", "<leader>ss", [[<cmd>lua require('vscode').action('workbench.action.gotoSymbol')<cr>]])
|
||||
vim.keymap.set("n", "<leader>/", function()
|
||||
vscode.call("workbench.action.findInFiles")
|
||||
end)
|
||||
vim.keymap.set("n", "<leader>ss", function()
|
||||
vscode.call("workbench.action.gotoSymbol")
|
||||
end)
|
||||
|
||||
-- Keep undo/redo lists in sync with VsCode
|
||||
vim.keymap.set("n", "u", "<Cmd>call VSCodeNotify('undo')<CR>")
|
||||
vim.keymap.set("n", "<C-r>", "<Cmd>call VSCodeNotify('redo')<CR>")
|
||||
-- Toggle VS Code integrated terminal
|
||||
for _, lhs in ipairs({ "<leader>ft", "<leader>fT", "<c-/>" }) do
|
||||
vim.keymap.set("n", lhs, function()
|
||||
vscode.call("workbench.action.terminal.toggleTerminal")
|
||||
end)
|
||||
end
|
||||
|
||||
-- Navigate VSCode tabs like lazyvim buffers
|
||||
vim.keymap.set("n", "<S-h>", "<Cmd>call VSCodeNotify('workbench.action.previousEditor')<CR>")
|
||||
vim.keymap.set("n", "<S-l>", "<Cmd>call VSCodeNotify('workbench.action.nextEditor')<CR>")
|
||||
vim.keymap.set("n", "<S-h>", function()
|
||||
vscode.call("workbench.action.previousEditor")
|
||||
end)
|
||||
vim.keymap.set("n", "<S-l>", function()
|
||||
vscode.call("workbench.action.nextEditor")
|
||||
end)
|
||||
end,
|
||||
})
|
||||
|
||||
function LazyVim.terminal()
|
||||
require("vscode").action("workbench.action.terminal.toggleTerminal")
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
"snacks.nvim",
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ return {
|
|||
function()
|
||||
require("conform").format({ formatters = { "injected" }, timeout_ms = 3000 })
|
||||
end,
|
||||
mode = { "n", "v" },
|
||||
mode = { "n", "x" },
|
||||
desc = "Format Injected Langs",
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ return {
|
|||
|
||||
-- highlighting
|
||||
if enabled("highlight", "highlights") then
|
||||
pcall(vim.treesitter.start)
|
||||
pcall(vim.treesitter.start, ev.buf)
|
||||
end
|
||||
|
||||
-- indents
|
||||
|
|
|
|||
|
|
@ -25,12 +25,29 @@ end
|
|||
local extras = {} ---@type string[]
|
||||
local defaults = LazyVim.config.get_defaults()
|
||||
|
||||
local changed = false
|
||||
local updated = {} ---@type string[]
|
||||
|
||||
-- Add extras from LazyExtras that are not disabled
|
||||
for _, extra in ipairs(LazyVim.config.json.data.extras) do
|
||||
local def = defaults[extra]
|
||||
if not (def and def.enabled == false) then
|
||||
extras[#extras + 1] = extra
|
||||
if LazyVim.plugin.renamed_extras[extra] then
|
||||
extra = LazyVim.plugin.renamed_extras[extra]
|
||||
changed = true
|
||||
end
|
||||
if LazyVim.plugin.deprecated_extras[extra] then
|
||||
changed = true
|
||||
else
|
||||
updated[#updated + 1] = extra
|
||||
local def = defaults[extra]
|
||||
if not (def and def.enabled == false) then
|
||||
extras[#extras + 1] = extra
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if changed then
|
||||
LazyVim.config.json.data.extras = updated
|
||||
LazyVim.json.save()
|
||||
end
|
||||
|
||||
-- Add default extras
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@ M.deprecated_extras = {
|
|||
Either use `basedpyright`, or copy the [old extra](https://github.com/LazyVim/LazyVim/blob/c1f5fcf9c7ed2659c9d5ac41b3bb8a93e0a3c6a0/lua/lazyvim/plugins/extras/lang/python-semshi.lua#L1) to your own config.
|
||||
]],
|
||||
}
|
||||
M.renamed_extras = {
|
||||
["lazyvim.plugins.extras.lang.omnisharp"] = "lazyvim.plugins.extras.lang.dotnet",
|
||||
}
|
||||
|
||||
M.deprecated_modules = {}
|
||||
|
||||
|
|
@ -94,6 +97,18 @@ function M.fix_imports()
|
|||
return false
|
||||
end
|
||||
end
|
||||
local rename = M.renamed_extras[spec.import]
|
||||
if rename then
|
||||
LazyVim.warn(
|
||||
("The extra `%s` was renamed to `%s`.\nPlease update your config for `%s`"):format(
|
||||
spec.import,
|
||||
rename,
|
||||
spec.importing or "LazyVim"
|
||||
),
|
||||
{ title = "LazyVim" }
|
||||
)
|
||||
spec.import = rename
|
||||
end
|
||||
local dep = M.deprecated_extras[spec and spec.import]
|
||||
if dep then
|
||||
dep = dep .. "\n" .. "Please remove the extra from `lazyvim.json` to hide this warning."
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
---@module 'luassert'
|
||||
---@module 'lazy'
|
||||
|
||||
local Icons = require("mini.icons")
|
||||
|
||||
|
|
@ -26,8 +27,15 @@ describe("Extra", function()
|
|||
return not vim.tbl_contains(ignore, extra.modname)
|
||||
end, extras)
|
||||
|
||||
require("mason").setup()
|
||||
local mr = require("mason-registry")
|
||||
mr.refresh()
|
||||
|
||||
local lsp_to_pkg = {}
|
||||
lsp_to_pkg = require("mason-lspconfig.mappings").get_mason_map().lspconfig_to_package
|
||||
it("can get lspconfig to package map", function()
|
||||
assert(not vim.tbl_isempty(lsp_to_pkg), "Could not get lspconfig to package map")
|
||||
end)
|
||||
|
||||
local tsspec = Plugin.Spec.new({
|
||||
import = "lazyvim.plugins.treesitter",
|
||||
|
|
@ -65,6 +73,17 @@ describe("Extra", function()
|
|||
{ "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = {} } },
|
||||
mod,
|
||||
}, { optional = true })
|
||||
|
||||
it("it has no renamed plugins", function()
|
||||
for _, p in pairs(spec.plugins) do
|
||||
local short_url = p[1]
|
||||
assert(
|
||||
not LazyVim.plugin.renames[short_url],
|
||||
"Plugin " .. short_url .. " has been renamed to " .. (LazyVim.plugin.renames[short_url] or "")
|
||||
)
|
||||
end
|
||||
end)
|
||||
|
||||
local lspconfig = spec.plugins["nvim-lspconfig"]
|
||||
if lspconfig then
|
||||
it("does not install LSP servers with mason.nvim", function()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue