Compare commits

..

115 Commits

Author SHA1 Message Date
c42ebc216a chore(main): release 2.12.1 (#685)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-28 15:26:43 +02:00
bdddb215cc chore(build): auto-generate vimdoc 2023-04-28 09:48:21 +00:00
eb143ebe11 fix(format): only do null-ls formatting logic when null-ls is availble. Fixes #684 2023-04-28 11:47:37 +02:00
86ac9989ea chore(build): auto-generate vimdoc 2023-04-25 07:13:27 +00:00
dc1d48f436 style: Change description of notify.dismiss() binding (#675) 2023-04-25 09:12:41 +02:00
5202a0f006 chore(main): release 2.12.0 (#671)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-24 20:47:45 +02:00
7b9145c12d fix(spectre): use new url by default 2023-04-24 08:45:40 +02:00
3e46dd61cd feat(bufferline): use mini.bufremove to close a buffer (#670)
* feat(bufferline): use `mini.bufremove` to close a buffer

* fix(bufferline): don't force remove buffers

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2023-04-24 08:40:57 +02:00
43763a6226 chore(build): auto-generate vimdoc 2023-04-24 06:39:25 +00:00
6c334fed6a feat(telescope): added keymap for recent files in the current directory. (#669)
* Support MRU in current directory.

* Update editor.lua

* fix(telescope): use cwd for oldfiles for consistency with other commands

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2023-04-24 08:38:42 +02:00
d18331ca89 chore(main): release 2.11.0 (#664)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-23 11:21:54 +02:00
59f3b3e096 feat(plugins): automatically handle plugin repo renames 2023-04-23 11:20:02 +02:00
J
4fbb7a2803 fix(health): remove deprecated api warning (#666) 2023-04-23 11:04:05 +02:00
b760ec63c4 chore(build): auto-generate vimdoc 2023-04-23 09:02:33 +00:00
d565684ade feat(lsp): automatically resolve denols/tsserver conflicts if both are configured 2023-04-23 11:01:46 +02:00
c7aeda9db1 chore(build): auto-generate vimdoc 2023-04-22 21:07:31 +00:00
3a718c5c85 feat(dap): Change DAP REPL binding from open to toggle (#663) 2023-04-22 23:06:55 +02:00
6c86952a0e chore(main): release 2.10.0 (#659)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-21 23:53:51 +02:00
ad214af54d feat(neo-tree): refresh neotree git status when closing a lazygit terminal 2023-04-21 23:42:30 +02:00
40983a3269 fix(copilot): re-enable copilot confirm with overwrite 2023-04-21 23:42:30 +02:00
2f93f69171 chore(main): release 2.9.0 (#655)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-21 18:30:09 +02:00
4379ae8ab9 fix(copilot): work-around Neovim bug. Fixes #656 2023-04-21 18:27:15 +02:00
eb92903342 feat(tsserver): set some tsserver formatting settings to their Neovim equivalents. Also used for organize imports 2023-04-21 16:50:12 +02:00
03282126e3 chore(main): release 2.8.0 (#652)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-21 09:25:43 +02:00
1274310e6d feat(copilot): better copilot status colors for lualine 2023-04-21 09:24:12 +02:00
14e708a246 fix: remove unintentional <lt>nop> mapping (#651) 2023-04-21 09:21:34 +02:00
437156a3ae chore(main): release 2.7.0 (#650)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-21 08:59:45 +02:00
063f8d6dff chore(build): auto-generate vimdoc 2023-04-21 06:47:24 +00:00
d63c471008 feat(copilot): added lualine component for copilot. Simple icon colored by status. Will add status message when available (warnings) 2023-04-21 08:46:45 +02:00
4042614005 refactor: move lualine fg function to Util 2023-04-21 08:46:05 +02:00
81ab5bed7a chore(main): release 2.6.0 (#638)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-20 09:27:37 +02:00
5264909b54 fix(project): load on VeryLazy otherwise projects wont be loaded when opening Telescope 2023-04-20 08:29:22 +02:00
68c21ec452 chore(build): auto-generate vimdoc 2023-04-20 06:15:00 +00:00
7fe0d5c7c7 feat(extras): added project management (#300)
* feat(project): add project management

* refactor: moved project to extras

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2023-04-20 08:14:21 +02:00
342fa02370 chore(main): release 2.5.0 (#635)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-19 20:04:23 +02:00
ac1051686b feat(lsp): added support for setting global lsp client capabilities 2023-04-19 19:58:05 +02:00
55cc8b67fc chore(main): release 2.4.3 (#630)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-19 17:07:32 +02:00
1d2c97cbda fix(treesitter): de-duplicate langs in endure_installed. Fixes #628 2023-04-19 16:45:02 +02:00
0b8c799a7a chore(main): release 2.4.2 (#623)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-19 07:52:26 +02:00
1caa27ba4a fix(diagnostics): deepcopy diagnostic params. Fixes #621 2023-04-19 07:49:39 +02:00
3518c1d73b chore(main): release 2.4.1 (#622)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-19 07:23:42 +02:00
ae8c371ff4 chore(build): auto-generate vimdoc 2023-04-19 05:22:38 +00:00
17fe32e428 fix(lsp): properly check that diagnostics virtual_text is a table. Fixes #618 2023-04-19 07:21:52 +02:00
ef21bea975 chore(main): release 2.4.0 (#614)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-18 20:30:46 +02:00
38ad79d548 feat(dap): add more keybindings and lualine component (#612)
* feat(dap): add more keybindings and lualine component

* refactor(dap): changed some keymaps and sorted them

* refactor(lualine): added extra space for dap icon

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2023-04-18 20:23:39 +02:00
95b86c8d1d chore(build): auto-generate vimdoc 2023-04-18 18:01:24 +00:00
01a1b8e80d feat(diagnostics): added support for setting prefix = "icons". Check the docs on how to enable 2023-04-18 20:00:02 +02:00
06c38c52a9 feat(diagnostics): show diagnostics source when more than one source is reporting diagnostics 2023-04-18 19:59:19 +02:00
77efbe8bcf chore(main): release 2.3.0 (#606)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-17 20:53:26 +02:00
cfaf3b054e feat(dap): add step out, rebind step over (#605) 2023-04-17 17:53:39 +02:00
5f6913c0db chore(main): release 2.2.1 (#601)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-17 08:51:54 +02:00
a94f7afdeb fix(telescope): typo 2023-04-17 08:49:38 +02:00
b391c37e53 chore(main): release 2.2.0 (#595)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-17 08:31:16 +02:00
338680d80a chore(build): auto-generate vimdoc 2023-04-17 05:34:39 +00:00
df9547f432 fix(telescope): consistent keymap description. Fixes #600 2023-04-17 07:33:55 +02:00
0155de00ab feat(noice): added keymap to dismiss all noice messages 2023-04-16 23:08:46 +02:00
0cb8974221 fix(lsp): gT => gy. keymap for goto type definition. Fixes #554 2023-04-16 22:35:14 +02:00
700cdaf30d chore(main): release 2.1.0 (#594)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-16 22:05:08 +02:00
feaeab9fca fix(dap): added DapInstall and DapUninstall to cmds 2023-04-16 21:56:38 +02:00
54846ff763 docs: add extras keymaps to keymaps 2023-04-16 21:50:48 +02:00
f562d1d197 feat(dap): added extra for dap nlua 2023-04-16 21:35:52 +02:00
bc14e02a1f feat: added extra for dap 2023-04-16 21:35:38 +02:00
df94a044ec feat(which-key): easier integration for which-key group names 2023-04-16 21:33:55 +02:00
29ec138f8e chore(main): release 2.0.0 (#588)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-16 14:17:09 +02:00
98775f5631 feat(telescope): add document/workspace diagnostics and todo/fixme telescope keymaps (#557) 2023-04-16 14:15:34 +02:00
36aa64bc0b build: deprecated treesitter method 2023-04-16 11:35:35 +02:00
02c5e8d953 fix(config): options cant be disabled with lazyvim config. Fixes #566 2023-04-16 11:34:35 +02:00
a9e9204dae fix(lazygit): dont use <esc><esc> for normal more for laygit to prevent delays on <esc>. Fixes #567 2023-04-16 11:18:44 +02:00
2d8116ef67 fix(lsp): gt -> gT. Fixes #554 2023-04-16 11:03:54 +02:00
bef36bb2fd fix(format): ignore vim.b.autoformat when formatting using key bindings. Fixes #575 2023-04-16 10:48:07 +02:00
a099b2d3ab feat(keymaps): Get rename command from inc_rename configuration (#579)
Gets the rename command from the inc_rename module (when installed), rather than assuming the default `IncRename`, allowing the user to modify the inc_rename options without having to create a new keymap.
2023-04-16 10:43:14 +02:00
1defd5f670 feat(autocmds): add checkhealth filetype to close_with_q list (#512) 2023-04-16 10:39:12 +02:00
6e01e8560e feat(telescope): use the new dynamic workspace symbols (#577)
`lsp_workspace_symbols` may fail or return nothing when query is empty.
Use the new `lsp_dynamic_workspace_symbols` to dynamically query symbols
in the workspace.

Related: https://github.com/nvim-telescope/telescope.nvim/issues/964
Fixes: https://github.com/LazyVim/LazyVim/issues/576
2023-04-16 10:25:20 +02:00
7691daa036 chore(build): auto-generate vimdoc 2023-04-16 05:54:27 +00:00
7476da7811 fix(autocmds): don't auto create dirs for urls. Fixes #583 2023-04-16 07:53:42 +02:00
1c06aa35ee chore(build): auto-generate vimdoc 2023-04-15 21:12:09 +00:00
078250a114 refactor(treesitter)!: rename help to vimdoc (#521) 2023-04-15 23:11:29 +02:00
7ce1b1519a chore(main): release 1.24.0 (#510)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-31 13:17:00 +02:00
79fe0455a0 feat(lualine): added lazy extension 2023-03-31 13:05:36 +02:00
a6062758d2 chore(build): auto-generate vimdoc 2023-03-31 07:41:46 +00:00
ed48b85dbe feat(autocmds): add auto create dir (#493)
* feat(autocmds): add auto create dir

* refactor: auto-create dir

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2023-03-31 09:40:57 +02:00
f67f20184f chore(main): release 1.23.0 (#492)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-25 09:57:40 +01:00
7048619cc1 chore(build): auto-generate vimdoc 2023-03-25 08:43:47 +00:00
59eb19835f feat(treesitter): use Python indents as they've improved greatly (#490) 2023-03-25 09:42:57 +01:00
c4572fcec8 chore(main): release 1.22.0 (#468)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-23 08:12:56 +01:00
c272cb2940 chore(build): auto-generate vimdoc 2023-03-23 07:01:09 +00:00
381ee0a9fc fix(mason): removed flake8. You can add it back in your own configs if you need it or add ruff_lsp 2023-03-23 08:00:24 +01:00
b48a1969d3 chore(build): auto-generate vimdoc 2023-03-22 08:03:44 +00:00
b0cef1f506 fix(autocmd): remove query from q-to-quit autocmd (#473) 2023-03-22 09:03:02 +01:00
049c84509c chore(build): auto-generate vimdoc 2023-03-21 06:27:56 +00:00
ade4342c42 feat(treesitter): add luadoc (#469) 2023-03-21 07:27:13 +01:00
18328d10c9 chore(build): auto-generate vimdoc 2023-03-20 18:57:14 +00:00
df5cbfdbec feat(mason): compatibility with the new mason registry 2023-03-20 19:56:34 +01:00
11d414c358 chore: update templates 2023-03-19 20:40:58 +01:00
7a8ca6222a chore(main): release 1.21.2 (#463)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-19 08:15:14 +01:00
db66353db9 chore(build): auto-generate vimdoc 2023-03-19 06:59:41 +00:00
a7b25e13fa fix(alpha): use AlphaFooter highlight for footer section (#461) 2023-03-19 07:58:51 +01:00
a0b1256554 chore(main): release 1.21.1 (#451)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-17 22:31:38 +01:00
501474e421 fix(config): compat with lazy.nvim 2023-03-17 22:29:07 +01:00
b984c0cff5 chore(main): release 1.21.0 (#449)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-17 16:44:09 +01:00
9f5a0f1bd8 feat(lsp): added keymap to see source actions with <leader>cA (useful for tsserver and others) 2023-03-17 16:29:32 +01:00
d0b378f427 chore(main): release 1.20.0 (#442)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-17 08:16:40 +01:00
aa4f7ec651 chore(build): auto-generate vimdoc 2023-03-17 07:05:01 +00:00
c10e550639 feat(lsp): make lsp work when mason-lspconfig is disabled. Fixed #445 2023-03-17 08:04:17 +01:00
f0b548af2f chore(build): auto-generate vimdoc 2023-03-16 11:17:38 +00:00
Lc
cec000dfd8 fix(icons): replace obsolete icons (#441)
* fix(icons): replace obsolete icons

* fix(icons): bigger icons

* fix(icons): bigger folder icon

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2023-03-16 12:16:55 +01:00
6b740fd300 chore(main): release 1.19.0 (#422)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-14 11:23:08 +01:00
564e25a277 chore(build): auto-generate vimdoc 2023-03-14 10:18:08 +00:00
df6ac591ba fix(core): set cond=true for LazyVim 2023-03-14 11:17:07 +01:00
bcdcfab020 feat(mini-starter): add Session restore to starter menu (#421)
This mirrors the menu item added in alpha-nvim. I named this "Session
restore" rather than "Restore session", since mini.starter uses the
first letter of the item as the shortcut key.  This way it doesn't
conflict with "Recent files"
2023-03-12 23:00:20 +01:00
8bb0c9ddd8 chore(main): release 1.18.2 (#415)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-12 09:26:52 +01:00
0bed79f844 chore(build): auto-generate vimdoc 2023-03-12 08:12:43 +00:00
a28885be3f fix(lsp): allow silent=false for lsp keymaps. Fixes #414 2023-03-12 09:10:45 +01:00
f5e010d887 chore(main): release 1.18.1 (#407)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-10 13:58:49 +01:00
9f30a2e03a fix(prettier): extend ensure_installed instead of overwriting it. Fixes #406 2023-03-10 13:55:06 +01:00
25 changed files with 771 additions and 102 deletions

View File

@ -16,7 +16,7 @@ body:
required: true
- label: I have searched the existing issues of LazyVim
required: true
- label: I have searched the exsiting issues of plugins related to this issue
- label: I have searched the existing issues of plugins related to this issue
required: true
- type: input
attributes:
@ -59,6 +59,7 @@ body:
value: |
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name

View File

@ -15,8 +15,12 @@ jobs:
- name: Install Neovim
shell: bash
run: |
wget -q https://github.com/neovim/neovim/releases/download/nightly/nvim-linux64.deb -O /tmp/nvim.deb
sudo dpkg -i /tmp/nvim.deb
mkdir -p /tmp/nvim
wget -q https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage -O /tmp/nvim/nvim.appimage
cd /tmp/nvim
chmod a+x ./nvim.appimage
./nvim.appimage --appimage-extract
echo "/tmp/nvim/squashfs-root/usr/bin/" >> $GITHUB_PATH
- name: Run Tests
run: |
nvim --version
@ -55,7 +59,7 @@ jobs:
with:
release-type: simple
package-name: LazyVim
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: tag stable versions
if: ${{ steps.release.outputs.release_created }}
run: |

View File

@ -1,5 +1,288 @@
# Changelog
## [2.12.1](https://github.com/LazyVim/LazyVim/compare/v2.12.0...v2.12.1) (2023-04-28)
### Bug Fixes
* **format:** only do null-ls formatting logic when null-ls is availble. Fixes [#684](https://github.com/LazyVim/LazyVim/issues/684) ([eb143eb](https://github.com/LazyVim/LazyVim/commit/eb143ebe110995fb208fc480958a55858944c5f9))
## [2.12.0](https://github.com/LazyVim/LazyVim/compare/v2.11.0...v2.12.0) (2023-04-24)
### Features
* **bufferline:** use `mini.bufremove` to close a buffer ([#670](https://github.com/LazyVim/LazyVim/issues/670)) ([3e46dd6](https://github.com/LazyVim/LazyVim/commit/3e46dd61cdc79bbb915f81e4188fc5337cd2f84b))
* **telescope:** added keymap for recent files in the current directory. ([#669](https://github.com/LazyVim/LazyVim/issues/669)) ([6c334fe](https://github.com/LazyVim/LazyVim/commit/6c334fed6a59f6b1dc3a38f6253f2b4265557f30))
### Bug Fixes
* **spectre:** use new url by default ([7b9145c](https://github.com/LazyVim/LazyVim/commit/7b9145c12d15a81e40a721974a9a68994ccd8855))
## [2.11.0](https://github.com/LazyVim/LazyVim/compare/v2.10.0...v2.11.0) (2023-04-23)
### Features
* **dap:** Change DAP REPL binding from open to toggle ([#663](https://github.com/LazyVim/LazyVim/issues/663)) ([3a718c5](https://github.com/LazyVim/LazyVim/commit/3a718c5c85e966e2751dade0006dcbeed72e8b00))
* **lsp:** automatically resolve denols/tsserver conflicts if both are configured ([d565684](https://github.com/LazyVim/LazyVim/commit/d565684ade6e04eb77319ddb5becac9c5bd21cc4))
* **plugins:** automatically handle plugin repo renames ([59f3b3e](https://github.com/LazyVim/LazyVim/commit/59f3b3e096280629a459054bc5538c058854dffc))
### Bug Fixes
* **health:** remove deprecated api warning ([#666](https://github.com/LazyVim/LazyVim/issues/666)) ([4fbb7a2](https://github.com/LazyVim/LazyVim/commit/4fbb7a280310a6ea500509aa73a4f7c7d06f6bea))
## [2.10.0](https://github.com/LazyVim/LazyVim/compare/v2.9.0...v2.10.0) (2023-04-21)
### Features
* **neo-tree:** refresh neotree git status when closing a lazygit terminal ([ad214af](https://github.com/LazyVim/LazyVim/commit/ad214af54d47e67aa8be46ae12cbe7c71da0c0bf))
### Bug Fixes
* **copilot:** re-enable copilot confirm with overwrite ([40983a3](https://github.com/LazyVim/LazyVim/commit/40983a326952e24512f0eacc5b524337044ed3ff))
## [2.9.0](https://github.com/LazyVim/LazyVim/compare/v2.8.0...v2.9.0) (2023-04-21)
### Features
* **tsserver:** set some tsserver formatting settings to their Neovim equivalents. Also used for organize imports ([eb92903](https://github.com/LazyVim/LazyVim/commit/eb92903342a7ac12185c62bb63b5caa4c80ce7dc))
### Bug Fixes
* **copilot:** work-around Neovim bug. Fixes [#656](https://github.com/LazyVim/LazyVim/issues/656) ([4379ae8](https://github.com/LazyVim/LazyVim/commit/4379ae8ab9aec497e58eeae733a0a87c70289570))
## [2.8.0](https://github.com/LazyVim/LazyVim/compare/v2.7.0...v2.8.0) (2023-04-21)
### Features
* **copilot:** better copilot status colors for lualine ([1274310](https://github.com/LazyVim/LazyVim/commit/1274310e6da0de56da92ae8e26c8f388cf314a5b))
### Bug Fixes
* remove unintentional `&lt;lt&gt;nop>` mapping ([#651](https://github.com/LazyVim/LazyVim/issues/651)) ([14e708a](https://github.com/LazyVim/LazyVim/commit/14e708a24642cf3926b9b74743c192c3b5c63f3e))
## [2.7.0](https://github.com/LazyVim/LazyVim/compare/v2.6.0...v2.7.0) (2023-04-21)
### Features
* **copilot:** added lualine component for copilot. Simple icon colored by status. Will add status message when available (warnings) ([d63c471](https://github.com/LazyVim/LazyVim/commit/d63c4710083cd2bcab104972bd4a6b3d1b80c3c6))
## [2.6.0](https://github.com/LazyVim/LazyVim/compare/v2.5.0...v2.6.0) (2023-04-20)
### Features
* **extras:** added project management ([#300](https://github.com/LazyVim/LazyVim/issues/300)) ([7fe0d5c](https://github.com/LazyVim/LazyVim/commit/7fe0d5c7c798e2a1d6abf7d43380876a268ac462))
### Bug Fixes
* **project:** load on VeryLazy otherwise projects wont be loaded when opening Telescope ([5264909](https://github.com/LazyVim/LazyVim/commit/5264909b542da1c6215e042c62903bb491a2c1eb))
## [2.5.0](https://github.com/LazyVim/LazyVim/compare/v2.4.3...v2.5.0) (2023-04-19)
### Features
* **lsp:** added support for setting global lsp client capabilities ([ac10516](https://github.com/LazyVim/LazyVim/commit/ac1051686bcff8377f1d99228bcbe64530ec384a))
## [2.4.3](https://github.com/LazyVim/LazyVim/compare/v2.4.2...v2.4.3) (2023-04-19)
### Bug Fixes
* **treesitter:** de-duplicate langs in endure_installed. Fixes [#628](https://github.com/LazyVim/LazyVim/issues/628) ([1d2c97c](https://github.com/LazyVim/LazyVim/commit/1d2c97cbda099c76ee132ee5019a3f80fd88f8ed))
## [2.4.2](https://github.com/LazyVim/LazyVim/compare/v2.4.1...v2.4.2) (2023-04-19)
### Bug Fixes
* **diagnostics:** deepcopy diagnostic params. Fixes [#621](https://github.com/LazyVim/LazyVim/issues/621) ([1caa27b](https://github.com/LazyVim/LazyVim/commit/1caa27ba4acb04ebbc64a91de242574790dcf92f))
## [2.4.1](https://github.com/LazyVim/LazyVim/compare/v2.4.0...v2.4.1) (2023-04-19)
### Bug Fixes
* **lsp:** properly check that diagnostics virtual_text is a table. Fixes [#618](https://github.com/LazyVim/LazyVim/issues/618) ([17fe32e](https://github.com/LazyVim/LazyVim/commit/17fe32e428bbade6f91770814e8748425bfc01a2))
## [2.4.0](https://github.com/LazyVim/LazyVim/compare/v2.3.0...v2.4.0) (2023-04-18)
### Features
* **dap:** add more keybindings and lualine component ([#612](https://github.com/LazyVim/LazyVim/issues/612)) ([38ad79d](https://github.com/LazyVim/LazyVim/commit/38ad79d5485c083afdb04b1fb9f9683403a6d7bd))
* **diagnostics:** added support for setting prefix = "icons". Check the docs on how to enable ([01a1b8e](https://github.com/LazyVim/LazyVim/commit/01a1b8e80db55963f281cf36674cf1c174e2f50e))
* **diagnostics:** show diagnostics source when more than one source is reporting diagnostics ([06c38c5](https://github.com/LazyVim/LazyVim/commit/06c38c52a91bb1dcc2dec2d79d6e13606324be77))
## [2.3.0](https://github.com/LazyVim/LazyVim/compare/v2.2.1...v2.3.0) (2023-04-17)
### Features
* **dap:** add step out, rebind step over ([#605](https://github.com/LazyVim/LazyVim/issues/605)) ([cfaf3b0](https://github.com/LazyVim/LazyVim/commit/cfaf3b054e1a68ea0f7a73d51a0f6c27395198e9))
## [2.2.1](https://github.com/LazyVim/LazyVim/compare/v2.2.0...v2.2.1) (2023-04-17)
### Bug Fixes
* **telescope:** typo ([a94f7af](https://github.com/LazyVim/LazyVim/commit/a94f7afdebc56338b5552de11561646d8ef4b5be))
## [2.2.0](https://github.com/LazyVim/LazyVim/compare/v2.1.0...v2.2.0) (2023-04-17)
### Features
* **noice:** added keymap to dismiss all noice messages ([0155de0](https://github.com/LazyVim/LazyVim/commit/0155de00ab76e7ffc1d8232c10121f24c4e84cd9))
### Bug Fixes
* **lsp:** gT =&gt; gy. keymap for goto type definition. Fixes [#554](https://github.com/LazyVim/LazyVim/issues/554) ([0cb8974](https://github.com/LazyVim/LazyVim/commit/0cb89742216d4c73fa944ab9e2fcd21793ed7a78))
* **telescope:** consistent keymap description. Fixes [#600](https://github.com/LazyVim/LazyVim/issues/600) ([df9547f](https://github.com/LazyVim/LazyVim/commit/df9547f43223fd89ccc7c1fa5088623ca3c2cfd4))
## [2.1.0](https://github.com/LazyVim/LazyVim/compare/v2.0.0...v2.1.0) (2023-04-16)
### Features
* added extra for dap ([bc14e02](https://github.com/LazyVim/LazyVim/commit/bc14e02a1ff43f1a69d2a6755faeec8a5ec26ac9))
* **dap:** added extra for dap nlua ([f562d1d](https://github.com/LazyVim/LazyVim/commit/f562d1d19761c3419380c3b175fd00a440ff0932))
* **which-key:** easier integration for which-key group names ([df94a04](https://github.com/LazyVim/LazyVim/commit/df94a044ec656c456067b550531a62e80a5be420))
### Bug Fixes
* **dap:** added DapInstall and DapUninstall to cmds ([feaeab9](https://github.com/LazyVim/LazyVim/commit/feaeab9fcabf005cbf18b846d2ab0129a73837a9))
## [2.0.0](https://github.com/LazyVim/LazyVim/compare/v1.24.0...v2.0.0) (2023-04-16)
### ⚠ BREAKING CHANGES
* **treesitter:** rename help to vimdoc ([#521](https://github.com/LazyVim/LazyVim/issues/521))
### Features
* **autocmds:** add checkhealth filetype to close_with_q list ([#512](https://github.com/LazyVim/LazyVim/issues/512)) ([1defd5f](https://github.com/LazyVim/LazyVim/commit/1defd5f67008c695a7d99d72bc50432de5eaed3a))
* **keymaps:** Get rename command from inc_rename configuration ([#579](https://github.com/LazyVim/LazyVim/issues/579)) ([a099b2d](https://github.com/LazyVim/LazyVim/commit/a099b2d3ab3ff3bafb075c101e2b2a48b44fe869))
* **telescope:** add document/workspace diagnostics and todo/fixme telescope keymaps ([#557](https://github.com/LazyVim/LazyVim/issues/557)) ([98775f5](https://github.com/LazyVim/LazyVim/commit/98775f56312110c640be7e9d43ecc766a116427a))
* **telescope:** use the new dynamic workspace symbols ([#577](https://github.com/LazyVim/LazyVim/issues/577)) ([6e01e85](https://github.com/LazyVim/LazyVim/commit/6e01e8560e4ca197bc56666e9b969fe75d91b310))
### Bug Fixes
* **autocmds:** don't auto create dirs for urls. Fixes [#583](https://github.com/LazyVim/LazyVim/issues/583) ([7476da7](https://github.com/LazyVim/LazyVim/commit/7476da78117b032bc34d0130e6b1f9c7eea77073))
* **config:** options cant be disabled with lazyvim config. Fixes [#566](https://github.com/LazyVim/LazyVim/issues/566) ([02c5e8d](https://github.com/LazyVim/LazyVim/commit/02c5e8d953fff68b832a8f22a83428bd229ddc59))
* **format:** ignore vim.b.autoformat when formatting using key bindings. Fixes [#575](https://github.com/LazyVim/LazyVim/issues/575) ([bef36bb](https://github.com/LazyVim/LazyVim/commit/bef36bb2fd7493828529ed49a071d240602b164d))
* **lazygit:** dont use `&lt;esc&gt;<esc>` for normal more for laygit to prevent delays on `<esc>`. Fixes [#567](https://github.com/LazyVim/LazyVim/issues/567) ([a9e9204](https://github.com/LazyVim/LazyVim/commit/a9e9204daec3355015bbe677068198cf38cd2cf3))
* **lsp:** gt -&gt; gT. Fixes [#554](https://github.com/LazyVim/LazyVim/issues/554) ([2d8116e](https://github.com/LazyVim/LazyVim/commit/2d8116ef674ad4b2a3ba62f590ff32d1c30a2f9c))
### Code Refactoring
* **treesitter:** rename help to vimdoc ([#521](https://github.com/LazyVim/LazyVim/issues/521)) ([078250a](https://github.com/LazyVim/LazyVim/commit/078250a114b45785743fcfe0482c7667f304f92c))
## [1.24.0](https://github.com/LazyVim/LazyVim/compare/v1.23.0...v1.24.0) (2023-03-31)
### Features
* **autocmds:** add auto create dir ([#493](https://github.com/LazyVim/LazyVim/issues/493)) ([ed48b85](https://github.com/LazyVim/LazyVim/commit/ed48b85dbea30a15518b4caa58cbf5d2b54f97a0))
* **lualine:** added lazy extension ([79fe045](https://github.com/LazyVim/LazyVim/commit/79fe0455a02b791eae26e9934fdbaf075d9522ae))
## [1.23.0](https://github.com/LazyVim/LazyVim/compare/v1.22.0...v1.23.0) (2023-03-25)
### Features
* **treesitter:** use Python indents as they've improved greatly ([#490](https://github.com/LazyVim/LazyVim/issues/490)) ([59eb198](https://github.com/LazyVim/LazyVim/commit/59eb19835f3b291912d46e5e8ea762367201cbf1))
## [1.22.0](https://github.com/LazyVim/LazyVim/compare/v1.21.2...v1.22.0) (2023-03-23)
### Features
* **mason:** compatibility with the new mason registry ([df5cbfd](https://github.com/LazyVim/LazyVim/commit/df5cbfdbeccfa37ee391be8b49da7a4a4b6dcc40))
* **treesitter:** add luadoc ([#469](https://github.com/LazyVim/LazyVim/issues/469)) ([ade4342](https://github.com/LazyVim/LazyVim/commit/ade4342c42c47f4eadae3e6267ac35f546692158))
### Bug Fixes
* **autocmd:** remove query from q-to-quit autocmd ([#473](https://github.com/LazyVim/LazyVim/issues/473)) ([b0cef1f](https://github.com/LazyVim/LazyVim/commit/b0cef1f506e4bbaa8cfe07990ee49518d8e13f3d))
* **mason:** removed flake8. You can add it back in your own configs if you need it or add ruff_lsp ([381ee0a](https://github.com/LazyVim/LazyVim/commit/381ee0a9fc536a4e1ed9ad3e089f10129f0d50a0))
## [1.21.2](https://github.com/LazyVim/LazyVim/compare/v1.21.1...v1.21.2) (2023-03-19)
### Bug Fixes
* **alpha:** use `AlphaFooter` highlight for footer section ([#461](https://github.com/LazyVim/LazyVim/issues/461)) ([a7b25e1](https://github.com/LazyVim/LazyVim/commit/a7b25e13fa645dea848047e0dda54db9b254ec8e))
## [1.21.1](https://github.com/LazyVim/LazyVim/compare/v1.21.0...v1.21.1) (2023-03-17)
### Bug Fixes
* **config:** compat with lazy.nvim ([501474e](https://github.com/LazyVim/LazyVim/commit/501474e42166e199e61b4e704b266bd0a9625a65))
## [1.21.0](https://github.com/LazyVim/LazyVim/compare/v1.20.0...v1.21.0) (2023-03-17)
### Features
* **lsp:** added keymap to see source actions with `&lt;leader&gt;cA` (useful for tsserver and others) ([9f5a0f1](https://github.com/LazyVim/LazyVim/commit/9f5a0f1bd847663deea9cb48a178b85d7bdb3ec6))
## [1.20.0](https://github.com/LazyVim/LazyVim/compare/v1.19.0...v1.20.0) (2023-03-17)
### Features
* **lsp:** make lsp work when mason-lspconfig is disabled. Fixed [#445](https://github.com/LazyVim/LazyVim/issues/445) ([c10e550](https://github.com/LazyVim/LazyVim/commit/c10e550639caef68146d122d9bc4a66f2f38650a))
### Bug Fixes
* **icons:** replace obsolete icons ([#441](https://github.com/LazyVim/LazyVim/issues/441)) ([cec000d](https://github.com/LazyVim/LazyVim/commit/cec000dfd863bd681a5195eb71c0797f5d030062))
## [1.19.0](https://github.com/LazyVim/LazyVim/compare/v1.18.2...v1.19.0) (2023-03-14)
### Features
* **mini-starter:** add Session restore to starter menu ([#421](https://github.com/LazyVim/LazyVim/issues/421)) ([bcdcfab](https://github.com/LazyVim/LazyVim/commit/bcdcfab020308a90c8cb347cf63d318f4cb05941))
### Bug Fixes
* **core:** set `cond=true` for LazyVim ([df6ac59](https://github.com/LazyVim/LazyVim/commit/df6ac591baf8ab2ef40e3ddcaf34ed124f42469f))
## [1.18.2](https://github.com/LazyVim/LazyVim/compare/v1.18.1...v1.18.2) (2023-03-12)
### Bug Fixes
* **lsp:** allow `silent=false` for lsp keymaps. Fixes [#414](https://github.com/LazyVim/LazyVim/issues/414) ([a28885b](https://github.com/LazyVim/LazyVim/commit/a28885be3f2428c993a3133f283d5648b6fa6b94))
## [1.18.1](https://github.com/LazyVim/LazyVim/compare/v1.18.0...v1.18.1) (2023-03-10)
### Bug Fixes
* **prettier:** extend ensure_installed instead of overwriting it. Fixes [#406](https://github.com/LazyVim/LazyVim/issues/406) ([9f30a2e](https://github.com/LazyVim/LazyVim/commit/9f30a2e03a66775bcbf3601e7a46e0aacf1bb291))
## [1.18.0](https://github.com/LazyVim/LazyVim/compare/v1.17.1...v1.18.0) (2023-03-10)

View File

@ -1,4 +1,4 @@
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 10
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 April 28
==============================================================================
Table of Contents *LazyVim-table-of-contents*

View File

@ -48,10 +48,10 @@ vim.api.nvim_create_autocmd("FileType", {
"man",
"notify",
"qf",
"query", -- :InspectTree
"spectre_panel",
"startuptime",
"tsplayground",
"checkhealth",
},
callback = function(event)
vim.bo[event.buf].buflisted = false
@ -68,3 +68,15 @@ vim.api.nvim_create_autocmd("FileType", {
vim.opt_local.spell = true
end,
})
-- Auto create dir when saving a file, in case some intermediate directory does not exist
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
group = augroup("auto_create_dir"),
callback = function(event)
if event.match:match("^%w%w+://") then
return
end
local file = vim.loop.fs_realpath(event.match) or event.match
vim.fn.mkdir(vim.fn.fnamemodify(file, ":p:h"), "p")
end,
})

View File

@ -14,14 +14,22 @@ local defaults = {
defaults = {
autocmds = true, -- lazyvim.config.autocmds
keymaps = true, -- lazyvim.config.keymaps
options = true, -- lazyvim.config.options
-- lazyvim.config.options can't be configured here since that's loaded before lazyvim setup
-- if you want to disable loading options, add `package.loaded["lazyvim.config.options"] = true` to the top of your init.lua
},
-- icons used by other plugins
icons = {
dap = {
Stopped = { "", "DiagnosticWarn", "DapStoppedLine" },
Breakpoint = "",
BreakpointCondition = "",
BreakpointRejected = { "", "DiagnosticError" },
LogPoint = ".>",
},
diagnostics = {
Error = "",
Warn = "",
Hint = " ",
Hint = " ",
Info = "",
},
git = {
@ -42,7 +50,7 @@ local defaults = {
Event = "",
Field = "",
File = "",
Folder = " ",
Folder = " ",
Function = "",
Interface = "",
Key = "",
@ -50,7 +58,7 @@ local defaults = {
Method = "",
Module = "",
Namespace = "",
Null = " ",
Null = " ",
Number = "",
Object = "",
Operator = "",
@ -69,6 +77,10 @@ local defaults = {
},
}
M.renames = {
["windwp/nvim-spectre"] = "nvim-pack/nvim-spectre",
}
---@type LazyVimConfig
local options
@ -132,15 +144,16 @@ function M.load(name)
end, {
msg = "Failed loading " .. mod,
on_error = function(msg)
local modpath = require("lazy.core.cache").find(mod)
if modpath then
Util.error(msg)
local info = require("lazy.core.cache").find(mod)
if info == nil or (type(info) == "table" and #info == 0) then
return
end
Util.error(msg)
end,
})
end
-- always load lazyvim, then user file
if M.defaults[name] then
if M.defaults[name] or name == "options" then
_load("lazyvim.config." .. name)
end
_load("config." .. name)
@ -161,6 +174,14 @@ function M.init()
-- this is needed to make sure options will be correctly applied
-- after installing missing plugins
require("lazyvim.config").load("options")
local Plugin = require("lazy.core.plugin")
local add = Plugin.Spec.add
Plugin.Spec.add = function(self, plugin, ...)
if type(plugin) == "table" and M.renames[plugin[1]] then
plugin[1] = M.renames[plugin[1]]
end
return add(self, plugin, ...)
end
end
end

View File

@ -112,8 +112,8 @@ local conceallevel = vim.o.conceallevel > 0 and vim.o.conceallevel or 3
map("n", "<leader>uc", function() Util.toggle("conceallevel", false, {0, conceallevel}) end, { desc = "Toggle Conceal" })
-- lazygit
map("n", "<leader>gg", function() Util.float_term({ "lazygit" }, { cwd = Util.get_root() }) end, { desc = "Lazygit (root dir)" })
map("n", "<leader>gG", function() Util.float_term({ "lazygit" }) end, { desc = "Lazygit (cwd)" })
map("n", "<leader>gg", function() Util.float_term({ "lazygit" }, { cwd = Util.get_root(), esc_esc = false }) end, { desc = "Lazygit (root dir)" })
map("n", "<leader>gG", function() Util.float_term({ "lazygit" }, {esc_esc = false}) end, { desc = "Lazygit (cwd)" })
-- quit
map("n", "<leader>qq", "<cmd>qa<cr>", { desc = "Quit all" })
@ -126,7 +126,7 @@ end
-- floating terminal
map("n", "<leader>ft", function() Util.float_term(nil, { cwd = Util.get_root() }) end, { desc = "Terminal (root dir)" })
map("n", "<leader>fT", function() Util.float_term() end, { desc = "Terminal (cwd)" })
map("t", "<esc><esc>", "<c-\\><c-n>", {desc = "Enter Normal Mode"})
map("t", "<esc><esc>", "<c-\\><c-n>", { desc = "Enter Normal Mode" })
-- windows
map("n", "<leader>ww", "<C-W>p", { desc = "Other window" })

View File

@ -1,5 +1,4 @@
-- This file is automatically loaded by plugins.config
vim.g.mapleader = " "
vim.g.maplocalleader = " "
@ -28,7 +27,7 @@ opt.scrolloff = 4 -- Lines of context
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" }
opt.shiftround = true -- Round indent
opt.shiftwidth = 2 -- Size of an indent
opt.shortmess:append { W = true, I = true, c = true }
opt.shortmess:append({ W = true, I = true, c = true })
opt.showmode = false -- Dont show mode since we have a statusline
opt.sidescrolloff = 8 -- Columns of context
opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
@ -49,7 +48,7 @@ opt.wrap = false -- Disable line wrap
if vim.fn.has("nvim-0.9.0") == 1 then
opt.splitkeep = "screen"
opt.shortmess:append { C = true }
opt.shortmess:append({ C = true })
end
-- Fix markdown indentation settings

View File

@ -1,12 +1,17 @@
local M = {}
local start = vim.health.start or vim.health.report_start
local ok = vim.health.ok or vim.health.report_ok
local warn = vim.health.warn or vim.health.report_warn
local error = vim.health.error or vim.health.report_error
function M.check()
vim.health.report_start("LazyVim")
start("LazyVim")
if vim.fn.has("nvim-0.8.0") == 1 then
vim.health.report_ok("Using Neovim >= 0.8.0")
ok("Using Neovim >= 0.8.0")
else
vim.health.report_error("Neovim >= 0.8.0 is required")
error("Neovim >= 0.8.0 is required")
end
for _, cmd in ipairs({ "git", "rg", { "fd", "fdfind" }, "lazygit" }) do
@ -23,9 +28,9 @@ function M.check()
end
if found then
vim.health.report_ok(("`%s` is installed"):format(name))
ok(("`%s` is installed"):format(name))
else
vim.health.report_warn(("`%s` is not installed"):format(name))
warn(("`%s` is not installed"):format(name))
end
end
end

View File

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

View File

@ -40,6 +40,7 @@ return {
filesystem = {
bind_to_cwd = false,
follow_current_file = true,
use_libuv_file_watcher = true,
},
window = {
mappings = {
@ -55,11 +56,22 @@ return {
},
},
},
config = function(_, opts)
require("neo-tree").setup(opts)
vim.api.nvim_create_autocmd("TermClose", {
pattern = "*lazygit",
callback = function()
if package.loaded["neo-tree.sources.git_status"] then
require("neo-tree.sources.git_status").refresh()
end
end,
})
end,
},
-- search/replace in multiple files
{
"windwp/nvim-spectre",
"nvim-pack/nvim-spectre",
-- stylua: ignore
keys = {
{ "<leader>sr", function() require("spectre").open() end, desc = "Replace in files (Spectre)" },
@ -73,7 +85,7 @@ return {
version = false, -- telescope did only one release, so use HEAD for now
keys = {
{ "<leader>,", "<cmd>Telescope buffers show_all_buffers=true<cr>", desc = "Switch Buffer" },
{ "<leader>/", Util.telescope("live_grep"), desc = "Find in Files (Grep)" },
{ "<leader>/", Util.telescope("live_grep"), desc = "Grep (root dir)" },
{ "<leader>:", "<cmd>Telescope command_history<cr>", desc = "Command History" },
{ "<leader><space>", Util.telescope("files"), desc = "Find Files (root dir)" },
-- find
@ -81,6 +93,7 @@ return {
{ "<leader>ff", Util.telescope("files"), desc = "Find Files (root dir)" },
{ "<leader>fF", Util.telescope("files", { cwd = false }), desc = "Find Files (cwd)" },
{ "<leader>fr", "<cmd>Telescope oldfiles<cr>", desc = "Recent" },
{ "<leader>fR", Util.telescope("oldfiles", { cwd = vim.loop.cwd() }), desc = "Recent (cwd)" },
-- git
{ "<leader>gc", "<cmd>Telescope git_commits<CR>", desc = "commits" },
{ "<leader>gs", "<cmd>Telescope git_status<CR>", desc = "status" },
@ -89,7 +102,8 @@ return {
{ "<leader>sb", "<cmd>Telescope current_buffer_fuzzy_find<cr>", desc = "Buffer" },
{ "<leader>sc", "<cmd>Telescope command_history<cr>", desc = "Command History" },
{ "<leader>sC", "<cmd>Telescope commands<cr>", desc = "Commands" },
{ "<leader>sd", "<cmd>Telescope diagnostics<cr>", desc = "Diagnostics" },
{ "<leader>sd", "<cmd>Telescope diagnostics bufnr=0<cr>", desc = "Document diagnostics" },
{ "<leader>sD", "<cmd>Telescope diagnostics<cr>", desc = "Workspace diagnostics" },
{ "<leader>sg", Util.telescope("live_grep"), desc = "Grep (root dir)" },
{ "<leader>sG", Util.telescope("live_grep", { cwd = false }), desc = "Grep (cwd)" },
{ "<leader>sh", "<cmd>Telescope help_tags<cr>", desc = "Help Pages" },
@ -122,7 +136,7 @@ return {
},
{
"<leader>sS",
Util.telescope("lsp_workspace_symbols", {
Util.telescope("lsp_dynamic_workspace_symbols", {
symbols = {
"Class",
"Function",
@ -217,11 +231,7 @@ return {
event = "VeryLazy",
opts = {
plugins = { spelling = true },
},
config = function(_, opts)
local wk = require("which-key")
wk.setup(opts)
local keymaps = {
defaults = {
mode = { "n", "v" },
["g"] = { name = "+goto" },
["gz"] = { name = "+surround" },
@ -238,11 +248,12 @@ return {
["<leader>u"] = { name = "+ui" },
["<leader>w"] = { name = "+windows" },
["<leader>x"] = { name = "+diagnostics/quickfix" },
}
if Util.has("noice.nvim") then
keymaps["<leader>sn"] = { name = "+noice" }
end
wk.register(keymaps)
},
},
config = function(_, opts)
local wk = require("which-key")
wk.setup(opts)
wk.register(opts.defaults)
end,
},
@ -373,6 +384,7 @@ return {
{ "<leader>xt", "<cmd>TodoTrouble<cr>", desc = "Todo (Trouble)" },
{ "<leader>xT", "<cmd>TodoTrouble keywords=TODO,FIX,FIXME<cr>", desc = "Todo/Fix/Fixme (Trouble)" },
{ "<leader>st", "<cmd>TodoTelescope<cr>", desc = "Todo" },
{ "<leader>sT", "<cmd>TodoTelescope keywords=TODO,FIX,FIXME<cr>", desc = "Todo/Fix/Fixme" },
},
},
}

View File

@ -10,6 +10,34 @@ return {
panel = { enabled = false },
},
},
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
opts = function(_, opts)
local Util = require("lazyvim.util")
local colors = {
[""] = Util.fg("Special"),
["Normal"] = Util.fg("Special"),
["Warning"] = Util.fg("DiagnosticError"),
["InProgress"] = Util.fg("DiagnosticWarn"),
}
table.insert(opts.sections.lualine_x, 2, {
function()
local icon = require("lazyvim.config").icons.kinds.Copilot
local status = require("copilot.api").status.data
return icon .. (status.message or "")
end,
cond = function()
local ok, clients = pcall(vim.lsp.get_active_clients, { name = "copilot", bufnr = 0 })
return ok and #clients > 0
end,
color = function()
local status = require("copilot.api").status.data
return colors[status.status] or colors[""]
end,
})
end,
},
-- copilot cmp source
{

View File

@ -0,0 +1,103 @@
return {
"mfussenegger/nvim-dap",
dependencies = {
-- fancy UI for the debugger
{
"rcarriga/nvim-dap-ui",
-- 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"} },
},
opts = {},
config = function(_, opts)
local dap = require("dap")
local dapui = require("dapui")
dapui.setup(opts)
dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open({})
end
dap.listeners.before.event_terminated["dapui_config"] = function()
dapui.close({})
end
dap.listeners.before.event_exited["dapui_config"] = function()
dapui.close({})
end
end,
},
-- virtual text for the debugger
{
"theHamsta/nvim-dap-virtual-text",
opts = {},
},
-- which key integration
{
"folke/which-key.nvim",
opts = {
defaults = {
["<leader>d"] = { name = "+debug" },
["<leader>da"] = { name = "+adapters" },
},
},
},
-- mason.nvim integration
{
"jay-babu/mason-nvim-dap.nvim",
dependencies = "mason.nvim",
cmd = { "DapInstall", "DapUninstall" },
opts = {
-- Makes a best effort to setup the various debuggers with
-- reasonable debug configurations
automatic_setup = true,
-- You can provide additional configuration to the handlers,
-- see mason-nvim-dap README for more information
handlers = {},
-- You'll need to check that you have the required things installed
-- online, please don't ask me how to install them :)
ensure_installed = {
-- Update this to ensure that you have the debuggers for the langs you want
},
},
},
},
-- stylua: ignore
keys = {
{ "<leader>dB", function() require("dap").set_breakpoint(vim.fn.input('Breakpoint condition: ')) end, desc = "Breakpoint Condition" },
{ "<leader>db", function() require("dap").toggle_breakpoint() end, desc = "Toggle Breakpoint" },
{ "<leader>dc", function() require("dap").continue() end, desc = "Continue" },
{ "<leader>dC", function() require("dap").run_to_cursor() end, desc = "Run to Cursor" },
{ "<leader>dg", function() require("dap").goto_() end, desc = "Go to line (no execute)" },
{ "<leader>di", function() require("dap").step_into() end, desc = "Step Into" },
{ "<leader>dj", function() require("dap").down() end, desc = "Down" },
{ "<leader>dk", function() require("dap").up() end, desc = "Up" },
{ "<leader>dl", function() require("dap").run_last() end, desc = "Run Last" },
{ "<leader>do", function() require("dap").step_out() end, desc = "Step Out" },
{ "<leader>dO", function() require("dap").step_over() end, desc = "Step Over" },
{ "<leader>dp", function() require("dap").pause() end, desc = "Pause" },
{ "<leader>dr", function() require("dap").repl.toggle() end, desc = "Toggle REPL" },
{ "<leader>ds", function() require("dap").session() end, desc = "Session" },
{ "<leader>dt", function() require("dap").terminate() end, desc = "Terminate" },
{ "<leader>dw", function() require("dap.ui.widgets").hover() end, desc = "Widgets" },
},
config = function()
local Config = require("lazyvim.config")
vim.api.nvim_set_hl(0, "DapStoppedLine", { default = true, link = "Visual" })
for name, sign in pairs(Config.icons.dap) do
sign = type(sign) == "table" and sign or { sign }
vim.fn.sign_define(
"Dap" .. name,
{ text = sign[1], texthl = sign[2] or "DiagnosticInfo", linehl = sign[3], numhl = sign[3] }
)
end
end,
}

View File

@ -0,0 +1,27 @@
return {
"mfussenegger/nvim-dap",
dependencies = {
{
"jbyuki/one-small-step-for-vimkind",
-- stylua: ignore
keys = {
{ "<leader>daL", function() require("osv").launch({ port = 8086 }) end, desc = "Adapter Lua Server" },
{ "<leader>dal", function() require("osv").run_this() end, desc = "Adapter Lua" },
},
config = function()
local dap = require("dap")
dap.adapters.nlua = function(callback, config)
callback({ type = "server", host = config.host or "127.0.0.1", port = config.port or 8086 })
end
dap.configurations.lua = {
{
type = "nlua",
request = "attach",
name = "Attach to running Neovim instance",
},
}
end,
},
},
}

View File

@ -1,11 +1,9 @@
return {
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"prettierd",
},
},
opts = function(_, opts)
table.insert(opts.ensure_installed, "prettierd")
end,
},
{
"jose-elias-alvarez/null-ls.nvim",

View File

@ -20,6 +20,20 @@ return {
---@type lspconfig.options.tsserver
tsserver = {
settings = {
typescript = {
format = {
indentSize = vim.o.shiftwidth,
convertTabsToSpaces = vim.o.expandtab,
tabSize = vim.o.tabstop,
},
},
javascript = {
format = {
indentSize = vim.o.shiftwidth,
convertTabsToSpaces = vim.o.expandtab,
tabSize = vim.o.tabstop,
},
},
completions = {
completeFunctionCalls = true,
},

View File

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

View File

@ -0,0 +1,30 @@
return {
{
"telescope.nvim",
dependencies = {
-- project management
{
"ahmedkhalf/project.nvim",
opts = {},
event = "VeryLazy",
config = function(_, opts)
require("project_nvim").setup(opts)
require("telescope").load_extension("projects")
end,
keys = {
{ "<leader>fp", "<Cmd>Telescope projects<CR>", desc = "Projects" },
},
},
},
},
{
"goolord/alpha-nvim",
opts = function(_, dashboard)
local button = dashboard.button("p", "" .. " Projects", ":Telescope projects <CR>")
button.opts.hl = "AlphaButtons"
button.opts.hl_shortcut = "AlphaShortcut"
table.insert(dashboard.section.buttons.val, 4, button)
end,
},
}

View File

@ -18,13 +18,15 @@ function M.toggle()
end
end
function M.format()
---@param opts? {force?:boolean}
function M.format(opts)
local buf = vim.api.nvim_get_current_buf()
if vim.b.autoformat == false then
if vim.b.autoformat == false and not (opts and opts.force) then
return
end
local ft = vim.bo[buf].filetype
local have_nls = #require("null-ls.sources").get_available(ft, "NULL_LS_FORMATTING") > 0
local have_nls = package.loaded["null-ls"]
and (#require("null-ls.sources").get_available(ft, "NULL_LS_FORMATTING") > 0)
vim.lsp.buf.format(vim.tbl_deep_extend("force", {
bufnr = buf,

View File

@ -21,9 +21,18 @@ return {
diagnostics = {
underline = true,
update_in_insert = false,
virtual_text = { spacing = 4, prefix = "" },
virtual_text = {
spacing = 4,
source = "if_many",
prefix = "",
-- this will set set the prefix to a function that returns the diagnostics icon based on the severity
-- this only works on a recent 0.10.0 build. Will be set to "●" when not supported
-- prefix = "icons",
},
severity_sort = true,
},
-- add any global capabilities here
capabilities = {},
-- Automatically format on save
autoformat = true,
-- options for vim.lsp.buf.format
@ -66,10 +75,11 @@ return {
},
---@param opts PluginLspOpts
config = function(_, opts)
local Util = require("lazyvim.util")
-- setup autoformat
require("lazyvim.plugins.lsp.format").autoformat = opts.autoformat
-- setup formatting and keymaps
require("lazyvim.util").on_attach(function(client, buffer)
Util.on_attach(function(client, buffer)
require("lazyvim.plugins.lsp.format").on_attach(client, buffer)
require("lazyvim.plugins.lsp.keymaps").on_attach(client, buffer)
end)
@ -79,10 +89,29 @@ return {
name = "DiagnosticSign" .. name
vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" })
end
vim.diagnostic.config(opts.diagnostics)
if type(opts.diagnostics.virtual_text) == "table" and opts.diagnostics.virtual_text.prefix == "icons" then
opts.diagnostics.virtual_text.prefix = vim.fn.has("nvim-0.10.0") == 0 and ""
or function(diagnostic)
local icons = require("lazyvim.config").icons.diagnostics
for d, icon in pairs(icons) do
if diagnostic.severity == vim.diagnostic.severity[d:upper()] then
return icon
end
end
end
end
vim.diagnostic.config(vim.deepcopy(opts.diagnostics))
local servers = opts.servers
local capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
local capabilities = vim.tbl_deep_extend(
"force",
{},
vim.lsp.protocol.make_client_capabilities(),
require("cmp_nvim_lsp").default_capabilities(),
opts.capabilities or {}
)
local function setup(server)
local server_opts = vim.tbl_deep_extend("force", {
@ -101,23 +130,19 @@ return {
require("lspconfig")[server].setup(server_opts)
end
-- temp fix for lspconfig rename
-- https://github.com/neovim/nvim-lspconfig/pull/2439
local mappings = require("mason-lspconfig.mappings.server")
if not mappings.lspconfig_to_package.lua_ls then
mappings.lspconfig_to_package.lua_ls = "lua-language-server"
mappings.package_to_lspconfig["lua-language-server"] = "lua_ls"
-- get all the servers that are available thourgh mason-lspconfig
local have_mason, mlsp = pcall(require, "mason-lspconfig")
local all_mslp_servers = {}
if have_mason then
all_mslp_servers = vim.tbl_keys(require("mason-lspconfig.mappings.server").lspconfig_to_package)
end
local mlsp = require("mason-lspconfig")
local available = mlsp.get_available_servers()
local ensure_installed = {} ---@type string[]
for server, server_opts in pairs(servers) do
if server_opts then
server_opts = server_opts == true and {} or server_opts
-- run manual setup if mason=false or if this is a server that cannot be installed with mason-lspconfig
if server_opts.mason == false or not vim.tbl_contains(available, server) then
if server_opts.mason == false or not vim.tbl_contains(all_mslp_servers, server) then
setup(server)
else
ensure_installed[#ensure_installed + 1] = server
@ -125,8 +150,18 @@ return {
end
end
require("mason-lspconfig").setup({ ensure_installed = ensure_installed })
require("mason-lspconfig").setup_handlers({ setup })
if have_mason then
mlsp.setup({ ensure_installed = ensure_installed })
mlsp.setup_handlers({ setup })
end
if Util.lsp_get_config("denols") and Util.lsp_get_config("tsserver") then
local is_deno = require("lspconfig.util").root_pattern("deno.json", "deno.jsonc")
Util.lsp_disable("tsserver", is_deno)
Util.lsp_disable("denols", function(root_dir)
return not is_deno(root_dir)
end)
end
end,
},
@ -144,7 +179,7 @@ return {
nls.builtins.diagnostics.fish,
nls.builtins.formatting.stylua,
nls.builtins.formatting.shfmt,
nls.builtins.diagnostics.flake8,
-- nls.builtins.diagnostics.flake8,
},
}
end,
@ -160,19 +195,26 @@ return {
ensure_installed = {
"stylua",
"shfmt",
"flake8",
-- "flake8",
},
},
---@param opts MasonSettings | {ensure_installed: string[]}
config = function(_, opts)
require("mason").setup(opts)
local mr = require("mason-registry")
for _, tool in ipairs(opts.ensure_installed) do
local p = mr.get_package(tool)
if not p:is_installed() then
p:install()
local function ensure_installed()
for _, tool in ipairs(opts.ensure_installed) do
local p = mr.get_package(tool)
if not p:is_installed() then
p:install()
end
end
end
if mr.refresh then
mr.refresh(ensure_installed)
else
ensure_installed()
end
end,
},
}

View File

@ -5,7 +5,9 @@ M._keys = nil
---@return (LazyKeys|{has?:string})[]
function M.get()
local format = require("lazyvim.plugins.lsp.format").format
local format = function()
require("lazyvim.plugins.lsp.format").format({ force = true })
end
if not M._keys then
---@class PluginLspKeys
-- stylua: ignore
@ -16,7 +18,7 @@ function M.get()
{ "gr", "<cmd>Telescope lsp_references<cr>", desc = "References" },
{ "gD", vim.lsp.buf.declaration, desc = "Goto Declaration" },
{ "gI", "<cmd>Telescope lsp_implementations<cr>", desc = "Goto Implementation" },
{ "gt", "<cmd>Telescope lsp_type_definitions<cr>", desc = "Goto Type Definition" },
{ "gy", "<cmd>Telescope lsp_type_definitions<cr>", desc = "Goto T[y]pe Definition" },
{ "K", vim.lsp.buf.hover, desc = "Hover" },
{ "gK", vim.lsp.buf.signature_help, desc = "Signature Help", has = "signatureHelp" },
{ "<c-k>", vim.lsp.buf.signature_help, mode = "i", desc = "Signature Help", has = "signatureHelp" },
@ -26,16 +28,31 @@ function M.get()
{ "[e", M.diagnostic_goto(false, "ERROR"), desc = "Prev Error" },
{ "]w", M.diagnostic_goto(true, "WARN"), desc = "Next Warning" },
{ "[w", M.diagnostic_goto(false, "WARN"), desc = "Prev Warning" },
{ "<leader>ca", vim.lsp.buf.code_action, desc = "Code Action", mode = { "n", "v" }, has = "codeAction" },
{ "<leader>cf", format, desc = "Format Document", has = "documentFormatting" },
{ "<leader>cf", format, desc = "Format Range", mode = "v", has = "documentRangeFormatting" },
{ "<leader>ca", vim.lsp.buf.code_action, desc = "Code Action", mode = { "n", "v" }, has = "codeAction" },
{
"<leader>cA",
function()
vim.lsp.buf.code_action({
context = {
only = {
"source",
},
diagnostics = {},
},
})
end,
desc = "Source Action",
has = "codeAction",
}
}
if require("lazyvim.util").has("inc-rename.nvim") then
M._keys[#M._keys + 1] = {
"<leader>cr",
function()
require("inc_rename")
return ":IncRename " .. vim.fn.expand("<cword>")
local inc_rename = require("inc_rename")
return ":" .. inc_rename.config.cmd_name .. " " .. vim.fn.expand("<cword>")
end,
expr = true,
desc = "Rename",
@ -66,7 +83,7 @@ function M.on_attach(client, buffer)
local opts = Keys.opts(keys)
---@diagnostic disable-next-line: no-unknown
opts.has = nil
opts.silent = true
opts.silent = opts.silent ~= false
opts.buffer = buffer
vim.keymap.set(keys.mode or "n", keys[1], keys[2], opts)
end

View File

@ -33,16 +33,16 @@ return {
---@type TSConfig
opts = {
highlight = { enable = true },
indent = { enable = true, disable = { "python" } },
indent = { enable = true },
context_commentstring = { enable = true, enable_autocmd = false },
ensure_installed = {
"bash",
"c",
"help",
"html",
"javascript",
"json",
"lua",
"luadoc",
"luap",
"markdown",
"markdown_inline",
@ -52,6 +52,7 @@ return {
"tsx",
"typescript",
"vim",
"vimdoc",
"yaml",
},
incremental_selection = {
@ -59,13 +60,24 @@ return {
keymaps = {
init_selection = "<C-space>",
node_incremental = "<C-space>",
scope_incremental = "<nop>",
scope_incremental = false,
node_decremental = "<bs>",
},
},
},
---@param opts TSConfig
config = function(_, opts)
if type(opts.ensure_installed) == "table" then
---@type table<string, boolean>
local added = {}
opts.ensure_installed = vim.tbl_filter(function(lang)
if added[lang] then
return false
end
added[lang] = true
return true
end, opts.ensure_installed)
end
require("nvim-treesitter.configs").setup(opts)
end,
},

View File

@ -8,7 +8,7 @@ return {
function()
require("notify").dismiss({ silent = true, pending = true })
end,
desc = "Delete all Notifications",
desc = "Dismiss all Notifications",
},
},
opts = {
@ -59,6 +59,10 @@ return {
},
opts = {
options = {
-- stylua: ignore
close_command = function(n) require("mini.bufremove").delete(n, false) end,
-- stylua: ignore
right_mouse_command = function(n) require("mini.bufremove").delete(n, false) end,
diagnostics = "nvim_lsp",
always_show_bufferline = false,
diagnostics_indicator = function(_, _, diag)
@ -83,22 +87,15 @@ return {
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
opts = function(plugin)
opts = function()
local icons = require("lazyvim.config").icons
local function fg(name)
return function()
---@type {foreground?:number}?
local hl = vim.api.nvim_get_hl_by_name(name, true)
return hl and hl.foreground and { fg = string.format("#%06x", hl.foreground) }
end
end
local Util = require("lazyvim.util")
return {
options = {
theme = "auto",
globalstatus = true,
disabled_filetypes = { statusline = { "dashboard", "lazy", "alpha" } },
disabled_filetypes = { statusline = { "dashboard", "alpha" } },
},
sections = {
lualine_a = { "mode" },
@ -126,15 +123,21 @@ return {
{
function() return require("noice").api.status.command.get() end,
cond = function() return package.loaded["noice"] and require("noice").api.status.command.has() end,
color = fg("Statement")
color = Util.fg("Statement"),
},
-- stylua: ignore
{
function() return require("noice").api.status.mode.get() end,
cond = function() return package.loaded["noice"] and require("noice").api.status.mode.has() end,
color = fg("Constant") ,
color = Util.fg("Constant"),
},
{ require("lazy.status").updates, cond = require("lazy.status").has_updates, color = fg("Special") },
-- stylua: ignore
{
function() return "" .. require("dap").status() end,
cond = function () return package.loaded["dap"] and require("dap").status() ~= "" end,
color = Util.fg("Debug"),
},
{ require("lazy.status").updates, cond = require("lazy.status").has_updates, color = Util.fg("Special") },
{
"diff",
symbols = {
@ -154,7 +157,7 @@ return {
end,
},
},
extensions = { "neo-tree" },
extensions = { "neo-tree", "lazy" },
}
end,
},
@ -199,6 +202,17 @@ return {
{
"folke/noice.nvim",
event = "VeryLazy",
dependencies = {
-- which key integration
{
"folke/which-key.nvim",
opts = function(_, opts)
if require("lazyvim.util").has("noice.nvim") then
opts.defaults["<leader>sn"] = { name = "+noice" }
end
end,
},
},
opts = {
lsp = {
override = {
@ -218,6 +232,7 @@ return {
{ "<leader>snl", function() require("noice").cmd("last") end, desc = "Noice Last Message" },
{ "<leader>snh", function() require("noice").cmd("history") end, desc = "Noice History" },
{ "<leader>sna", function() require("noice").cmd("all") end, desc = "Noice All" },
{ "<leader>snd", function() require("noice").cmd("dismiss") end, desc = "Dismiss All" },
{ "<c-f>", function() if not require("noice.lsp").scroll(4) then return "<c-f>" end end, silent = true, expr = true, desc = "Scroll forward", mode = {"i", "n", "s"} },
{ "<c-b>", function() if not require("noice.lsp").scroll(-4) then return "<c-b>" end end, silent = true, expr = true, desc = "Scroll backward", mode = {"i", "n", "s"}},
},
@ -240,9 +255,9 @@ return {
dashboard.section.header.val = vim.split(logo, "\n")
dashboard.section.buttons.val = {
dashboard.button("f", " " .. " Find file", ":Telescope find_files <CR>"),
dashboard.button("f", " " .. " Find file", ":Telescope find_files <CR>"),
dashboard.button("n", "" .. " New file", ":ene <BAR> startinsert <CR>"),
dashboard.button("r", " " .. " Recent files", ":Telescope oldfiles <CR>"),
dashboard.button("r", " " .. " Recent files", ":Telescope oldfiles <CR>"),
dashboard.button("g", "" .. " Find text", ":Telescope live_grep <CR>"),
dashboard.button("c", "" .. " Config", ":e $MYVIMRC <CR>"),
dashboard.button("s", "" .. " Restore Session", [[:lua require("persistence").load() <cr>]]),
@ -253,9 +268,9 @@ return {
button.opts.hl = "AlphaButtons"
button.opts.hl_shortcut = "AlphaShortcut"
end
dashboard.section.footer.opts.hl = "Type"
dashboard.section.header.opts.hl = "AlphaHeader"
dashboard.section.buttons.opts.hl = "AlphaButtons"
dashboard.section.footer.opts.hl = "AlphaFooter"
dashboard.opts.layout[1].val = 8
return dashboard
end,

View File

@ -54,6 +54,23 @@ function M.keymaps()
end
end)
Util.walk(root .. "/lua/lazyvim/plugins/extras", function(path, name, t)
if t == "file" and name:find("%.lua$") then
local modname = path:gsub(".*/lua/", ""):gsub("/", "."):gsub("%.lua$", "")
local extra_doc = "/plugins/extras/" .. modname:gsub("lazyvim%.plugins%.extras%.", "")
local extra = require("lazy.core.plugin").Spec.new({ import = modname })
Util.foreach(extra.plugins, function(name, plugin)
group = ("[%s](%s)\nPart of [%s](%s)"):format(plugin.name, plugin.url, modname, extra_doc)
for _, key in ipairs(plugin.keys or {}) do
if type(key) == "table" and key.desc then
local desc = key.desc or ""
map(key.mode or "n", key[1], key[2], { desc = desc })
end
end
end)
end
end)
---@type string[]
local lines = {}
@ -198,7 +215,7 @@ To use this, add it to your **lazy.nvim** imports:
```lua title="lua/config/lazy.lua" {4}
require("lazy").setup({
spec = {
{ "folke/LazyVim", import = "lazyvim.plugins" },
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
{ import = "%s" },
{ import = "plugins" },
},
@ -256,7 +273,7 @@ function M.plugins(path)
local function find_plugins(node)
if node:type() == "string" then
local text = vim.treesitter.query.get_node_text(node, source):sub(2, -2)
local text = vim.treesitter.get_node_text(node, source):sub(2, -2)
if text:find("/") and #node:parent():field("name") == 0 then
local plugin_node = node:parent():parent()
if plugin_node:named_child(0):field("value")[1]:id() ~= node:id() then

View File

@ -20,6 +20,13 @@ function M.has(plugin)
return require("lazy.core.config").plugins[plugin] ~= nil
end
function M.fg(name)
---@type {foreground?:number}?
local hl = vim.api.nvim_get_hl and vim.api.nvim_get_hl(0, { name = name }) or vim.api.nvim_get_hl_by_name(name, true)
local fg = hl and hl.fg or hl.foreground
return fg and { fg = string.format("#%06x", fg) }
end
---@param fn fun()
function M.on_very_lazy(fn)
vim.api.nvim_create_autocmd("User", {
@ -102,15 +109,17 @@ function M.telescope(builtin, opts)
end
end
-- FIXME: create a togglable terminal
-- Opens a floating terminal (interactive by default)
---@param cmd? string[]|string
---@param opts? LazyCmdOptions|{interactive?:boolean}
---@param opts? LazyCmdOptions|{interactive?:boolean, esc_esc?:false}
function M.float_term(cmd, opts)
opts = vim.tbl_deep_extend("force", {
size = { width = 0.9, height = 0.9 },
}, opts or {})
require("lazy.util").float_term(cmd, opts)
local float = require("lazy.util").float_term(cmd, opts)
if opts.esc_esc == false then
vim.keymap.set("t", "<esc>", "<esc>", { buffer = float.buf, nowait = true })
end
end
---@param silent boolean?
@ -187,4 +196,21 @@ function M.lazy_notify()
timer:start(500, 0, replay)
end
function M.lsp_get_config(server)
local configs = require("lspconfig.configs")
return rawget(configs, server)
end
---@param server string
---@param cond fun( root_dir, config): boolean
function M.lsp_disable(server, cond)
local util = require("lspconfig.util")
local def = M.lsp_get_config(server)
def.document_config.on_new_config = util.add_hook_before(def.document_config.on_new_config, function(config, root_dir)
if cond(root_dir, config) then
config.enabled = false
end
end)
end
return M