Compare commits

..

68 Commits

Author SHA1 Message Date
55c2527dfe chore(main): release 10.17.3 (#2833)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-26 17:41:37 +01:00
f3655c33a3 perf(notify): disable animation notifications. too big impact on performance for too little benefit
To keep using animations, you can set stages = fade_in_slide_out for the
nvim-notify plugin
2024-03-26 17:35:27 +01:00
49a1afab53 chore(main): release 10.17.2 (#2831)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-26 15:30:56 +01:00
a26ca7bf56 fix(lazygit): dont error when setting ansi color fails. Fixes #2829 2024-03-26 15:24:16 +01:00
20efdd44da chore(main): release 10.17.1 (#2827)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-26 13:46:01 +01:00
bfe8c608a3 fix(lazygit): allow overriding default terminal options 2024-03-26 13:42:57 +01:00
4796dba8f7 chore(main): release 10.17.0 (#2805)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-26 12:47:36 +01:00
7d0dbc6ded feat(lazygit): lazygit now automatically uses colors from your Neovim colorscheme
Disable by setting `vim.g.lazygit_theme = false` in your `options.lua`
2024-03-26 12:43:07 +01:00
c00e3aa6b1 feat(util): added util function to get a fg/bg color from the active colorscheme 2024-03-26 12:43:07 +01:00
1d2cb7d8d1 chore(build): auto-generate vimdoc 2024-03-26 08:28:44 +00:00
3e5a5dd621 feat(python): allow configuring other python lsp servers than pyright, basedpyright 2024-03-26 09:28:08 +01:00
9e07a6615a chore(build): auto-generate vimdoc 2024-03-23 07:15:37 +00:00
b74ef23a27 feat(neo-tree): add mapping "O" to open with system default (#2758)
* feat(neo-tree): add mapping "O" to open with system default

* feat(neo-tree): add OS checks for system default open commands

* Use `vim.ui.open` if exists

* update OS checks

* Just use vim.ui.open or throw error if doesn't exist

* Make "O" undefined mapping if vim.ui.open isn't available

* fix: use lazy's util.open instead

---------

Co-authored-by: Uthman Mohamed <83053931+1239uth@users.noreply.github.com>
Co-authored-by: saeedahsan <ahsan02@gmail.com>
Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-03-23 08:15:04 +01:00
7ab6285011 feat(options): Disable foldtext for nightly (#2447)
* chores(format.lua): Fix typo

* Change gitsigns.nvim hunk preview shortcut

Change `preview_hunk` to recently added `preview_hunk_inline` command

* feat(options): remove redundant commented line

* feat(options): use native folding

see https://github.com/neovim/neovim/pull/20750
2024-03-22 10:38:10 +01:00
c91982a8bc chore(main): release 10.16.0 (#2791)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-22 10:33:16 +01:00
4b8fe44c08 fix: add shim for vim.uv just in case someone upgrades lazyvim before lazy 2024-03-22 10:30:35 +01:00
69aedc2657 fix(cmake): lazy load cmake-tools. Fixes #2767 2024-03-22 10:23:09 +01:00
1c13a5c10b feat(telescope-fzf-native): added support for building with cmake. Fixes #2132 2024-03-22 10:00:22 +01:00
8d31bf230c fix(java): dont error when not using cmp. Fixes #2038 2024-03-22 09:54:24 +01:00
3d4ab4eb26 feat(lazyterm): optional shell setup, mainly for pwsh. Fixes #2151 2024-03-22 09:49:07 +01:00
7a5dbeae75 feat: use LazyVim everywhere instead of require("lazyvim.util") 2024-03-22 09:15:09 +01:00
3a87c08cda feat: use vim.uv everywhere instead of vim.loop 2024-03-22 09:02:34 +01:00
7f333f006f chore(build): auto-generate vimdoc 2024-03-22 06:18:48 +00:00
213493e766 fix(format): Don't leak bufnr into opts tables (#2794) 2024-03-22 07:18:15 +01:00
70bc880330 chore(build): auto-generate vimdoc 2024-03-21 13:51:23 +00:00
4187417158 fix(python): basedpyright is now supported by mason-lspconfig 2024-03-20 22:25:59 +01:00
6e57e86c99 feat: added LazyVim global. Will refactor specs later to use that 2024-03-20 17:26:50 +01:00
1661759d33 fix(util.telescope): make show_untracked configurable (#2789) 2024-03-20 17:25:39 +01:00
642bcf168b chore(main): release 10.15.0 (#2790)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-20 17:19:56 +01:00
f6db6054e3 chore(build): auto-generate vimdoc 2024-03-20 16:18:58 +00:00
f055265bff feat(python): added option to configure basedpyright as lsp. Check the python extra docs. Fixes #2787 2024-03-20 17:18:11 +01:00
fa0e538838 fix(lsp): dont auto install disabled lsp servers 2024-03-20 14:13:28 +01:00
1432f318b6 chore(main): release 10.14.0 (#2741)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-19 22:44:49 +01:00
f655139281 feat(mini.ai): add more objects d,e,g,u,U (#2769) 2024-03-19 22:31:00 +01:00
52ee7ef696 fix(format): format injected langs does not wait 300ms (#2737) 2024-03-19 22:29:56 +01:00
ed44b246b4 feat(lualine): add modified_sign to pretty_path (#2754)
Closes #2752

I left the initial text blank on purpose, so that it doesn't change
anything stylistically and let the user decide what he wants to add
in his personal configuration for `lualine` spec.
2024-03-19 22:28:31 +01:00
6a37171df6 fix(extras): accept symlinks in User extras directory (#2745) 2024-03-19 22:28:00 +01:00
b8c6d87825 chore(build): auto-generate vimdoc 2024-03-19 21:02:56 +00:00
393a9c7c7a fix(neotest): add required nvim-nio to test and dap extra (neotest and nvim-dap-ui respectively) (#2763)
* Adding required nvim-nio to neotest in test-core

neotest now requires nvim-neotest/nvim-nio to be
installed as per BREAKING CHANGE: https://github.com/nvim-neotest/neotest/pull/337

* Adding nvim-nio as dependency

nvim-dap-ui now requires  nvim-neotest/nvim-nio as a dependency as of recent changes
2024-03-19 22:02:22 +01:00
e1d39b624f chore(build): auto-generate vimdoc 2024-03-18 10:24:36 +00:00
d8d380a60e fix(lazygit): make sure we start lazygit in a valid git root 2024-03-18 11:23:55 +01:00
864c58cae6 chore(build): auto-generate vimdoc 2024-03-15 17:02:05 +00:00
42a7e79d5a fix(git): use compatible function for windows and linux (#2740) 2024-03-15 18:01:33 +01:00
0107a1079b chore(main): release 10.13.0 (#2684)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-14 17:16:28 +01:00
623297efa6 fix(which-key): add group description for folds (#2496)
Signed-off-by: Jeff Davis <mr.jefedavis@gmail.com>
2024-03-14 17:12:47 +01:00
991523431f fix(mini.files): description for g. keybinding in mini.files (#2693)
If you press `g` in a mini.files menu, the `.` key shows up but doesn't have a description. This adds a desc attribute to the binding so the menu shows a correct description.
2024-03-14 17:12:23 +01:00
843032ef1c fix(markdown): disable headlines.nvim bullets for now 2024-03-14 16:53:00 +01:00
0ba731a879 fix(markdown): disable headlines.nvim in insert mode. Fixes #2717 2024-03-14 16:39:23 +01:00
98c8226e21 chore(build): auto-generate vimdoc 2024-03-14 13:15:16 +00:00
afca0b7876 fix(conform): make lsp_fallback option user configurable (#2616) 2024-03-14 14:14:41 +01:00
2a666ac5f2 fix(rust): don't overwrite vim.g.rustaceanvim if it is defined (#2720) 2024-03-14 00:07:40 +01:00
d2f7cb0462 chore(build): auto-generate vimdoc 2024-03-13 23:07:24 +00:00
0ec7a9040b feat(git): add <leader>gf for lazygit commit history on current file (#2728)
* Add <leader>gf for lazygit commit history on current file

* Change root dir to git root using git command

* refactor: cleanup

---------

Co-authored-by: Uthman Mohamed <83053931+1239uth@users.noreply.github.com>
Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-03-14 00:06:47 +01:00
cca2e09149 chore(build): auto-generate vimdoc 2024-03-11 22:14:34 +00:00
1c9f4160a2 fix(options): dont set clipboard in an SSH session, so that OSC52 can be enabled (when supported) 2024-03-11 23:13:51 +01:00
78e6405f90 chore(build): auto-generate vimdoc 2024-03-10 08:46:17 +00:00
d3761eded7 feat(lualine): add more hl options to pretty_path (#2687)
* feat(lualine): add more hl options to pretty_path

Adds two additional options to pretty_path: filename_hl and dirpath_hl.

This allows users to customize the highlight group of both the directory
component of the path name and the filenname independently. modified_hl
is still used when the buffer has been modified.

Thanks to dpetka2001 (Iordanis Petkakis) for the changes to the format
function.

* feat: cleanup

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-03-10 09:45:40 +01:00
aa9fb1fd23 chore(build): auto-generate vimdoc 2024-03-09 08:00:17 +00:00
b12e742458 fix(terraform-extra): Drop unnecessary commentstring config for terraform (#2680)
* fix(terraform-extra): Drop unnecessary commentstring config for terraform

The commentstring for terraform and hcl files is now handled by nvim-ts-context-commentstring:

JoosepAlviste/nvim-ts-context-commentstring#94

* Fixed terraform.lua issues. I'm bad.
2024-03-09 08:59:44 +01:00
e3bfcb9bf7 chore(main): release 10.12.1 (#2677)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-08 11:55:40 +01:00
935bc2283f fix(extras): prevent duplicate extra imports 2024-03-08 11:51:18 +01:00
ee2e876252 fix(extras): automatically rename extra symbols-outline => outline. Fixes #2675 2024-03-08 11:47:17 +01:00
7415231855 fix(hi-patterns): correct regex for shorthand hex colors. See ##2562 2024-03-08 11:31:45 +01:00
166942251d chore(build): auto-generate vimdoc 2024-03-08 10:23:09 +00:00
04bc5718a5 fix(haskell): Make Haskell-snippets lazy load for performance (#2676)
* fix(haskell): add filetype to haskell-snippets for lazy load

* format haskell.lua

---------

Co-authored-by: Uthman Mohamed <83053931+1239uth@users.noreply.github.com>
2024-03-08 11:22:36 +01:00
c0ad2209b6 chore(main): release 10.12.0 (#2667)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-07 20:45:12 +01:00
4745314074 fix(extras): set correct priority for outline extra. Fixes #2666 2024-03-07 20:43:13 +01:00
139c41c18e feat(lang): replace rust-tools.nvim with rustacean.nvim #2198
dummy commit to trigger changelog.
original commit message was not correct and didnt get picked up by the changelog
2024-03-07 20:41:12 +01:00
59 changed files with 682 additions and 329 deletions

View File

@ -1,5 +1,129 @@
# Changelog
## [10.17.3](https://github.com/LazyVim/LazyVim/compare/v10.17.2...v10.17.3) (2024-03-26)
### Performance Improvements
* **notify:** disable animation notifications. too big impact on performance for too little benefit ([f3655c3](https://github.com/LazyVim/LazyVim/commit/f3655c33a3239b67ce9c5e5a8cc384691fd8126c))
## [10.17.2](https://github.com/LazyVim/LazyVim/compare/v10.17.1...v10.17.2) (2024-03-26)
### Bug Fixes
* **lazygit:** dont error when setting ansi color fails. Fixes [#2829](https://github.com/LazyVim/LazyVim/issues/2829) ([a26ca7b](https://github.com/LazyVim/LazyVim/commit/a26ca7bf56790f6bc35134a5037df0405437a1be))
## [10.17.1](https://github.com/LazyVim/LazyVim/compare/v10.17.0...v10.17.1) (2024-03-26)
### Bug Fixes
* **lazygit:** allow overriding default terminal options ([bfe8c60](https://github.com/LazyVim/LazyVim/commit/bfe8c608a33255511fa3e79bf77fd7257022a525))
## [10.17.0](https://github.com/LazyVim/LazyVim/compare/v10.16.0...v10.17.0) (2024-03-26)
### Features
* **lazygit:** lazygit now automatically uses colors from your Neovim colorscheme ([7d0dbc6](https://github.com/LazyVim/LazyVim/commit/7d0dbc6dedc2d6cb4c3bc77fa296dc07ce5927c9))
* **neo-tree:** add mapping "O" to open with system default ([#2758](https://github.com/LazyVim/LazyVim/issues/2758)) ([b74ef23](https://github.com/LazyVim/LazyVim/commit/b74ef23a27dc4efc1cf76f14eb5ecced963d694d))
* **options:** Disable foldtext for nightly ([#2447](https://github.com/LazyVim/LazyVim/issues/2447)) ([7ab6285](https://github.com/LazyVim/LazyVim/commit/7ab628501150b6dbaa6daae4a8ac7b864318677f))
* **python:** allow configuring other python lsp servers than pyright, basedpyright ([3e5a5dd](https://github.com/LazyVim/LazyVim/commit/3e5a5dd621438cff4dbe29df227585b46ede7e44))
* **util:** added util function to get a fg/bg color from the active colorscheme ([c00e3aa](https://github.com/LazyVim/LazyVim/commit/c00e3aa6b1d053e5bea7bfdfbfd3b5aedb6cb5be))
## [10.16.0](https://github.com/LazyVim/LazyVim/compare/v10.15.0...v10.16.0) (2024-03-22)
### Features
* added LazyVim global. Will refactor specs later to use that ([6e57e86](https://github.com/LazyVim/LazyVim/commit/6e57e86c9952986a0e90055e13aa86dcde5e478e))
* **lazyterm:** optional shell setup, mainly for pwsh. Fixes [#2151](https://github.com/LazyVim/LazyVim/issues/2151) ([3d4ab4e](https://github.com/LazyVim/LazyVim/commit/3d4ab4eb2634c9280676a7efdfb2753e5b2f8536))
* **telescope-fzf-native:** added support for building with cmake. Fixes [#2132](https://github.com/LazyVim/LazyVim/issues/2132) ([1c13a5c](https://github.com/LazyVim/LazyVim/commit/1c13a5c10b745f741ebbb08d3963862e9d4e307e))
* use `vim.uv` everywhere instead of `vim.loop` ([3a87c08](https://github.com/LazyVim/LazyVim/commit/3a87c08cdadb23ae88bd6eb193e8392e986df6bb))
* use LazyVim everywhere instead of `require("lazyvim.util")` ([7a5dbea](https://github.com/LazyVim/LazyVim/commit/7a5dbeae75b553b489af8074e9a87207edf1395c))
### Bug Fixes
* add shim for vim.uv just in case someone upgrades lazyvim before lazy ([4b8fe44](https://github.com/LazyVim/LazyVim/commit/4b8fe44c08610be7a0603d84ae03ca81a98cbeee))
* **cmake:** lazy load cmake-tools. Fixes [#2767](https://github.com/LazyVim/LazyVim/issues/2767) ([69aedc2](https://github.com/LazyVim/LazyVim/commit/69aedc265724c71711753333e3b7506fbeab78ef))
* **format:** Don't leak bufnr into opts tables ([#2794](https://github.com/LazyVim/LazyVim/issues/2794)) ([213493e](https://github.com/LazyVim/LazyVim/commit/213493e766df7a5405050205f6050ff24e5a2d6d))
* **java:** dont error when not using cmp. Fixes [#2038](https://github.com/LazyVim/LazyVim/issues/2038) ([8d31bf2](https://github.com/LazyVim/LazyVim/commit/8d31bf230cf9ad872ad50251d405ed628c9e69ae))
* **python:** basedpyright is now supported by mason-lspconfig ([4187417](https://github.com/LazyVim/LazyVim/commit/4187417158a22ff80a059a73f2eddb113f59c113))
* **util.telescope:** make `show_untracked` configurable ([#2789](https://github.com/LazyVim/LazyVim/issues/2789)) ([1661759](https://github.com/LazyVim/LazyVim/commit/1661759d3358dbaa4be834f0022d53071b6fb21c))
## [10.15.0](https://github.com/LazyVim/LazyVim/compare/v10.14.0...v10.15.0) (2024-03-20)
### Features
* **python:** added option to configure basedpyright as lsp. Check the python extra docs. Fixes [#2787](https://github.com/LazyVim/LazyVim/issues/2787) ([f055265](https://github.com/LazyVim/LazyVim/commit/f055265bff24f047320bca1a402ab55a32b35111))
### Bug Fixes
* **lsp:** dont auto install disabled lsp servers ([fa0e538](https://github.com/LazyVim/LazyVim/commit/fa0e538838f2bd3b429a98a6d676dacb7b0916af))
## [10.14.0](https://github.com/LazyVim/LazyVim/compare/v10.13.0...v10.14.0) (2024-03-19)
### Features
* **lualine:** add `modified_sign` to `pretty_path` ([#2754](https://github.com/LazyVim/LazyVim/issues/2754)) ([ed44b24](https://github.com/LazyVim/LazyVim/commit/ed44b246b443939ca7755bef1522c68df94c2a76))
* **mini.ai:** add more objects d,e,g,u,U ([#2769](https://github.com/LazyVim/LazyVim/issues/2769)) ([f655139](https://github.com/LazyVim/LazyVim/commit/f65513928127ec4e2e4187af36ec49255bd0f5fb))
### Bug Fixes
* **extras:** accept symlinks in User `extras` directory ([#2745](https://github.com/LazyVim/LazyVim/issues/2745)) ([6a37171](https://github.com/LazyVim/LazyVim/commit/6a37171df6391482a3440cf607c173525bc875ba))
* **format:** format injected langs does not wait 300ms ([#2737](https://github.com/LazyVim/LazyVim/issues/2737)) ([52ee7ef](https://github.com/LazyVim/LazyVim/commit/52ee7ef6962f499114f8e91230ef5558444e3a0c))
* **git:** use compatible function for windows and linux ([#2740](https://github.com/LazyVim/LazyVim/issues/2740)) ([42a7e79](https://github.com/LazyVim/LazyVim/commit/42a7e79d5a09936ee521cab29d601d336c396c18))
* **lazygit:** make sure we start lazygit in a valid git root ([d8d380a](https://github.com/LazyVim/LazyVim/commit/d8d380a60e7dc396fcf2fee90ace77760585d685))
* **neotest:** add required nvim-nio to test and dap extra (neotest and nvim-dap-ui respectively) ([#2763](https://github.com/LazyVim/LazyVim/issues/2763)) ([393a9c7](https://github.com/LazyVim/LazyVim/commit/393a9c7c7ab2c37a69a9b5da609c27fa2fd3816c))
## [10.13.0](https://github.com/LazyVim/LazyVim/compare/v10.12.1...v10.13.0) (2024-03-14)
### Features
* **git:** add &lt;leader&gt;gf for lazygit commit history on current file ([#2728](https://github.com/LazyVim/LazyVim/issues/2728)) ([0ec7a90](https://github.com/LazyVim/LazyVim/commit/0ec7a9040b60943597649940619f23bfa4b46990))
* **lualine:** add more hl options to pretty_path ([#2687](https://github.com/LazyVim/LazyVim/issues/2687)) ([d3761ed](https://github.com/LazyVim/LazyVim/commit/d3761eded733b5f00e1ee14fef3fb2ce0dfb7dd0))
### Bug Fixes
* **conform:** make `lsp_fallback` option user configurable ([#2616](https://github.com/LazyVim/LazyVim/issues/2616)) ([afca0b7](https://github.com/LazyVim/LazyVim/commit/afca0b7876abf9022ee0754270f603e981ea42a5))
* **markdown:** disable headlines.nvim bullets for now ([843032e](https://github.com/LazyVim/LazyVim/commit/843032ef1c751abf732b6f1d989584c199f049fb))
* **markdown:** disable headlines.nvim in insert mode. Fixes [#2717](https://github.com/LazyVim/LazyVim/issues/2717) ([0ba731a](https://github.com/LazyVim/LazyVim/commit/0ba731a87977e98f2420e2c6d2c4cabbcedaff60))
* **mini.files:** description for `g.` keybinding in mini.files ([#2693](https://github.com/LazyVim/LazyVim/issues/2693)) ([9915234](https://github.com/LazyVim/LazyVim/commit/991523431ff779b3bfe8ae133fa8109d8950d361))
* **options:** dont set clipboard in an SSH session, so that OSC52 can be enabled (when supported) ([1c9f416](https://github.com/LazyVim/LazyVim/commit/1c9f4160a22dbdca2db36169460fcf28641607e7))
* **rust:** don't overwrite `vim.g.rustaceanvim` if it is defined ([#2720](https://github.com/LazyVim/LazyVim/issues/2720)) ([2a666ac](https://github.com/LazyVim/LazyVim/commit/2a666ac5f2d91f0a1f1b711281dd72725f9759a1))
* **terraform-extra:** Drop unnecessary commentstring config for terraform ([#2680](https://github.com/LazyVim/LazyVim/issues/2680)) ([b12e742](https://github.com/LazyVim/LazyVim/commit/b12e7424580d4b524755eec33006d4517fa3182e))
* **which-key:** add group description for folds ([#2496](https://github.com/LazyVim/LazyVim/issues/2496)) ([623297e](https://github.com/LazyVim/LazyVim/commit/623297efa688283b54f1b9ad169feca69aaaae67))
## [10.12.1](https://github.com/LazyVim/LazyVim/compare/v10.12.0...v10.12.1) (2024-03-08)
### Bug Fixes
* **extras:** automatically rename extra symbols-outline =&gt; outline. Fixes [#2675](https://github.com/LazyVim/LazyVim/issues/2675) ([ee2e876](https://github.com/LazyVim/LazyVim/commit/ee2e876252c82458d47617b6d87d827ea442ddcd))
* **extras:** prevent duplicate extra imports ([935bc22](https://github.com/LazyVim/LazyVim/commit/935bc2283f9968a8fb1fc2466a14618a838cb904))
* **haskell:** Make Haskell-snippets lazy load for performance ([#2676](https://github.com/LazyVim/LazyVim/issues/2676)) ([04bc571](https://github.com/LazyVim/LazyVim/commit/04bc5718a51364dddf365ba9163b2a1c7d74071d))
* **hi-patterns:** correct regex for shorthand hex colors. See #[#2562](https://github.com/LazyVim/LazyVim/issues/2562) ([7415231](https://github.com/LazyVim/LazyVim/commit/7415231855f8173e9664c035a1a631da8c664948))
## [10.12.0](https://github.com/LazyVim/LazyVim/compare/v10.11.1...v10.12.0) (2024-03-07)
### Features
* **lang:** replace rust-tools.nvim with rustacean.nvim [#2198](https://github.com/LazyVim/LazyVim/issues/2198) ([139c41c](https://github.com/LazyVim/LazyVim/commit/139c41c18ed7bde8dbaf5ef18afc063a96092954))
### Bug Fixes
* **extras:** set correct priority for outline extra. Fixes [#2666](https://github.com/LazyVim/LazyVim/issues/2666) ([4745314](https://github.com/LazyVim/LazyVim/commit/474531407454cb69f1d09e4bc1120b9571dc8697))
## [10.11.1](https://github.com/LazyVim/LazyVim/compare/v10.11.0...v10.11.1) (2024-03-07)

17
NEWS.md
View File

@ -2,6 +2,23 @@
## 10.x
- **lazygit** now automatically uses the colors of your current colorscheme.
This is enabled by default. To disable, add the below to your `options.lua`:
```lua
vim.g.lazygit_theme = false
```
- Added support for `basedpyright` to the **python** extra.
Enable in your `options.lua` with:
```lua
vim.g.lazyvim_python_lsp = "basedpyright"
```
Be aware that `basedpyright` is still in development and
may not work exactly the same as `pyright`.
- User extras under `lua/plugins/extras` can now also be managed
with **LazyExtras**

View File

@ -1,4 +1,4 @@
*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 March 07
*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 March 26
==============================================================================
Table of Contents *LazyVim-table-of-contents*

View File

@ -109,30 +109,7 @@ vim.api.nvim_create_autocmd({ "BufWritePre" }, {
if event.match:match("^%w%w+://") then
return
end
local file = vim.loop.fs_realpath(event.match) or event.match
local file = vim.uv.fs_realpath(event.match) or event.match
vim.fn.mkdir(vim.fn.fnamemodify(file, ":p:h"), "p")
end,
})
-- Copy/Paste when using ssh on a remote server
-- Only works on Neovim >= 0.10.0
if vim.clipboard and vim.clipboard.osc52 then
vim.api.nvim_create_autocmd("VimEnter", {
group = augroup("ssh_clipboard"),
callback = function()
if vim.env.SSH_CONNECTION and vim.clipboard.osc52 then
vim.g.clipboard = {
name = "OSC 52",
copy = {
["+"] = require("vim.clipboard.osc52").copy,
["*"] = require("vim.clipboard.osc52").copy,
},
paste = {
["+"] = require("vim.clipboard.osc52").paste,
["*"] = require("vim.clipboard.osc52").paste,
},
}
end
end,
})
end

View File

@ -1,9 +1,9 @@
local Util = require("lazyvim.util")
_G.LazyVim = require("lazyvim.util")
---@class LazyVimConfig: LazyVimOptions
local M = {}
M.version = "10.11.1" -- x-release-please-version
M.version = "10.17.3" -- x-release-please-version
---@class LazyVimOptions
local defaults = {
@ -131,7 +131,7 @@ local defaults = {
}
M.json = {
version = 2,
version = 3,
data = {
version = nil, ---@type string?
news = {}, ---@type table<string, string>
@ -149,7 +149,7 @@ function M.json.load()
if ok then
M.json.data = vim.tbl_deep_extend("force", M.json.data, json or {})
if M.json.data.version ~= M.json.version then
Util.json.migrate()
LazyVim.json.migrate()
end
end
end
@ -178,12 +178,12 @@ function M.setup(opts)
end
M.load("keymaps")
Util.format.setup()
Util.news.setup()
Util.root.setup()
LazyVim.format.setup()
LazyVim.news.setup()
LazyVim.root.setup()
vim.api.nvim_create_user_command("LazyExtras", function()
Util.extras.show()
LazyVim.extras.show()
end, { desc = "Manage LazyVim extras" })
vim.api.nvim_create_user_command("LazyHealth", function()
@ -193,8 +193,8 @@ function M.setup(opts)
end,
})
Util.track("colorscheme")
Util.try(function()
LazyVim.track("colorscheme")
LazyVim.try(function()
if type(M.colorscheme) == "function" then
M.colorscheme()
else
@ -203,11 +203,11 @@ function M.setup(opts)
end, {
msg = "Could not load your colorscheme",
on_error = function(msg)
Util.error(msg)
LazyVim.error(msg)
vim.cmd.colorscheme("habamax")
end,
})
Util.track()
LazyVim.track()
end
---@param buf? number
@ -229,7 +229,7 @@ end
function M.load(name)
local function _load(mod)
if require("lazy.core.cache").find(mod)[1] then
Util.try(function()
LazyVim.try(function()
require(mod)
end, { msg = "Failed loading " .. mod })
end
@ -259,19 +259,19 @@ function M.init()
end
package.preload["lazyvim.plugins.lsp.format"] = function()
Util.deprecate([[require("lazyvim.plugins.lsp.format")]], [[require("lazyvim.util").format]])
return Util.format
LazyVim.deprecate([[require("lazyvim.plugins.lsp.format")]], [[LazyVim.format]])
return LazyVim.format
end
-- delay notifications till vim.notify was replaced or after 500ms
require("lazyvim.util").lazy_notify()
LazyVim.lazy_notify()
-- load options here, before lazy init while sourcing plugin modules
-- this is needed to make sure options will be correctly applied
-- after installing missing plugins
M.load("options")
Util.plugin.setup()
LazyVim.plugin.setup()
M.json.load()
end

View File

@ -1,9 +1,8 @@
-- This file is automatically loaded by lazyvim.config.init
local Util = require("lazyvim.util")
-- DO NOT USE THIS IN YOU OWN CONFIG!!
-- use `vim.keymap.set` instead
local map = Util.safe_keymap_set
local map = LazyVim.safe_keymap_set
-- better up/down
map({ "n", "x" }, "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
@ -88,7 +87,7 @@ map("n", "]q", vim.cmd.cnext, { desc = "Next quickfix" })
-- formatting
map({ "n", "v" }, "<leader>cf", function()
Util.format({ force = true })
LazyVim.format({ force = true })
end, { desc = "Format" })
-- diagnostic
@ -110,24 +109,29 @@ map("n", "[w", diagnostic_goto(false, "WARN"), { desc = "Prev Warning" })
-- stylua: ignore start
-- toggle options
map("n", "<leader>uf", function() Util.format.toggle() end, { desc = "Toggle auto format (global)" })
map("n", "<leader>uF", function() Util.format.toggle(true) end, { desc = "Toggle auto format (buffer)" })
map("n", "<leader>us", function() Util.toggle("spell") end, { desc = "Toggle Spelling" })
map("n", "<leader>uw", function() Util.toggle("wrap") end, { desc = "Toggle Word Wrap" })
map("n", "<leader>uL", function() Util.toggle("relativenumber") end, { desc = "Toggle Relative Line Numbers" })
map("n", "<leader>ul", function() Util.toggle.number() end, { desc = "Toggle Line Numbers" })
map("n", "<leader>ud", function() Util.toggle.diagnostics() end, { desc = "Toggle Diagnostics" })
map("n", "<leader>uf", function() LazyVim.format.toggle() end, { desc = "Toggle auto format (global)" })
map("n", "<leader>uF", function() LazyVim.format.toggle(true) end, { desc = "Toggle auto format (buffer)" })
map("n", "<leader>us", function() LazyVim.toggle("spell") end, { desc = "Toggle Spelling" })
map("n", "<leader>uw", function() LazyVim.toggle("wrap") end, { desc = "Toggle Word Wrap" })
map("n", "<leader>uL", function() LazyVim.toggle("relativenumber") end, { desc = "Toggle Relative Line Numbers" })
map("n", "<leader>ul", function() LazyVim.toggle.number() end, { desc = "Toggle Line Numbers" })
map("n", "<leader>ud", function() LazyVim.toggle.diagnostics() end, { desc = "Toggle Diagnostics" })
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" })
map("n", "<leader>uc", function() LazyVim.toggle("conceallevel", false, {0, conceallevel}) end, { desc = "Toggle Conceal" })
if vim.lsp.buf.inlay_hint or vim.lsp.inlay_hint then
map( "n", "<leader>uh", function() Util.toggle.inlay_hints() end, { desc = "Toggle Inlay Hints" })
map( "n", "<leader>uh", function() LazyVim.toggle.inlay_hints() end, { desc = "Toggle Inlay Hints" })
end
map("n", "<leader>uT", function() if vim.b.ts_highlight then vim.treesitter.stop() else vim.treesitter.start() end end, { desc = "Toggle Treesitter Highlight" })
map("n", "<leader>ub", function() Util.toggle("background", false, {"light", "dark"}) end, { desc = "Toggle Background" })
map("n", "<leader>ub", function() LazyVim.toggle("background", false, {"light", "dark"}) end, { desc = "Toggle Background" })
-- lazygit
map("n", "<leader>gg", function() Util.terminal({ "lazygit" }, { cwd = Util.root(), esc_esc = false, ctrl_hjkl = false }) end, { desc = "Lazygit (root dir)" })
map("n", "<leader>gG", function() Util.terminal({ "lazygit" }, {esc_esc = false, ctrl_hjkl = false}) end, { desc = "Lazygit (cwd)" })
map("n", "<leader>gg", function() LazyVim.lazygit( { cwd = LazyVim.root.git() }) end, { desc = "Lazygit (root dir)" })
map("n", "<leader>gG", function() LazyVim.lazygit() end, { desc = "Lazygit (cwd)" })
map("n", "<leader>gf", function()
local git_path = vim.api.nvim_buf_get_name(0)
LazyVim.lazygit({args = { "-f", vim.trim(git_path) }})
end, { desc = "Lazygit current file history" })
-- quit
map("n", "<leader>qq", "<cmd>qa<cr>", { desc = "Quit all" })
@ -136,12 +140,12 @@ map("n", "<leader>qq", "<cmd>qa<cr>", { desc = "Quit all" })
map("n", "<leader>ui", vim.show_pos, { desc = "Inspect Pos" })
-- LazyVim Changelog
map("n", "<leader>L", function() Util.news.changelog() end, { desc = "LazyVim Changelog" })
map("n", "<leader>L", function() LazyVim.news.changelog() end, { desc = "LazyVim Changelog" })
-- floating terminal
local lazyterm = function() Util.terminal(nil, { cwd = Util.root() }) end
local lazyterm = function() LazyVim.terminal(nil, { cwd = LazyVim.root() }) end
map("n", "<leader>ft", lazyterm, { desc = "Terminal (root dir)" })
map("n", "<leader>fT", function() Util.terminal() end, { desc = "Terminal (cwd)" })
map("n", "<leader>fT", function() LazyVim.terminal() end, { desc = "Terminal (cwd)" })
map("n", "<c-/>", lazyterm, { desc = "Terminal (root dir)" })
map("n", "<c-_>", lazyterm, { desc = "which_key_ignore" })

View File

@ -12,10 +12,27 @@ vim.g.autoformat = true
-- * a function with signature `function(buf) -> string|string[]`
vim.g.root_spec = { "lsp", { ".git", "lua" }, "cwd" }
-- LazyVim automatically configures the lazygit theme,
-- based on the active colorscheme.
-- Set to false to disable.
vim.g.lazygit_theme = true
-- Optionally setup the terminal to use
-- This sets `vim.o.shell` and does some additional configuration for:
-- * pwsh
-- * powershell
-- LazyVim.terminal.setup("pwsh")
local opt = vim.opt
opt.autowrite = true -- Enable auto write
opt.clipboard = "unnamedplus" -- Sync with system clipboard
if not vim.env.SSH_TTY then
-- only set clipboard if not in ssh, to make sure the OSC 52
-- integration works automatically. Requires Neovim >= 0.10.0
opt.clipboard = "unnamedplus" -- Sync with system clipboard
end
opt.completeopt = "menu,menuone,noselect"
opt.conceallevel = 2 -- Hide * markup for bold and italic, but not markers with substitutions
opt.confirm = true -- Confirm to save changes before exiting modified buffer
@ -62,7 +79,6 @@ opt.wrap = false -- Disable line wrap
opt.fillchars = {
foldopen = "",
foldclose = "",
-- fold = "⸱",
fold = " ",
foldsep = " ",
diff = "",
@ -75,16 +91,18 @@ end
-- Folding
vim.opt.foldlevel = 99
vim.opt.foldtext = "v:lua.require'lazyvim.util'.ui.foldtext()"
if vim.fn.has("nvim-0.9.0") == 1 then
vim.opt.statuscolumn = [[%!v:lua.require'lazyvim.util'.ui.statuscolumn()]]
vim.opt.foldtext = "v:lua.require'lazyvim.util'.ui.foldtext()"
end
-- HACK: causes freezes on <= 0.9, so only enable on >= 0.10 for now
if vim.fn.has("nvim-0.10") == 1 then
vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "v:lua.require'lazyvim.util'.ui.foldexpr()"
vim.opt.foldtext = ""
vim.opt.fillchars = "fold: "
else
vim.opt.foldmethod = "indent"
end

View File

@ -1,3 +1,5 @@
vim.uv = vim.uv or vim.loop
local M = {}
---@param opts? LazyVimConfig

View File

@ -122,12 +122,11 @@ return {
{
"<leader>up",
function()
local Util = require("lazy.core.util")
vim.g.minipairs_disable = not vim.g.minipairs_disable
if vim.g.minipairs_disable then
Util.warn("Disabled auto pairs", { title = "Option" })
LazyVim.warn("Disabled auto pairs", { title = "Option" })
else
Util.info("Enabled auto pairs", { title = "Option" })
LazyVim.info("Enabled auto pairs", { title = "Option" })
end
end,
desc = "Toggle auto pairs",
@ -212,13 +211,33 @@ return {
f = ai.gen_spec.treesitter({ a = "@function.outer", i = "@function.inner" }, {}),
c = ai.gen_spec.treesitter({ a = "@class.outer", i = "@class.inner" }, {}),
t = { "<([%p%w]-)%f[^<%w][^<>]->.-</%1>", "^<.->().*()</[^/]->$" },
d = { "%f[%d]%d+" }, -- digits
e = { -- Word with case
{
"%u[%l%d]+%f[^%l%d]",
"%f[%S][%l%d]+%f[^%l%d]",
"%f[%P][%l%d]+%f[^%l%d]",
"^[%l%d]+%f[^%l%d]",
},
"^().*()$",
},
g = function() -- Whole buffer, similar to `gg` and 'G' motion
local from = { line = 1, col = 1 }
local to = {
line = vim.fn.line("$"),
col = math.max(vim.fn.getline("$"):len(), 1),
}
return { from = from, to = to }
end,
u = ai.gen_spec.function_call(), -- u for "Usage"
U = ai.gen_spec.function_call({ name_pattern = "[%w_]" }), -- without dot in function name
},
}
end,
config = function(_, opts)
require("mini.ai").setup(opts)
-- register all text objects with which-key
require("lazyvim.util").on_load("which-key.nvim", function()
LazyVim.on_load("which-key.nvim", function()
---@type table<string, string|table>
local i = {
[" "] = "Whitespace",
@ -238,10 +257,15 @@ return {
a = "Argument",
b = "Balanced ), ], }",
c = "Class",
d = "Digit(s)",
e = "Word in CamelCase & snake_case",
f = "Function",
g = "Entire file",
o = "Block, conditional, loop",
q = "Quote `, \", '",
t = "Tag",
u = "Use/call function & method",
U = "Use/call without dot in name",
}
local a = vim.deepcopy(i)
for k, v in pairs(a) do

View File

@ -1,5 +1,3 @@
local Util = require("lazyvim.util")
return {
-- file explorer
@ -11,14 +9,14 @@ return {
{
"<leader>fe",
function()
require("neo-tree.command").execute({ toggle = true, dir = Util.root() })
require("neo-tree.command").execute({ toggle = true, dir = LazyVim.root() })
end,
desc = "Explorer NeoTree (root dir)",
},
{
"<leader>fE",
function()
require("neo-tree.command").execute({ toggle = true, dir = vim.loop.cwd() })
require("neo-tree.command").execute({ toggle = true, dir = vim.uv.cwd() })
end,
desc = "Explorer NeoTree (cwd)",
},
@ -44,7 +42,7 @@ return {
end,
init = function()
if vim.fn.argc(-1) == 1 then
local stat = vim.loop.fs_stat(vim.fn.argv(0))
local stat = vim.uv.fs_stat(vim.fn.argv(0))
if stat and stat.type == "directory" then
require("neo-tree")
end
@ -69,6 +67,12 @@ return {
end,
desc = "copy path to clipboard",
},
["O"] = {
function(state)
require("lazy.util").open(state.tree:get_node().path, { system = true })
end,
desc = "open with system application",
},
},
},
default_component_configs = {
@ -82,7 +86,7 @@ return {
},
config = function(_, opts)
local function on_move(data)
Util.lsp.on_rename(data.source, data.destination)
LazyVim.lsp.on_rename(data.source, data.destination)
end
local events = require("neo-tree.events")
@ -126,10 +130,11 @@ return {
dependencies = {
{
"nvim-telescope/telescope-fzf-native.nvim",
build = "make",
enabled = vim.fn.executable("make") == 1,
build = vim.fn.executable("make") == 1 and "make"
or "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build",
enabled = vim.fn.executable("make") == 1 or vim.fn.executable("cmake") == 1,
config = function()
Util.on_load("telescope.nvim", function()
LazyVim.on_load("telescope.nvim", function()
require("telescope").load_extension("fzf")
end)
end,
@ -141,17 +146,17 @@ return {
"<cmd>Telescope buffers sort_mru=true sort_lastused=true<cr>",
desc = "Switch Buffer",
},
{ "<leader>/", Util.telescope("live_grep"), desc = "Grep (root dir)" },
{ "<leader>/", LazyVim.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)" },
{ "<leader><space>", LazyVim.telescope("files"), desc = "Find Files (root dir)" },
-- find
{ "<leader>fb", "<cmd>Telescope buffers sort_mru=true sort_lastused=true<cr>", desc = "Buffers" },
{ "<leader>fc", Util.telescope.config_files(), desc = "Find Config File" },
{ "<leader>ff", Util.telescope("files"), desc = "Find Files (root dir)" },
{ "<leader>fF", Util.telescope("files", { cwd = false }), desc = "Find Files (cwd)" },
{ "<leader>fc", LazyVim.telescope.config_files(), desc = "Find Config File" },
{ "<leader>ff", LazyVim.telescope("files"), desc = "Find Files (root dir)" },
{ "<leader>fF", LazyVim.telescope("files", { cwd = false }), desc = "Find Files (cwd)" },
{ "<leader>fg", "<cmd>Telescope git_files<cr>", desc = "Find Files (git-files)" },
{ "<leader>fr", "<cmd>Telescope oldfiles<cr>", desc = "Recent" },
{ "<leader>fR", Util.telescope("oldfiles", { cwd = vim.loop.cwd() }), desc = "Recent (cwd)" },
{ "<leader>fR", LazyVim.telescope("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" },
-- git
{ "<leader>gc", "<cmd>Telescope git_commits<CR>", desc = "commits" },
{ "<leader>gs", "<cmd>Telescope git_status<CR>", desc = "status" },
@ -163,8 +168,8 @@ return {
{ "<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>sg", Util.telescope("live_grep"), desc = "Grep (root dir)" },
{ "<leader>sG", Util.telescope("live_grep", { cwd = false }), desc = "Grep (cwd)" },
{ "<leader>sg", LazyVim.telescope("live_grep"), desc = "Grep (root dir)" },
{ "<leader>sG", LazyVim.telescope("live_grep", { cwd = false }), desc = "Grep (cwd)" },
{ "<leader>sh", "<cmd>Telescope help_tags<cr>", desc = "Help Pages" },
{ "<leader>sH", "<cmd>Telescope highlights<cr>", desc = "Search Highlight Groups" },
{ "<leader>sk", "<cmd>Telescope keymaps<cr>", desc = "Key Maps" },
@ -172,11 +177,11 @@ return {
{ "<leader>sm", "<cmd>Telescope marks<cr>", desc = "Jump to Mark" },
{ "<leader>so", "<cmd>Telescope vim_options<cr>", desc = "Options" },
{ "<leader>sR", "<cmd>Telescope resume<cr>", desc = "Resume" },
{ "<leader>sw", Util.telescope("grep_string", { word_match = "-w" }), desc = "Word (root dir)" },
{ "<leader>sW", Util.telescope("grep_string", { cwd = false, word_match = "-w" }), desc = "Word (cwd)" },
{ "<leader>sw", Util.telescope("grep_string"), mode = "v", desc = "Selection (root dir)" },
{ "<leader>sW", Util.telescope("grep_string", { cwd = false }), mode = "v", desc = "Selection (cwd)" },
{ "<leader>uC", Util.telescope("colorscheme", { enable_preview = true }), desc = "Colorscheme with preview" },
{ "<leader>sw", LazyVim.telescope("grep_string", { word_match = "-w" }), desc = "Word (root dir)" },
{ "<leader>sW", LazyVim.telescope("grep_string", { cwd = false, word_match = "-w" }), desc = "Word (cwd)" },
{ "<leader>sw", LazyVim.telescope("grep_string"), mode = "v", desc = "Selection (root dir)" },
{ "<leader>sW", LazyVim.telescope("grep_string", { cwd = false }), mode = "v", desc = "Selection (cwd)" },
{ "<leader>uC", LazyVim.telescope("colorscheme", { enable_preview = true }), desc = "Colorscheme with preview" },
{
"<leader>ss",
function()
@ -208,12 +213,12 @@ return {
local find_files_no_ignore = function()
local action_state = require("telescope.actions.state")
local line = action_state.get_current_line()
Util.telescope("find_files", { no_ignore = true, default_text = line })()
LazyVim.telescope("find_files", { no_ignore = true, default_text = line })()
end
local find_files_with_hidden = function()
local action_state = require("telescope.actions.state")
local line = action_state.get_current_line()
Util.telescope("find_files", { hidden = true, default_text = line })()
LazyVim.telescope("find_files", { hidden = true, default_text = line })()
end
return {
@ -277,7 +282,7 @@ return {
"nvim-telescope/telescope.nvim",
optional = true,
opts = function(_, opts)
if not Util.has("flash.nvim") then
if not LazyVim.has("flash.nvim") then
return
end
local function flash(prompt_bufnr)
@ -315,6 +320,7 @@ return {
mode = { "n", "v" },
["g"] = { name = "+goto" },
["gs"] = { name = "+surround" },
["z"] = { name = "+fold" },
["]"] = { name = "+next" },
["["] = { name = "+prev" },
["<leader><tab>"] = { name = "+tabs" },

View File

@ -27,7 +27,7 @@ return {
optional = true,
event = "VeryLazy",
opts = function(_, opts)
table.insert(opts.sections.lualine_x, 2, require("lazyvim.util").lualine.cmp_source("codeium"))
table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.cmp_source("codeium"))
end,
},
}

View File

@ -19,12 +19,11 @@ return {
optional = true,
event = "VeryLazy",
opts = function(_, opts)
local Util = require("lazyvim.util")
local colors = {
[""] = Util.ui.fg("Special"),
["Normal"] = Util.ui.fg("Special"),
["Warning"] = Util.ui.fg("DiagnosticError"),
["InProgress"] = Util.ui.fg("DiagnosticWarn"),
[""] = LazyVim.ui.fg("Special"),
["Normal"] = LazyVim.ui.fg("Special"),
["Warning"] = LazyVim.ui.fg("DiagnosticError"),
["InProgress"] = LazyVim.ui.fg("DiagnosticWarn"),
}
table.insert(opts.sections.lualine_x, 2, {
function()
@ -36,7 +35,7 @@ return {
if not package.loaded["copilot"] then
return
end
local ok, clients = pcall(require("lazyvim.util").lsp.get_clients, { name = "copilot", bufnr = 0 })
local ok, clients = pcall(LazyVim.lsp.get_clients, { name = "copilot", bufnr = 0 })
if not ok then
return false
end
@ -66,7 +65,7 @@ return {
copilot_cmp.setup(opts)
-- attach cmp source whenever copilot attaches
-- fixes lazy-loading issues with the copilot cmp source
require("lazyvim.util").lsp.on_attach(function(client)
LazyVim.lsp.on_attach(function(client)
if client.name == "copilot" then
copilot_cmp._on_insert_enter({})
end

View File

@ -1,5 +1,3 @@
local Util = require("lazyvim.util")
return {
-- Tabnine cmp source
{
@ -8,7 +6,7 @@ return {
{
"tzachar/cmp-tabnine",
build = {
Util.is_win() and "pwsh -noni .\\install.ps1" or "./install.sh",
LazyVim.is_win() and "pwsh -noni .\\install.ps1" or "./install.sh",
":CmpTabnineHub",
},
dependencies = "hrsh7th/nvim-cmp",
@ -30,7 +28,7 @@ return {
priority = 100,
})
opts.formatting.format = Util.inject.args(opts.formatting.format, function(entry, item)
opts.formatting.format = LazyVim.inject.args(opts.formatting.format, function(entry, item)
-- Hide percentage in the menu
if entry.source.name == "cmp_tabnine" then
item.menu = ""
@ -45,7 +43,7 @@ return {
event = "VeryLazy",
opts = function(_, opts)
local icon = require("lazyvim.config").icons.kinds.TabNine
table.insert(opts.sections.lualine_x, 2, require("lazyvim.util").lualine.cmp_source("cmp_tabnine", icon))
table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.cmp_source("cmp_tabnine", icon))
end,
},
}

View File

@ -18,6 +18,7 @@ return {
-- fancy UI for the debugger
{
"rcarriga/nvim-dap-ui",
dependencies = { "nvim-neotest/nvim-nio" },
-- stylua: ignore
keys = {
{ "<leader>du", function() require("dapui").toggle({ }) end, desc = "Dap UI" },

View File

@ -1,5 +1,4 @@
local Config = require("lazyvim.config")
local Util = require("lazyvim.util")
return {
desc = "Aerial Symbol Browser",
@ -55,7 +54,7 @@ return {
"nvim-telescope/telescope.nvim",
optional = true,
opts = function()
Util.on_load("telescope.nvim", function()
LazyVim.on_load("telescope.nvim", function()
require("telescope").load_extension("aerial")
end)
end,
@ -73,11 +72,11 @@ return {
"folke/edgy.nvim",
optional = true,
opts = function(_, opts)
local edgy_idx = Util.plugin.extra_idx("ui.edgy")
local aerial_idx = Util.plugin.extra_idx("editor.aerial")
local edgy_idx = LazyVim.plugin.extra_idx("ui.edgy")
local aerial_idx = LazyVim.plugin.extra_idx("editor.aerial")
if edgy_idx and edgy_idx > aerial_idx then
Util.warn("The `edgy.nvim` extra must be **imported** before the `aerial.nvim` extra to work properly.", {
LazyVim.warn("The `edgy.nvim` extra must be **imported** before the `aerial.nvim` extra to work properly.", {
title = "LazyVim",
})
end

View File

@ -23,7 +23,7 @@ return {
{
"<leader>fM",
function()
require("mini.files").open(vim.loop.cwd(), true)
require("mini.files").open(vim.uv.cwd(), true)
end,
desc = "Open mini.files (cwd)",
},
@ -50,14 +50,14 @@ return {
callback = function(args)
local buf_id = args.data.buf_id
-- Tweak left-hand side of mapping to your liking
vim.keymap.set("n", "g.", toggle_dotfiles, { buffer = buf_id })
vim.keymap.set("n", "g.", toggle_dotfiles, { buffer = buf_id, desc = "Toggle hidden files" })
end,
})
vim.api.nvim_create_autocmd("User", {
pattern = "MiniFilesActionRename",
callback = function(event)
require("lazyvim.util").lsp.on_rename(event.data.from, event.data.to)
LazyVim.lsp.on_rename(event.data.from, event.data.to)
end,
})
end,

View File

@ -7,7 +7,7 @@ return {
lazy = true,
init = function()
vim.g.navic_silence = true
require("lazyvim.util").lsp.on_attach(function(client, buffer)
LazyVim.lsp.on_attach(function(client, buffer)
if client.supports_method("textDocument/documentSymbol") then
require("nvim-navic").attach(client, buffer)
end

View File

@ -1,5 +1,3 @@
local Util = require("lazyvim.util")
return {
{
"hedyhli/outline.nvim",
@ -37,11 +35,11 @@ return {
"folke/edgy.nvim",
optional = true,
opts = function(_, opts)
local edgy_idx = Util.plugin.extra_idx("ui.edgy")
local symbols_idx = Util.plugin.extra_idx("editor.outline")
local edgy_idx = LazyVim.plugin.extra_idx("ui.edgy")
local symbols_idx = LazyVim.plugin.extra_idx("editor.outline")
if edgy_idx and edgy_idx > symbols_idx then
Util.warn(
LazyVim.warn(
"The `edgy.nvim` extra must be **imported** before the `outline.nvim` extra to work properly.",
{ title = "LazyVim" }
)

View File

@ -85,7 +85,7 @@ return {
},
setup = {
clangd = function(_, opts)
local clangd_ext_opts = require("lazyvim.util").opts("clangd_extensions.nvim")
local clangd_ext_opts = LazyVim.opts("clangd_extensions.nvim")
require("clangd_extensions").setup(vim.tbl_deep_extend("force", clangd_ext_opts or {}, { server = opts }))
return false
end,

View File

@ -43,7 +43,25 @@ return {
},
{
"Civitasv/cmake-tools.nvim",
lazy = true,
init = function()
local loaded = false
local function check()
local cwd = vim.uv.cwd()
if vim.fn.filereadable(cwd .. "/CMakeLists.txt") == 1 then
require("lazy").load({ plugins = { "cmake-tools.nvim" } })
loaded = true
end
end
check()
vim.api.nvim_create_autocmd("DirChanged", {
callback = function()
if not loaded then
check()
end
end,
})
end,
opts = {},
event = "LazyFile",
},
}

View File

@ -61,7 +61,7 @@ return {
gopls = function(_, opts)
-- workaround for gopls not supporting semanticTokensProvider
-- https://github.com/golang/go/issues/54531#issuecomment-1464982242
require("lazyvim.util").lsp.on_attach(function(client, _)
LazyVim.lsp.on_attach(function(client, _)
if client.name == "gopls" then
if not client.server_capabilities.semanticTokensProvider then
local semantic = client.config.capabilities.textDocument.semanticTokens

View File

@ -13,14 +13,14 @@ return {
{
"mrcjkb/haskell-tools.nvim",
version = "^3",
ft = { 'haskell', 'lhaskell', 'cabal', 'cabalproject' },
ft = { "haskell", "lhaskell", "cabal", "cabalproject" },
dependencies = {
{ "nvim-telescope/telescope.nvim", optional = true },
},
config = function()
local ok, telescope = pcall(require, 'telescope')
local ok, telescope = pcall(require, "telescope")
if ok then
telescope.load_extension('ht')
telescope.load_extension("ht")
end
end,
},
@ -33,8 +33,8 @@ return {
end,
},
{
"mfussenegger/nvim-dap",
{
"mfussenegger/nvim-dap",
optional = true,
dependencies = {
{
@ -51,7 +51,7 @@ return {
"nvim-neotest/neotest",
optional = true,
dependencies = {
{ "mrcjkb/neotest-haskell", }
{ "mrcjkb/neotest-haskell" },
},
opts = {
adapters = {
@ -62,23 +62,24 @@ return {
{
"mrcjkb/haskell-snippets.nvim",
dependencies = { "L3MON4D3/LuaSnip", },
dependencies = { "L3MON4D3/LuaSnip" },
ft = { "haskell", "lhaskell", "cabal", "cabalproject" },
config = function()
local haskell_snippets = require('haskell-snippets').all
require('luasnip').add_snippets('haskell', haskell_snippets, { key = 'haskell' })
local haskell_snippets = require("haskell-snippets").all
require("luasnip").add_snippets("haskell", haskell_snippets, { key = "haskell" })
end,
},
{
"luc-tielen/telescope_hoogle",
ft = { 'haskell', 'lhaskell', 'cabal', 'cabalproject' },
ft = { "haskell", "lhaskell", "cabal", "cabalproject" },
dependencies = {
{ "nvim-telescope/telescope.nvim" },
},
config = function()
local ok, telescope = pcall(require, 'telescope')
local ok, telescope = pcall(require, "telescope")
if ok then
telescope.load_extension('hoogle')
telescope.load_extension("hoogle")
end
end,
},
@ -90,7 +91,7 @@ return {
opts = {
setup = {
hls = function()
return true
return true
end,
},
},

View File

@ -1,4 +1,4 @@
require("lazyvim.util").lsp.on_attach(function(client, buffer)
LazyVim.lsp.on_attach(function(client, buffer)
if client.name == "yamlls" then
if vim.api.nvim_get_option_value("filetype", { buf = buffer }) == "helm" then
vim.schedule(function()

View File

@ -1,5 +1,3 @@
local Util = require("lazyvim.util")
-- This is the same as in lspconfig.server_configurations.jdtls, but avoids
-- needing to require that when this module loads.
local java_filetypes = { "java" }
@ -109,13 +107,13 @@ return {
}
end,
config = function()
local opts = Util.opts("nvim-jdtls") or {}
local opts = LazyVim.opts("nvim-jdtls") or {}
-- Find the extra bundles that should be passed on the jdtls command-line
-- if nvim-dap is enabled with java debug/test.
local mason_registry = require("mason-registry")
local bundles = {} ---@type string[]
if opts.dap and Util.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then
if opts.dap and LazyVim.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then
local java_dbg_pkg = mason_registry.get_package("java-debug-adapter")
local java_dbg_path = java_dbg_pkg:get_install_path()
local jar_patterns = {
@ -147,7 +145,7 @@ return {
bundles = bundles,
},
-- enable CMP capabilities
capabilities = require("cmp_nvim_lsp").default_capabilities(),
capabilities = 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.
@ -196,7 +194,7 @@ return {
},
}, { mode = "v", buffer = args.buf })
if opts.dap and Util.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then
if opts.dap and LazyVim.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then
-- custom init for Java debugger
require("jdtls").setup_dap(opts.dap)
require("jdtls.dap").setup_dap_main_class_configs(opts.dap_main)

View File

@ -69,6 +69,8 @@ return {
for _, ft in ipairs({ "markdown", "norg", "rmd", "org" }) do
opts[ft] = {
headline_highlights = {},
-- disable bullets for now. See https://github.com/lukas-reineke/headlines.nvim/issues/66
bullets = {},
}
for i = 1, 6 do
local hl = "Headline" .. i

View File

@ -1,3 +1,11 @@
if lazyvim_docs then
-- LSP Server to use for Python.
-- Set to "basedpyright" to use basedpyright instead of pyright.
vim.g.lazyvim_python_lsp = "pyright"
end
local lsp = vim.g.lazyvim_python_lsp or "pyright"
return {
{
"nvim-treesitter/nvim-treesitter",
@ -11,7 +19,15 @@ return {
"neovim/nvim-lspconfig",
opts = {
servers = {
pyright = {},
pyright = {
enabled = lsp == "pyright",
},
basedpyright = {
enabled = lsp == "basedpyright",
},
[lsp] = {
enabled = true,
},
ruff_lsp = {
keys = {
{
@ -32,7 +48,7 @@ return {
},
setup = {
ruff_lsp = function()
require("lazyvim.util").lsp.on_attach(function(client, _)
LazyVim.lsp.on_attach(function(client, _)
if client.name == "ruff_lsp" then
-- Disable hover in favor of Pyright
client.server_capabilities.hoverProvider = false
@ -78,7 +94,7 @@ return {
"linux-cultist/venv-selector.nvim",
cmd = "VenvSelect",
opts = function(_, opts)
if require("lazyvim.util").has("nvim-dap-python") then
if LazyVim.has("nvim-dap-python") then
opts.dap_enabled = true
end
return vim.tbl_deep_extend("force", opts, {

View File

@ -42,15 +42,17 @@ return {
{
"mrcjkb/rustaceanvim",
version = '^4', -- Recommended
version = "^4", -- Recommended
ft = { "rust" },
opts = {
server = {
on_attach = function(_, bufnr)
vim.keymap.set("n", "<leader>cR", function() vim.cmd.RustLsp("codeAction") end,
{ desc = "Code Action", buffer = bufnr })
vim.keymap.set("n", "<leader>dr", function() vim.cmd.RustLsp("debuggables") end,
{ desc = "Rust debuggables", buffer = bufnr })
vim.keymap.set("n", "<leader>cR", function()
vim.cmd.RustLsp("codeAction")
end, { desc = "Code Action", buffer = bufnr })
vim.keymap.set("n", "<leader>dr", function()
vim.cmd.RustLsp("debuggables")
end, { desc = "Rust debuggables", buffer = bufnr })
end,
default_settings = {
-- rust-analyzer language server configuration
@ -76,13 +78,11 @@ return {
},
},
},
}
},
},
config = function(_, opts)
vim.g.rustaceanvim = vim.tbl_deep_extend("force",
{},
opts or {})
end
vim.g.rustaceanvim = vim.tbl_deep_extend("keep", vim.g.rustaceanvim or {}, opts or {})
end,
},
-- Correctly setup lspconfig for Rust 🚀
@ -121,9 +121,8 @@ return {
opts = function(_, opts)
opts.adapters = opts.adapters or {}
vim.list_extend(opts.adapters, {
require('rustaceanvim.neotest'),
require("rustaceanvim.neotest"),
})
end
end,
},
}

View File

@ -1,11 +1,3 @@
local Util = require("lazyvim.util")
vim.api.nvim_create_autocmd("FileType", {
pattern = { "hcl", "terraform" },
desc = "terraform/hcl commentstring configuration",
command = "setlocal commentstring=#\\ %s",
})
return {
{
"nvim-treesitter/nvim-treesitter",
@ -64,7 +56,7 @@ return {
{
"ANGkeith/telescope-terraform-doc.nvim",
config = function()
Util.on_load("telescope.nvim", function()
LazyVim.on_load("telescope.nvim", function()
require("telescope").load_extension("terraform_doc")
end)
end,
@ -72,7 +64,7 @@ return {
{
"cappyzawa/telescope-terraform.nvim",
config = function()
Util.on_load("telescope.nvim", function()
LazyVim.on_load("telescope.nvim", function()
require("telescope").load_extension("terraform")
end)
end,

View File

@ -64,7 +64,7 @@ return {
yamlls = function()
-- Neovim < 0.10 does not have dynamic registration for formatting
if vim.fn.has("nvim-0.10") == 0 then
require("lazyvim.util").lsp.on_attach(function(client, _)
LazyVim.lsp.on_attach(function(client, _)
if client.name == "yamlls" then
client.server_capabilities.documentFormattingProvider = true
end

View File

@ -23,11 +23,10 @@ vim.api.nvim_create_autocmd("User", {
once = true,
callback = function()
local Config = require("lazy.core.config")
local Util = require("lazyvim.util")
local lazyrc_idx = Util.plugin.extra_idx("lazyrc")
local lazyrc_idx = LazyVim.plugin.extra_idx("lazyrc")
if lazyrc_idx and lazyrc_idx ~= #Config.spec.modules then
Util.warn({
LazyVim.warn({
"The `lazyrc` extra must be the last plugin spec added to **lazy.nvim**. ",
"",
"Add `{ import = 'lazyvim.plugins.extras.lazyrc' }` to file `config.lazy`. ",

Some files were not shown because too many files have changed in this diff Show More