From 6b9f0c0c3c16b39a0764632402707822a084af50 Mon Sep 17 00:00:00 2001 From: d2kay Date: Sun, 19 Feb 2023 14:26:08 +0530 Subject: [PATCH 001/140] feat: persist pinned tabs (#304) Adds `globals` to session opts to persist pinned tabs --- lua/lazyvim/plugins/util.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/util.lua b/lua/lazyvim/plugins/util.lua index be3708e6..16a114bc 100644 --- a/lua/lazyvim/plugins/util.lua +++ b/lua/lazyvim/plugins/util.lua @@ -13,7 +13,7 @@ return { { "folke/persistence.nvim", event = "BufReadPre", - opts = { options = { "buffers", "curdir", "tabpages", "winsize", "help" } }, + opts = { options = { "buffers", "curdir", "tabpages", "winsize", "help", "globals" } }, -- stylua: ignore keys = { { "qs", function() require("persistence").load() end, desc = "Restore Session" }, From 90c58352dd851153586f039451e39e8bdf5c7bf3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 19 Feb 2023 21:32:05 +0000 Subject: [PATCH 002/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 121 +++++++++++++++++------------------------------- 1 file changed, 43 insertions(+), 78 deletions(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index a72ac194..f0627a69 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,54 +1,37 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 February 18 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 February 19 ============================================================================== Table of Contents *LazyVim-table-of-contents* - - Features |LazyVim-features| - - Requirements |LazyVim-requirements| - - Getting Started |LazyVim-getting-started| - - File Structure |LazyVim-file-structure| - - Configuration |LazyVim-configuration| + - Features |LazyVim-nil-features| + - Requirements |LazyVim-nil-requirements| + - Getting Started |LazyVim-nil-getting-started| + - File Structure |LazyVim-nil-file-structure| + - Configuration |LazyVim-nil-configuration| - - -
- -

- -Install +Install · -Configure +Configure · -Docs +Docs + + + + + + + + + + + + + + -

-
- -Latest release - - -Last commit - - -License - - -Stars - - -Issues - - -Repo Size - - -follow on Twitter - -
LazyVim is a Neovim setup powered by lazy.nvim to make it easy to customize and extend @@ -57,17 +40,8 @@ using a pre-made distro, LazyVim offers the best of both worlds - the flexibility to tweak your config as needed, along with the convenience of a pre-configured setup. -
- -

image

-
-
- -

image

-
- -FEATURES *LazyVim-features* +FEATURES *LazyVim-nil-features* - Transform your Neovim into a full-fledged IDE @@ -77,20 +51,20 @@ FEATURES *LazyVim-features* - Comes with a wealth of plugins pre-configured and ready to use -REQUIREMENTS *LazyVim-requirements* +REQUIREMENTS *LazyVim-nil-requirements* - Neovim >= **0.8.0** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) -- a Nerd Font **_(optional)_** +- a Nerd Font **(optional)** -GETTING STARTED *LazyVim-getting-started* +GETTING STARTED *LazyVim-nil-getting-started* You can find a starter template for **LazyVim** here -Try it with Docker +Try it with Docker ~ >sh docker run -w /root -it --rm alpine:edge sh -uelic ' @@ -101,8 +75,7 @@ Try it with Docker ' < - -Install the LazyVim Starter +Install the LazyVim Starter ~ - Make a backup of your current Neovim files: @@ -124,44 +97,36 @@ Install the LazyVim Starter < Refer to the comments in the files on how to customize **LazyVim**. - ------------------------------------------------------------------------------ +There’s a great video created by @elijahmanor + with a walkthrough to get started. -There’s a great video created by elijahmano -with a walkthrough to get started. - - -FILE STRUCTURE *LazyVim-file-structure* + +FILE STRUCTURE *LazyVim-nil-file-structure* The files under config will be automatically loaded at the appropriate time, so you don’t need to require those files manually. **LazyVim** comes with a set -of default config files that will be loaded **_before_** your own. See here +of default config files that will be loaded **before** your own. See here You can add your custom plugin specs under `lua/plugins/`. All files there will be automatically loaded by lazy.nvim -
-~/.config/nvim
- lua
-    config
-       autocmds.lua
-       keymaps.lua
-       lazy.lua
-       options.lua
-    plugins
-        spec1.lua
-        
-        spec2.lua
- init.lua
-
-CONFIGURATION *LazyVim-configuration* +CONFIGURATION *LazyVim-nil-configuration* Refer to the docs +============================================================================== +1. Links *LazyVim-links* + +1. *image*: https://user-images.githubusercontent.com/292349/211285846-0b7bb3bf-0462-4029-b64c-4ee1d037fc1c.png +2. *image*: https://user-images.githubusercontent.com/292349/213447056-92290767-ea16-430c-8727-ce994c93e9cc.png +3. *@elijahmanor*: +4. *Watch the video*: https://img.youtube.com/vi/N93cTbtLCIM/hqdefault.jpg + Generated by panvimdoc vim:tw=78:ts=8:noet:ft=help:norl: From cccdc1cacfa486edcaf67111aa3c6fd9a626ae1f Mon Sep 17 00:00:00 2001 From: Marie Date: Mon, 20 Feb 2023 08:21:39 +0100 Subject: [PATCH 003/140] feat(telescope): add `sS` for `:Telescope lsp_workspace_symbols` (#309) --- lua/lazyvim/plugins/editor.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index 2178cc5a..8bb2ac1e 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -112,6 +112,24 @@ return { }), desc = "Goto Symbol", }, + { + "sS", + Util.telescope("lsp_workspace_symbols", { + symbols = { + "Class", + "Function", + "Method", + "Constructor", + "Interface", + "Module", + "Struct", + "Trait", + "Field", + "Property", + }, + }), + desc = "Goto Symbol (Workspace)", + }, }, opts = { defaults = { From db9a7d90d5d00088cfbe1236035b85299b97b885 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 Feb 2023 07:22:26 +0000 Subject: [PATCH 004/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index f0627a69..5c94d71f 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 February 19 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 February 20 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 9b175ab1bc1bb8409906979ff37bca6c6d789fb2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 20 Feb 2023 09:05:53 +0100 Subject: [PATCH 005/140] chore(main): release 1.12.0 (#294) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cef370e6..c763e0a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## [1.12.0](https://github.com/LazyVim/LazyVim/compare/v1.11.0...v1.12.0) (2023-02-20) + + +### Features + +* persist pinned tabs ([#304](https://github.com/LazyVim/LazyVim/issues/304)) ([6b9f0c0](https://github.com/LazyVim/LazyVim/commit/6b9f0c0c3c16b39a0764632402707822a084af50)) +* **telescope:** add `<leader>sS` for `:Telescope lsp_workspace_symbols` ([#309](https://github.com/LazyVim/LazyVim/issues/309)) ([cccdc1c](https://github.com/LazyVim/LazyVim/commit/cccdc1cacfa486edcaf67111aa3c6fd9a626ae1f)) + + +### Bug Fixes + +* **illuminate:** always set refernce keymaps on the buffer as well to properly overwrite ftplugin mappings. Fixes [#292](https://github.com/LazyVim/LazyVim/issues/292) ([a0cf00c](https://github.com/LazyVim/LazyVim/commit/a0cf00c81b3a4a352cdc26c94112d9a5827881e1)) +* **mini.surround:** don't create empty keymaps. Fixes [#296](https://github.com/LazyVim/LazyVim/issues/296) ([8e84dcf](https://github.com/LazyVim/LazyVim/commit/8e84dcf85c8a73ebcf6ade6b7b77544f468f1dfa)) +* **treesitter:** disable indent only for python right now ([de6a28b](https://github.com/LazyVim/LazyVim/commit/de6a28b781e8a06e4f70c913539c97260392131a)) +* **treesitter:** disable treesitter indent by default, since it has too many issues. See [#297](https://github.com/LazyVim/LazyVim/issues/297) ([329a2da](https://github.com/LazyVim/LazyVim/commit/329a2daff493abd2bd5c8fedbf0dfa13039d3931)) + ## [1.11.0](https://github.com/LazyVim/LazyVim/compare/v1.10.0...v1.11.0) (2023-02-17) From 0eef2c2f29cc95b6a3da8c9dced215acf60147dc Mon Sep 17 00:00:00 2001 From: alexander-born <61082865+alexander-born@users.noreply.github.com> Date: Mon, 20 Feb 2023 15:58:52 +0100 Subject: [PATCH 006/140] fix(treesitter): nil check #312 (#313) Co-authored-by: Alexander Born --- lua/lazyvim/plugins/treesitter.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 83eb574b..d722b196 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -14,7 +14,8 @@ return { local enabled = false if opts.textobjects then for _, mod in ipairs({ "move", "select", "swap", "lsp_interop" }) do - if opts.textobjects[mod].enable then + local textobjects_opts = opts.textobjects[mod] + if textobjects_opts ~= nil and textobjects_opts.enable then enabled = true break end From 079c685831fd64ab139b8824db54e76b04724346 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 20 Feb 2023 16:01:02 +0100 Subject: [PATCH 007/140] refactor(treesitter): nil-check --- lua/lazyvim/plugins/treesitter.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index d722b196..73fca6ad 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -14,8 +14,7 @@ return { local enabled = false if opts.textobjects then for _, mod in ipairs({ "move", "select", "swap", "lsp_interop" }) do - local textobjects_opts = opts.textobjects[mod] - if textobjects_opts ~= nil and textobjects_opts.enable then + if opts.textobjects[mod] and opts.textobjects[mod].enable then enabled = true break end From befa6c67a4387b0db4f8421d463f5d03f91dc829 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 20 Feb 2023 22:04:44 +0100 Subject: [PATCH 008/140] chore(main): release 1.12.1 (#314) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c763e0a9..876ad605 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.12.1](https://github.com/LazyVim/LazyVim/compare/v1.12.0...v1.12.1) (2023-02-20) + + +### Bug Fixes + +* **treesitter:** nil check [#312](https://github.com/LazyVim/LazyVim/issues/312) ([#313](https://github.com/LazyVim/LazyVim/issues/313)) ([0eef2c2](https://github.com/LazyVim/LazyVim/commit/0eef2c2f29cc95b6a3da8c9dced215acf60147dc)) + ## [1.12.0](https://github.com/LazyVim/LazyVim/compare/v1.11.0...v1.12.0) (2023-02-20) From bd62cbe370a72525a29790c710d3f213c3e184e4 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 27 Feb 2023 10:17:22 +0100 Subject: [PATCH 009/140] fix(luasnips): make install_jsregexp --- lua/lazyvim/plugins/coding.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/coding.lua b/lua/lazyvim/plugins/coding.lua index 522b207e..6a37a019 100644 --- a/lua/lazyvim/plugins/coding.lua +++ b/lua/lazyvim/plugins/coding.lua @@ -3,6 +3,7 @@ return { -- snippets { "L3MON4D3/LuaSnip", + build = "make install_jsregexp", dependencies = { "rafamadriz/friendly-snippets", config = function() From 592074ad802be2462306d3991024f350571dfab2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 27 Feb 2023 09:18:03 +0000 Subject: [PATCH 010/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 5c94d71f..ed101a76 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,13 +1,13 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 February 20 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 February 27 ============================================================================== Table of Contents *LazyVim-table-of-contents* - - Features |LazyVim-nil-features| - - Requirements |LazyVim-nil-requirements| - - Getting Started |LazyVim-nil-getting-started| - - File Structure |LazyVim-nil-file-structure| - - Configuration |LazyVim-nil-configuration| + - Features |LazyVim-features| + - Requirements |LazyVim-requirements| + - Getting Started |LazyVim-getting-started| + - File Structure |LazyVim-file-structure| + - Configuration |LazyVim-configuration| Install · @@ -41,7 +41,7 @@ flexibility to tweak your config as needed, along with the convenience of a pre-configured setup. -FEATURES *LazyVim-nil-features* +FEATURES *LazyVim-features* - Transform your Neovim into a full-fledged IDE @@ -51,7 +51,7 @@ FEATURES *LazyVim-nil-features* - Comes with a wealth of plugins pre-configured and ready to use -REQUIREMENTS *LazyVim-nil-requirements* +REQUIREMENTS *LazyVim-requirements* - Neovim >= **0.8.0** (needs to be built with **LuaJIT**) @@ -59,7 +59,7 @@ REQUIREMENTS *LazyVim-nil-requirements* - a Nerd Font **(optional)** -GETTING STARTED *LazyVim-nil-getting-started* +GETTING STARTED *LazyVim-getting-started* You can find a starter template for **LazyVim** here @@ -104,7 +104,7 @@ There’s a great video created by @elijahmanor -FILE STRUCTURE *LazyVim-nil-file-structure* +FILE STRUCTURE *LazyVim-file-structure* The files under config will be automatically loaded at the appropriate time, so you don’t need to require those files manually. **LazyVim** comes with a set @@ -115,7 +115,7 @@ You can add your custom plugin specs under `lua/plugins/`. All files there will be automatically loaded by lazy.nvim -CONFIGURATION *LazyVim-nil-configuration* +CONFIGURATION *LazyVim-configuration* Refer to the docs From fc765e9e3d1fe8dc9f84087a73f12a2b3bbe60c4 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 27 Feb 2023 19:38:23 +0100 Subject: [PATCH 011/140] fix(treesitter): always install all built-in treesitter parsers to prevent queriy issues --- lua/lazyvim/plugins/treesitter.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 73fca6ad..60abaf29 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -37,6 +37,7 @@ return { context_commentstring = { enable = true, enable_autocmd = false }, ensure_installed = { "bash", + "c", "help", "html", "javascript", From d97bf66eed76c91eac11c81dad69aff9f632b214 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 28 Feb 2023 09:51:29 +0100 Subject: [PATCH 012/140] fix(mini-indentscope): disable indentscope for filetypes during init. Fixes #318 --- lua/lazyvim/plugins/ui.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index ef255bb9..f83bc069 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -182,13 +182,15 @@ return { symbol = "│", options = { try_as_border = true }, }, - config = function(_, opts) + init = function() vim.api.nvim_create_autocmd("FileType", { pattern = { "help", "alpha", "dashboard", "neo-tree", "Trouble", "lazy", "mason" }, callback = function() vim.b.miniindentscope_disable = true end, }) + end, + config = function(_, opts) require("mini.indentscope").setup(opts) end, }, From 2b8b27b4a91d9450e97596127d57d2f253b29f62 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 28 Feb 2023 08:52:19 +0000 Subject: [PATCH 013/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index ed101a76..7d01d4dc 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 February 27 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 February 28 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 8a9265efeda3a2445776b17f2d5e1bf272366c5a Mon Sep 17 00:00:00 2001 From: Calvin Bochulak Date: Tue, 28 Feb 2023 01:58:29 -0700 Subject: [PATCH 014/140] style: add description for "gw" keymap (#327) --- lua/lazyvim/config/keymaps.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 11c76ce9..2026ed3b 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -64,8 +64,7 @@ map( { desc = "Redraw / clear hlsearch / diff update" } ) -map("n", "gw", "*N") -map("x", "gw", "*N") +map({ "n", "x" }, "gw", "*N", { desc = "Highlight under cursor" }) -- https://github.com/mhinz/vim-galore#saner-behavior-of-n-and-n map("n", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" }) From 70966bbc19cb6e216e65cb887a01b9be9057e3b9 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 28 Feb 2023 09:59:01 +0100 Subject: [PATCH 015/140] style: desc for gw --- lua/lazyvim/config/keymaps.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 2026ed3b..6b87d1f1 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -64,7 +64,7 @@ map( { desc = "Redraw / clear hlsearch / diff update" } ) -map({ "n", "x" }, "gw", "*N", { desc = "Highlight under cursor" }) +map({ "n", "x" }, "gw", "*N", { desc = "Search word under cursor" }) -- https://github.com/mhinz/vim-galore#saner-behavior-of-n-and-n map("n", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" }) From 588dc5dd65aa3881122aa4e59710de6722423251 Mon Sep 17 00:00:00 2001 From: Sakari Date: Tue, 28 Feb 2023 16:59:50 +0800 Subject: [PATCH 016/140] fix(icons): replace obsolete Nerd icons (#331) --- lua/lazyvim/plugins/editor.lua | 4 ++-- lua/lazyvim/plugins/ui.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index 8bb2ac1e..7460e9c2 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -243,8 +243,8 @@ return { signs = { add = { text = "▎" }, change = { text = "▎" }, - delete = { text = "契" }, - topdelete = { text = "契" }, + delete = { text = "󰐊" }, + topdelete = { text = "󰐊" }, changedelete = { text = "▎" }, untracked = { text = "▎" }, }, diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index f83bc069..03567708 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -245,8 +245,8 @@ return { dashboard.button("r", " " .. " Recent files", ":Telescope oldfiles "), dashboard.button("g", " " .. " Find text", ":Telescope live_grep "), dashboard.button("c", " " .. " Config", ":e $MYVIMRC "), - dashboard.button("s", "勒" .. " Restore Session", [[:lua require("persistence").load() ]]), - dashboard.button("l", "鈴" .. " Lazy", ":Lazy"), + dashboard.button("s", "󰑓 " .. " Restore Session", [[:lua require("persistence").load() ]]), + dashboard.button("l", "󰒲 " .. " Lazy", ":Lazy"), dashboard.button("q", " " .. " Quit", ":qa"), } for _, button in ipairs(dashboard.section.buttons.val) do From 4b37723558e45f14c3e8d05fc84ad3a701b9faf0 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 28 Feb 2023 10:01:53 +0100 Subject: [PATCH 017/140] fix(git-signs): larger icons for delete --- lua/lazyvim/plugins/editor.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index 7460e9c2..fae29a31 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -243,8 +243,8 @@ return { signs = { add = { text = "▎" }, change = { text = "▎" }, - delete = { text = "󰐊" }, - topdelete = { text = "󰐊" }, + delete = { text = "" }, + topdelete = { text = "" }, changedelete = { text = "▎" }, untracked = { text = "▎" }, }, From 5abb10b5ab3c2c5462f699fc98f618f39543f8f4 Mon Sep 17 00:00:00 2001 From: alexander-born <61082865+alexander-born@users.noreply.github.com> Date: Tue, 28 Feb 2023 11:29:57 +0100 Subject: [PATCH 018/140] fix(lsp): only map lsp goto definition when client has definitionProvider (#348) Co-authored-by: Alexander Born --- lua/lazyvim/plugins/lsp/keymaps.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/lsp/keymaps.lua b/lua/lazyvim/plugins/lsp/keymaps.lua index e47bf464..e221cfcf 100644 --- a/lua/lazyvim/plugins/lsp/keymaps.lua +++ b/lua/lazyvim/plugins/lsp/keymaps.lua @@ -12,7 +12,7 @@ function M.get() M._keys = { { "cd", vim.diagnostic.open_float, desc = "Line Diagnostics" }, { "cl", "LspInfo", desc = "Lsp Info" }, - { "gd", "Telescope lsp_definitions", desc = "Goto Definition" }, + { "gd", "Telescope lsp_definitions", desc = "Goto Definition", has = "definition" }, { "gr", "Telescope lsp_references", desc = "References" }, { "gD", vim.lsp.buf.declaration, desc = "Goto Declaration" }, { "gI", "Telescope lsp_implementations", desc = "Goto Implementation" }, From 59fa83653f3d4f1911e220c2a96a7e47878a16bc Mon Sep 17 00:00:00 2001 From: Brian Di Palma <1597820+briandipalma@users.noreply.github.com> Date: Tue, 28 Feb 2023 10:31:35 +0000 Subject: [PATCH 019/140] feat(keymaps): Add previous/next trouble/quickfix item keymap `[q`, `]q` (#299) --- lua/lazyvim/config/keymaps.lua | 5 +++++ lua/lazyvim/plugins/editor.lua | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 6b87d1f1..85b64478 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -95,6 +95,11 @@ map("n", "fn", "enew", { desc = "New File" }) map("n", "xl", "lopen", { desc = "Location List" }) map("n", "xq", "copen", { desc = "Quickfix List" }) +if not Util.has("trouble.nvim") then + map("n", "[q", vim.cmd.cprev, { desc = "Previous quickfix" }) + map("n", "]q", vim.cmd.cnext, { desc = "Next quickfix" }) +end + -- stylua: ignore start -- toggle options diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index fae29a31..d1c2a7f5 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -324,6 +324,28 @@ return { { "xX", "TroubleToggle workspace_diagnostics", desc = "Workspace Diagnostics (Trouble)" }, { "xL", "TroubleToggle loclist", desc = "Location List (Trouble)" }, { "xQ", "TroubleToggle quickfix", desc = "Quickfix List (Trouble)" }, + { + "[q", + function() + if require("trouble").is_open() then + require("trouble").previous({ skip_groups = true, jump = true }) + else + vim.cmd.cprev() + end + end, + desc = "Previous trouble/quickfix item", + }, + { + "]q", + function() + if require("trouble").is_open() then + require("trouble").next({ skip_groups = true, jump = true }) + else + vim.cmd.cnext() + end + end, + desc = "Next trouble/quickfix item", + }, }, }, From 7e47f8874918c1b76ef9ff744b6de0953932f1e5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 28 Feb 2023 12:58:53 +0100 Subject: [PATCH 020/140] chore(main): release 1.13.0 (#343) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 876ad605..26889585 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## [1.13.0](https://github.com/LazyVim/LazyVim/compare/v1.12.1...v1.13.0) (2023-02-28) + + +### Features + +* **keymaps:** Add previous/next trouble/quickfix item keymap `[q`, `]q` ([#299](https://github.com/LazyVim/LazyVim/issues/299)) ([59fa836](https://github.com/LazyVim/LazyVim/commit/59fa83653f3d4f1911e220c2a96a7e47878a16bc)) + + +### Bug Fixes + +* **git-signs:** larger icons for delete ([4b37723](https://github.com/LazyVim/LazyVim/commit/4b37723558e45f14c3e8d05fc84ad3a701b9faf0)) +* **icons:** replace obsolete Nerd icons ([#331](https://github.com/LazyVim/LazyVim/issues/331)) ([588dc5d](https://github.com/LazyVim/LazyVim/commit/588dc5dd65aa3881122aa4e59710de6722423251)) +* **lsp:** only map lsp goto definition when client has definitionProvider ([#348](https://github.com/LazyVim/LazyVim/issues/348)) ([5abb10b](https://github.com/LazyVim/LazyVim/commit/5abb10b5ab3c2c5462f699fc98f618f39543f8f4)) +* **luasnips:** make install_jsregexp ([bd62cbe](https://github.com/LazyVim/LazyVim/commit/bd62cbe370a72525a29790c710d3f213c3e184e4)) +* **mini-indentscope:** disable indentscope for filetypes during init. Fixes [#318](https://github.com/LazyVim/LazyVim/issues/318) ([d97bf66](https://github.com/LazyVim/LazyVim/commit/d97bf66eed76c91eac11c81dad69aff9f632b214)) +* **treesitter:** always install all built-in treesitter parsers to prevent queriy issues ([fc765e9](https://github.com/LazyVim/LazyVim/commit/fc765e9e3d1fe8dc9f84087a73f12a2b3bbe60c4)) + ## [1.12.1](https://github.com/LazyVim/LazyVim/compare/v1.12.0...v1.12.1) (2023-02-20) From 787ceab0311ce20cc37ef2a81dabafdc09f1c624 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 1 Mar 2023 11:39:24 +0100 Subject: [PATCH 021/140] fix(leap): pin leap for now till flit issue is fixed --- lua/lazyvim/plugins/editor.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index d1c2a7f5..0460bc38 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -184,6 +184,7 @@ return { }, { "ggandor/leap.nvim", + commit = "9a69feb", keys = { { "s", mode = { "n", "x", "o" }, desc = "Leap forward to" }, { "S", mode = { "n", "x", "o" }, desc = "Leap backward to" }, From e42c308a6bcd336680dc12492e1b035aa54dde06 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 1 Mar 2023 10:40:15 +0000 Subject: [PATCH 022/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 7d01d4dc..7efe4f67 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 February 28 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 01 ============================================================================== Table of Contents *LazyVim-table-of-contents* From efca9528da30d3275976cbbddbf67fd2883ecad4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 1 Mar 2023 11:41:35 +0100 Subject: [PATCH 023/140] chore(main): release 1.13.1 (#358) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26889585..eaf28145 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.13.1](https://github.com/LazyVim/LazyVim/compare/v1.13.0...v1.13.1) (2023-03-01) + + +### Bug Fixes + +* **leap:** pin leap for now till flit issue is fixed ([787ceab](https://github.com/LazyVim/LazyVim/commit/787ceab0311ce20cc37ef2a81dabafdc09f1c624)) + ## [1.13.0](https://github.com/LazyVim/LazyVim/compare/v1.12.1...v1.13.0) (2023-02-28) From f9b7406df96cf1fad5685865ffef5ec725573f1c Mon Sep 17 00:00:00 2001 From: Brian Di Palma <1597820+briandipalma@users.noreply.github.com> Date: Wed, 1 Mar 2023 12:10:04 +0000 Subject: [PATCH 024/140] feat(telescope): Add open selected with trouble keymap (#357) --- lua/lazyvim/plugins/editor.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index 0460bc38..b5e3d071 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -140,6 +140,9 @@ return { [""] = function(...) return require("trouble.providers.telescope").open_with_trouble(...) end, + [""] = function(...) + return require("trouble.providers.telescope").open_selected_with_trouble(...) + end, [""] = function() Util.telescope("find_files", { no_ignore = true })() end, From d0e420eca8d0701606ccfcb6789245f6b56ab5a4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 1 Mar 2023 17:51:10 +0100 Subject: [PATCH 025/140] chore(main): release 1.14.0 (#360) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eaf28145..abaf474e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.14.0](https://github.com/LazyVim/LazyVim/compare/v1.13.1...v1.14.0) (2023-03-01) + + +### Features + +* **telescope:** Add open selected with trouble keymap ([#357](https://github.com/LazyVim/LazyVim/issues/357)) ([f9b7406](https://github.com/LazyVim/LazyVim/commit/f9b7406df96cf1fad5685865ffef5ec725573f1c)) + ## [1.13.1](https://github.com/LazyVim/LazyVim/compare/v1.13.0...v1.13.1) (2023-03-01) From 16e4a3f8fd5929c9ef2cf2c12b076bcbc947ab36 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 1 Mar 2023 15:11:56 +0100 Subject: [PATCH 026/140] fix(leap): unpin leap --- lua/lazyvim/plugins/editor.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index b5e3d071..998c60f7 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -187,7 +187,6 @@ return { }, { "ggandor/leap.nvim", - commit = "9a69feb", keys = { { "s", mode = { "n", "x", "o" }, desc = "Leap forward to" }, { "S", mode = { "n", "x", "o" }, desc = "Leap backward to" }, From f6f3ce4a9b7a797653dc290b9485d2ce970af871 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 2 Mar 2023 14:15:51 +0100 Subject: [PATCH 027/140] fix(luasnip): dont build jsregexp on Windows --- lua/lazyvim/plugins/coding.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/coding.lua b/lua/lazyvim/plugins/coding.lua index 6a37a019..45c271f1 100644 --- a/lua/lazyvim/plugins/coding.lua +++ b/lua/lazyvim/plugins/coding.lua @@ -3,7 +3,7 @@ return { -- snippets { "L3MON4D3/LuaSnip", - build = "make install_jsregexp", + build = (not jit.os:find("Windows")) and "make install_jsregexp" or nil, dependencies = { "rafamadriz/friendly-snippets", config = function() From d00aade8dbb7720b3f501424814ec3dd357b7373 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 2 Mar 2023 14:17:57 +0100 Subject: [PATCH 028/140] fix(alpha): larger session icon. Fixes #365 --- lua/lazyvim/plugins/ui.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 03567708..a4362cf9 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -245,7 +245,7 @@ return { dashboard.button("r", " " .. " Recent files", ":Telescope oldfiles "), dashboard.button("g", " " .. " Find text", ":Telescope live_grep "), dashboard.button("c", " " .. " Config", ":e $MYVIMRC "), - dashboard.button("s", "󰑓 " .. " Restore Session", [[:lua require("persistence").load() ]]), + dashboard.button("s", " " .. " Restore Session", [[:lua require("persistence").load() ]]), dashboard.button("l", "󰒲 " .. " Lazy", ":Lazy"), dashboard.button("q", " " .. " Quit", ":qa"), } From c32943f2aaccb5fd9fbcd760115ce11b558d9bbd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 2 Mar 2023 13:18:45 +0000 Subject: [PATCH 029/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 7efe4f67..221c5249 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 01 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 02 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 3c0f28331b5c473197be2d585327420cb59bda15 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 2 Mar 2023 14:29:06 +0100 Subject: [PATCH 030/140] chore(main): release 1.14.1 (#366) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index abaf474e..e88f0658 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [1.14.1](https://github.com/LazyVim/LazyVim/compare/v1.14.0...v1.14.1) (2023-03-02) + + +### Bug Fixes + +* **alpha:** larger session icon. Fixes [#365](https://github.com/LazyVim/LazyVim/issues/365) ([d00aade](https://github.com/LazyVim/LazyVim/commit/d00aade8dbb7720b3f501424814ec3dd357b7373)) +* **leap:** unpin leap ([16e4a3f](https://github.com/LazyVim/LazyVim/commit/16e4a3f8fd5929c9ef2cf2c12b076bcbc947ab36)) +* **luasnip:** dont build jsregexp on Windows ([f6f3ce4](https://github.com/LazyVim/LazyVim/commit/f6f3ce4a9b7a797653dc290b9485d2ce970af871)) + ## [1.14.0](https://github.com/LazyVim/LazyVim/compare/v1.13.1...v1.14.0) (2023-03-01) From 3a523075057f346451075454a96b1ca355f7592a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 3 Mar 2023 08:21:29 +0100 Subject: [PATCH 031/140] feat(cmp): added `` to confirm completion with replace --- lua/lazyvim/plugins/coding.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/lazyvim/plugins/coding.lua b/lua/lazyvim/plugins/coding.lua index 45c271f1..08d82383 100644 --- a/lua/lazyvim/plugins/coding.lua +++ b/lua/lazyvim/plugins/coding.lua @@ -58,6 +58,10 @@ return { [""] = cmp.mapping.complete(), [""] = cmp.mapping.abort(), [""] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + [""] = cmp.mapping.confirm({ + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. }), sources = cmp.config.sources({ { name = "nvim_lsp" }, From 368c65e14b1155d051b4aa6bac91808a2bc5f5ba Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 3 Mar 2023 08:22:20 +0100 Subject: [PATCH 032/140] feat(copilot): added an extra to enable copilot. `{import = "lazyvim.plugins.extras.coding.copilot"}` --- lua/lazyvim/plugins/extras/coding/copilot.lua | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/coding/copilot.lua diff --git a/lua/lazyvim/plugins/extras/coding/copilot.lua b/lua/lazyvim/plugins/extras/coding/copilot.lua new file mode 100644 index 00000000..26b29d64 --- /dev/null +++ b/lua/lazyvim/plugins/extras/coding/copilot.lua @@ -0,0 +1,41 @@ +return { + + -- copilot + { + "zbirenbaum/copilot.lua", + cmd = "Copilot", + build = ":Copilot auth", + opts = { + suggestion = { enabled = false }, + panel = { enabled = false }, + }, + }, + + -- copilot cmp source + { + "nvim-cmp", + dependencies = { + { + "zbirenbaum/copilot-cmp", + dependencies = "copilot.lua", + opts = {}, + config = function(_, opts) + local copilot_cmp = require("copilot_cmp") + copilot_cmp.setup(opts) + -- attach cmp source whenever copilot attaches + -- fixes lazy-loading issues with the copilot cmp source + require("lazyvim.util").on_attach(function(client) + if client.name == "copilot" then + copilot_cmp._on_insert_enter() + end + end) + end, + }, + }, + ---@param opts cmp.ConfigSchema + opts = function(_, opts) + local cmp = require("cmp") + opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "copilot" } })) + end, + }, +} From d285548ae01a19870f5aa9862cfbe5f5bac66ba7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 3 Mar 2023 07:23:08 +0000 Subject: [PATCH 033/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 221c5249..eea09d9e 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 02 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 03 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 04a60e251b1c2437ad6d0a237fbacc1848d4aac1 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 3 Mar 2023 08:28:27 +0100 Subject: [PATCH 034/140] fix(luasnip): added note that jsregexp is optional if it fails to build --- lua/lazyvim/plugins/coding.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/coding.lua b/lua/lazyvim/plugins/coding.lua index 08d82383..fc05bc3b 100644 --- a/lua/lazyvim/plugins/coding.lua +++ b/lua/lazyvim/plugins/coding.lua @@ -3,7 +3,9 @@ return { -- snippets { "L3MON4D3/LuaSnip", - build = (not jit.os:find("Windows")) and "make install_jsregexp" or nil, + build = (not jit.os:find("Windows")) + and "echo -e 'NOTE: jsregexp is optional, so not a big deal if it fails to build\n'; make install_jsregexp" + or nil, dependencies = { "rafamadriz/friendly-snippets", config = function() From 099fd48844c1d5ec49dc7f83162112ba70a26ad5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 3 Mar 2023 08:34:43 +0100 Subject: [PATCH 035/140] chore(main): release 1.15.0 (#371) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e88f0658..5dccd817 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [1.15.0](https://github.com/LazyVim/LazyVim/compare/v1.14.1...v1.15.0) (2023-03-03) + + +### Features + +* **cmp:** added `<s-CR>` to confirm completion with replace ([3a52307](https://github.com/LazyVim/LazyVim/commit/3a523075057f346451075454a96b1ca355f7592a)) +* **copilot:** added an extra to enable copilot. `{import = "lazyvim.plugins.extras.coding.copilot"}` ([368c65e](https://github.com/LazyVim/LazyVim/commit/368c65e14b1155d051b4aa6bac91808a2bc5f5ba)) + + +### Bug Fixes + +* **luasnip:** added note that jsregexp is optional if it fails to build ([04a60e2](https://github.com/LazyVim/LazyVim/commit/04a60e251b1c2437ad6d0a237fbacc1848d4aac1)) + ## [1.14.1](https://github.com/LazyVim/LazyVim/compare/v1.14.0...v1.14.1) (2023-03-02) From 57c2dcb3a35704a849ea8ba210f963c22fb6d1ce Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 3 Mar 2023 20:10:40 +0100 Subject: [PATCH 036/140] feat(neo-tree): added expanders --- lua/lazyvim/plugins/editor.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index 998c60f7..cdefb03a 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -46,6 +46,14 @@ return { [""] = "none", }, }, + default_component_configs = { + indent = { + with_expanders = true, -- if nil and file nesting is enabled, will enable expanders + expander_collapsed = "", + expander_expanded = "", + expander_highlight = "NeoTreeExpander", + }, + }, }, }, From 1f7be0bbad3012046a53edb649b3cdc085e7ed54 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 3 Mar 2023 20:12:35 +0100 Subject: [PATCH 037/140] chore(main): release 1.16.0 (#376) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5dccd817..940607cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.16.0](https://github.com/LazyVim/LazyVim/compare/v1.15.0...v1.16.0) (2023-03-03) + + +### Features + +* **neo-tree:** added expanders ([57c2dcb](https://github.com/LazyVim/LazyVim/commit/57c2dcb3a35704a849ea8ba210f963c22fb6d1ce)) + ## [1.15.0](https://github.com/LazyVim/LazyVim/compare/v1.14.1...v1.15.0) (2023-03-03) From 9dd2487529d6012088e86f089c445549aa4b37bb Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Sat, 4 Mar 2023 02:40:37 -0500 Subject: [PATCH 038/140] fix: rename more appropriately (also a typo) (#378) --- lua/lazyvim/plugins/treesitter.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 60abaf29..e04f5056 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -28,7 +28,7 @@ return { }, keys = { { "", desc = "Increment selection" }, - { "", desc = "Schrink selection", mode = "x" }, + { "", desc = "Decrement selection", mode = "x" }, }, ---@type TSConfig opts = { From 0d32e6256719dd15182c67f4dab503129d20fdcd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 4 Mar 2023 07:41:20 +0000 Subject: [PATCH 039/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index eea09d9e..570016e1 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 03 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 04 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 2e951e4f4414ba88895b1ddc3a189dd3213be404 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 4 Mar 2023 10:40:00 +0100 Subject: [PATCH 040/140] feat(autocmds): added 'query' to close_with_q autocmd --- lua/lazyvim/config/autocmds.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/config/autocmds.lua b/lua/lazyvim/config/autocmds.lua index 22557977..4b6c9d7b 100644 --- a/lua/lazyvim/config/autocmds.lua +++ b/lua/lazyvim/config/autocmds.lua @@ -42,15 +42,16 @@ vim.api.nvim_create_autocmd("BufReadPost", { vim.api.nvim_create_autocmd("FileType", { group = augroup("close_with_q"), pattern = { - "qf", + "PlenaryTestPopup", "help", + "lspinfo", "man", "notify", - "lspinfo", + "qf", + "query", -- :InspectTree "spectre_panel", "startuptime", "tsplayground", - "PlenaryTestPopup", }, callback = function(event) vim.bo[event.buf].buflisted = false From b10c9ade77ca3a3072e080abf241fcdd747c13f7 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 4 Mar 2023 10:40:20 +0100 Subject: [PATCH 041/140] build: neoconf sumneko_lua => lua_ls --- .neoconf.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.neoconf.json b/.neoconf.json index aa1b504a..7c480874 100644 --- a/.neoconf.json +++ b/.neoconf.json @@ -7,7 +7,7 @@ }, "neoconf": { "plugins": { - "sumneko_lua": { + "lua_ls": { "enabled": true } } From 6fec14e5082363ab87efb169f312a396e5e2dbb7 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 4 Mar 2023 10:41:47 +0100 Subject: [PATCH 042/140] fix(typescript): enable function call completion snippets --- lua/lazyvim/plugins/extras/lang/typescript.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/typescript.lua b/lua/lazyvim/plugins/extras/lang/typescript.lua index 54860936..14c4b9ed 100644 --- a/lua/lazyvim/plugins/extras/lang/typescript.lua +++ b/lua/lazyvim/plugins/extras/lang/typescript.lua @@ -17,7 +17,14 @@ return { opts = { -- make sure mason installs the server servers = { - tsserver = {}, + ---@type lspconfig.options.tsserver + tsserver = { + settings = { + completions = { + completeFunctionCalls = true, + }, + }, + }, }, setup = { tsserver = function(_, opts) @@ -25,6 +32,7 @@ return { if client.name == "tsserver" then -- stylua: ignore vim.keymap.set("n", "co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" }) + -- stylua: ignore vim.keymap.set("n", "cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer }) end end) From f441faad03501198a4a1ed52bca48aac3c7158c3 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Sun, 5 Mar 2023 03:08:51 -0500 Subject: [PATCH 043/140] feat: add luap to nvim-treesitter ensure_installed (#383) --- lua/lazyvim/plugins/treesitter.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index e04f5056..c4bf6550 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -43,6 +43,7 @@ return { "javascript", "json", "lua", + "luap", "markdown", "markdown_inline", "python", From 2002265461bf0d99c7c506f28056d8e50d9b8c56 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 5 Mar 2023 08:09:39 +0000 Subject: [PATCH 044/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 570016e1..f484872f 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 04 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 05 ============================================================================== Table of Contents *LazyVim-table-of-contents* From e7a515e5481e6cd2f00e8da523454713009f12a5 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 5 Mar 2023 09:12:16 +0100 Subject: [PATCH 045/140] fix(mason): removed installing of shellcheck and shfmt. Use bashls instead --- lua/lazyvim/plugins/lsp/init.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 75d7fb72..db0339c4 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -156,8 +156,6 @@ return { opts = { ensure_installed = { "stylua", - "shellcheck", - "shfmt", "flake8", }, }, From ae9c74d88ef41b7019f4d4a6e65cc32646cb34b1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 5 Mar 2023 09:16:44 +0100 Subject: [PATCH 046/140] chore(main): release 1.17.0 (#379) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 940607cf..f7c073fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [1.17.0](https://github.com/LazyVim/LazyVim/compare/v1.16.0...v1.17.0) (2023-03-05) + + +### Features + +* add luap to nvim-treesitter ensure_installed ([#383](https://github.com/LazyVim/LazyVim/issues/383)) ([f441faa](https://github.com/LazyVim/LazyVim/commit/f441faad03501198a4a1ed52bca48aac3c7158c3)) +* **autocmds:** added 'query' to close_with_q autocmd ([2e951e4](https://github.com/LazyVim/LazyVim/commit/2e951e4f4414ba88895b1ddc3a189dd3213be404)) + + +### Bug Fixes + +* **mason:** removed installing of shellcheck and shfmt. Use bashls instead ([e7a515e](https://github.com/LazyVim/LazyVim/commit/e7a515e5481e6cd2f00e8da523454713009f12a5)) +* rename more appropriately (also a typo) ([#378](https://github.com/LazyVim/LazyVim/issues/378)) ([9dd2487](https://github.com/LazyVim/LazyVim/commit/9dd2487529d6012088e86f089c445549aa4b37bb)) +* **typescript:** enable function call completion snippets ([6fec14e](https://github.com/LazyVim/LazyVim/commit/6fec14e5082363ab87efb169f312a396e5e2dbb7)) + ## [1.16.0](https://github.com/LazyVim/LazyVim/compare/v1.15.0...v1.16.0) (2023-03-03) From 079d3967d03d47b95bdec10bb2621db1c4a07dce Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 5 Mar 2023 17:06:13 +0100 Subject: [PATCH 047/140] fix(copilot): confirm with replace for copilot only --- lua/lazyvim/plugins/extras/coding/copilot.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lua/lazyvim/plugins/extras/coding/copilot.lua b/lua/lazyvim/plugins/extras/coding/copilot.lua index 26b29d64..213e4d79 100644 --- a/lua/lazyvim/plugins/extras/coding/copilot.lua +++ b/lua/lazyvim/plugins/extras/coding/copilot.lua @@ -35,7 +35,24 @@ return { ---@param opts cmp.ConfigSchema opts = function(_, opts) local cmp = require("cmp") + opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "copilot" } })) + + local confirm = opts.mapping[""] + local confirm_copilot = cmp.mapping.confirm({ + select = true, + behavior = cmp.ConfirmBehavior.Replace, + }) + + opts.mapping = vim.tbl_extend("force", opts.mapping, { + [""] = function(...) + local entry = cmp.get_selected_entry() + if entry and entry.source.name == "copilot" then + return confirm_copilot(...) + end + return confirm(...) + end, + }) end, }, } From 3c6357815c354ee2bb82b4162a484c1de6d575dc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 5 Mar 2023 17:10:36 +0100 Subject: [PATCH 048/140] chore(main): release 1.17.1 (#389) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7c073fb..898b3269 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.17.1](https://github.com/LazyVim/LazyVim/compare/v1.17.0...v1.17.1) (2023-03-05) + + +### Bug Fixes + +* **copilot:** confirm with replace for copilot only ([079d396](https://github.com/LazyVim/LazyVim/commit/079d3967d03d47b95bdec10bb2621db1c4a07dce)) + ## [1.17.0](https://github.com/LazyVim/LazyVim/compare/v1.16.0...v1.17.0) (2023-03-05) From c407ddfe8ab36608ba1fe1c1d4f6723cce506a01 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 6 Mar 2023 07:34:42 +0100 Subject: [PATCH 049/140] feat(shfmt): added shfmt to null-ls and mason --- lua/lazyvim/plugins/lsp/init.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index db0339c4..ffe9b94a 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -65,7 +65,7 @@ return { }, }, ---@param opts PluginLspOpts - config = function(plugin, opts) + config = function(_, opts) -- setup autoformat require("lazyvim.plugins.lsp.format").autoformat = opts.autoformat -- setup formatting and keymaps @@ -141,6 +141,7 @@ return { sources = { -- nls.builtins.formatting.prettierd, nls.builtins.formatting.stylua, + nls.builtins.formatting.shfmt, nls.builtins.diagnostics.flake8, }, } @@ -156,11 +157,12 @@ return { opts = { ensure_installed = { "stylua", + "shfmt", "flake8", }, }, ---@param opts MasonSettings | {ensure_installed: string[]} - config = function(plugin, opts) + config = function(_, opts) require("mason").setup(opts) local mr = require("mason-registry") for _, tool in ipairs(opts.ensure_installed) do From 8f3834bc13c6ca5acf82c1e44c5c250799d683a0 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 6 Mar 2023 07:35:02 +0100 Subject: [PATCH 050/140] feat(null-ls): added fish_indent and fish diag --- lua/lazyvim/plugins/lsp/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index ffe9b94a..de4493f4 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -139,7 +139,8 @@ return { local nls = require("null-ls") return { sources = { - -- nls.builtins.formatting.prettierd, + nls.builtins.formatting.fish_indent, + nls.builtins.diagnostics.fish, nls.builtins.formatting.stylua, nls.builtins.formatting.shfmt, nls.builtins.diagnostics.flake8, From 23ba877bb07f17a44af60e341be9f246ece5c133 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 6 Mar 2023 07:37:30 +0100 Subject: [PATCH 051/140] feat(copilot): better sorting for cmp sources when using copilot --- lua/lazyvim/plugins/extras/coding/copilot.lua | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/coding/copilot.lua b/lua/lazyvim/plugins/extras/coding/copilot.lua index 213e4d79..1c024a10 100644 --- a/lua/lazyvim/plugins/extras/coding/copilot.lua +++ b/lua/lazyvim/plugins/extras/coding/copilot.lua @@ -36,7 +36,7 @@ return { opts = function(_, opts) local cmp = require("cmp") - opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "copilot" } })) + table.insert(opts.sources, 1, { name = "copilot", group_index = 2 }) local confirm = opts.mapping[""] local confirm_copilot = cmp.mapping.confirm({ @@ -53,6 +53,24 @@ return { return confirm(...) end, }) + opts.sorting = { + priority_weight = 2, + comparators = { + require("copilot_cmp.comparators").prioritize, + + -- Below is the default comparitor list and order for nvim-cmp + cmp.config.compare.offset, + -- cmp.config.compare.scopes, --this is commented in nvim-cmp too + cmp.config.compare.exact, + cmp.config.compare.score, + cmp.config.compare.recently_used, + cmp.config.compare.locality, + cmp.config.compare.kind, + cmp.config.compare.sort_text, + cmp.config.compare.length, + cmp.config.compare.order, + }, + } end, }, } From b1b5b461bf9d853d8472ee5b968471695118958b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 6 Mar 2023 06:38:20 +0000 Subject: [PATCH 052/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index f484872f..20a770be 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 05 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 06 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 5bb23147877b3fcbe4cc28c0a7d820bcb52bb141 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 10 Mar 2023 08:43:53 +0100 Subject: [PATCH 053/140] feat(typescript): added null-ls typescript code actions --- lua/lazyvim/plugins/extras/lang/typescript.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/lazyvim/plugins/extras/lang/typescript.lua b/lua/lazyvim/plugins/extras/lang/typescript.lua index 14c4b9ed..baabd58c 100644 --- a/lua/lazyvim/plugins/extras/lang/typescript.lua +++ b/lua/lazyvim/plugins/extras/lang/typescript.lua @@ -42,4 +42,10 @@ return { }, }, }, + { + "jose-elias-alvarez/null-ls.nvim", + opts = function(_, opts) + table.insert(opts.sources, require("typescript.extensions.null-ls.code-actions")) + end, + }, } From 5aad5749a745f928b0a1954917467f04c84e8a07 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 10 Mar 2023 08:44:17 +0100 Subject: [PATCH 054/140] feat(null-ls): added .neoconf.json to null-ls root_dir --- lua/lazyvim/plugins/lsp/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index de4493f4..25b3a8f1 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -138,6 +138,7 @@ return { opts = function() local nls = require("null-ls") return { + root_dir = require("null-ls.utils").root_pattern(".null-ls-root", ".neoconf.json", "Makefile", ".git"), sources = { nls.builtins.formatting.fish_indent, nls.builtins.diagnostics.fish, From 75299da24c4982f0d3ec6c9c3fbad7f94aa9eb72 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 10 Mar 2023 08:44:47 +0100 Subject: [PATCH 055/140] feat(eslint): added an extra for eslint lsp that runs EslintFixAll before saving a buffer --- lua/lazyvim/plugins/extras/linting/eslint.lua | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/linting/eslint.lua diff --git a/lua/lazyvim/plugins/extras/linting/eslint.lua b/lua/lazyvim/plugins/extras/linting/eslint.lua new file mode 100644 index 00000000..68a7ea1c --- /dev/null +++ b/lua/lazyvim/plugins/extras/linting/eslint.lua @@ -0,0 +1,23 @@ +return { + { + "neovim/nvim-lspconfig", + -- other settings removed for brevity + opts = { + servers = { + eslint = { + settings = { + -- helps eslint find the eslintrc when it's placed in a subfolder instead of the cwd root + workingDirectory = { mode = "auto" }, + }, + }, + }, + setup = { + eslint = function() + vim.api.nvim_create_autocmd("BufWritePre", { + command = "EslintFixAll", + }) + end, + }, + }, + }, +} From aa8bae07aea7a81e2f507e1920fd84a6b83c34ad Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 10 Mar 2023 08:45:09 +0100 Subject: [PATCH 056/140] feat(prettierd): added an extra for prettierd with null-ls --- .../plugins/extras/formatting/prettier.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/formatting/prettier.lua diff --git a/lua/lazyvim/plugins/extras/formatting/prettier.lua b/lua/lazyvim/plugins/extras/formatting/prettier.lua new file mode 100644 index 00000000..7ba7654d --- /dev/null +++ b/lua/lazyvim/plugins/extras/formatting/prettier.lua @@ -0,0 +1,17 @@ +return { + { + "williamboman/mason.nvim", + opts = { + ensure_installed = { + "prettierd", + }, + }, + }, + { + "jose-elias-alvarez/null-ls.nvim", + opts = function(_, opts) + local nls = require("null-ls") + table.insert(opts.sources, nls.builtins.formatting.prettierd) + end, + }, +} From f1dbd097e4461c322d6982c925d605a6ed57a4b2 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 10 Mar 2023 08:54:56 +0100 Subject: [PATCH 057/140] fix(eslint): only run EslintFixAll on buffers where eslint is attached --- lua/lazyvim/plugins/extras/linting/eslint.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/linting/eslint.lua b/lua/lazyvim/plugins/extras/linting/eslint.lua index 68a7ea1c..ee7f040f 100644 --- a/lua/lazyvim/plugins/extras/linting/eslint.lua +++ b/lua/lazyvim/plugins/extras/linting/eslint.lua @@ -14,7 +14,11 @@ return { setup = { eslint = function() vim.api.nvim_create_autocmd("BufWritePre", { - command = "EslintFixAll", + callback = function(event) + if require("lspconfig.util").get_active_client_by_name(event.buf, "eslint") then + vim.cmd("EslintFixAll") + end + end, }) end, }, From 3ffd5408a1d14fe8ea7efbc22f8d0b76b769860e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 10 Mar 2023 07:59:02 +0000 Subject: [PATCH 058/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 20a770be..8eab7cd4 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 06 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 10 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 9d9e6b11882d0de1204a6252a31056253d93a18d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 10 Mar 2023 09:04:29 +0100 Subject: [PATCH 059/140] chore(main): release 1.18.0 (#391) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 898b3269..2ba8b085 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## [1.18.0](https://github.com/LazyVim/LazyVim/compare/v1.17.1...v1.18.0) (2023-03-10) + + +### Features + +* **copilot:** better sorting for cmp sources when using copilot ([23ba877](https://github.com/LazyVim/LazyVim/commit/23ba877bb07f17a44af60e341be9f246ece5c133)) +* **eslint:** added an extra for eslint lsp that runs EslintFixAll before saving a buffer ([75299da](https://github.com/LazyVim/LazyVim/commit/75299da24c4982f0d3ec6c9c3fbad7f94aa9eb72)) +* **null-ls:** added .neoconf.json to null-ls root_dir ([5aad574](https://github.com/LazyVim/LazyVim/commit/5aad5749a745f928b0a1954917467f04c84e8a07)) +* **null-ls:** added fish_indent and fish diag ([8f3834b](https://github.com/LazyVim/LazyVim/commit/8f3834bc13c6ca5acf82c1e44c5c250799d683a0)) +* **prettierd:** added an extra for prettierd with null-ls ([aa8bae0](https://github.com/LazyVim/LazyVim/commit/aa8bae07aea7a81e2f507e1920fd84a6b83c34ad)) +* **shfmt:** added shfmt to null-ls and mason ([c407ddf](https://github.com/LazyVim/LazyVim/commit/c407ddfe8ab36608ba1fe1c1d4f6723cce506a01)) +* **typescript:** added null-ls typescript code actions ([5bb2314](https://github.com/LazyVim/LazyVim/commit/5bb23147877b3fcbe4cc28c0a7d820bcb52bb141)) + + +### Bug Fixes + +* **eslint:** only run EslintFixAll on buffers where eslint is attached ([f1dbd09](https://github.com/LazyVim/LazyVim/commit/f1dbd097e4461c322d6982c925d605a6ed57a4b2)) + ## [1.17.1](https://github.com/LazyVim/LazyVim/compare/v1.17.0...v1.17.1) (2023-03-05) From 9f30a2e03a66775bcbf3601e7a46e0aacf1bb291 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 10 Mar 2023 13:54:26 +0100 Subject: [PATCH 060/140] fix(prettier): extend ensure_installed instead of overwriting it. Fixes #406 --- lua/lazyvim/plugins/extras/formatting/prettier.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lua/lazyvim/plugins/extras/formatting/prettier.lua b/lua/lazyvim/plugins/extras/formatting/prettier.lua index 7ba7654d..e16b9805 100644 --- a/lua/lazyvim/plugins/extras/formatting/prettier.lua +++ b/lua/lazyvim/plugins/extras/formatting/prettier.lua @@ -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", From f5e010d8877ec0a25eb28ee041b5a427b4960856 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 10 Mar 2023 13:58:49 +0100 Subject: [PATCH 061/140] chore(main): release 1.18.1 (#407) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ba8b085..67419fa8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [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) From a28885be3f2428c993a3133f283d5648b6fa6b94 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 12 Mar 2023 09:10:45 +0100 Subject: [PATCH 062/140] fix(lsp): allow `silent=false` for lsp keymaps. Fixes #414 --- lua/lazyvim/plugins/lsp/keymaps.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/lsp/keymaps.lua b/lua/lazyvim/plugins/lsp/keymaps.lua index e221cfcf..91a4ed1d 100644 --- a/lua/lazyvim/plugins/lsp/keymaps.lua +++ b/lua/lazyvim/plugins/lsp/keymaps.lua @@ -66,7 +66,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 From 0bed79f844f450eb9f36031db659d44a65630621 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 12 Mar 2023 08:12:43 +0000 Subject: [PATCH 063/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 8eab7cd4..7592a066 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -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 March 12 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 8bb0c9ddd85780f1490ba29388449e9ef68a68ae Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 12 Mar 2023 09:26:52 +0100 Subject: [PATCH 064/140] chore(main): release 1.18.2 (#415) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67419fa8..2439b4c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [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) From bcdcfab020308a90c8cb347cf63d318f4cb05941 Mon Sep 17 00:00:00 2001 From: Will Norris Date: Sun, 12 Mar 2023 15:00:20 -0700 Subject: [PATCH 065/140] 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" --- lua/lazyvim/plugins/extras/ui/mini-starter.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/ui/mini-starter.lua b/lua/lazyvim/plugins/extras/ui/mini-starter.lua index 0a75d3dd..f677cf5e 100644 --- a/lua/lazyvim/plugins/extras/ui/mini-starter.lua +++ b/lua/lazyvim/plugins/extras/ui/mini-starter.lua @@ -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), From df6ac591baf8ab2ef40e3ddcaf34ed124f42469f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 14 Mar 2023 11:17:07 +0100 Subject: [PATCH 066/140] fix(core): set `cond=true` for LazyVim --- lua/lazyvim/plugins/core.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/core.lua b/lua/lazyvim/plugins/core.lua index 47a4773f..847d8470 100644 --- a/lua/lazyvim/plugins/core.lua +++ b/lua/lazyvim/plugins/core.lua @@ -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 = "*" }, } From 564e25a277467235bfa0732873caa9b6dfacc9b5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 14 Mar 2023 10:18:08 +0000 Subject: [PATCH 067/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 7592a066..b259daab 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 12 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 14 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 6b740fd300d7b6dccd1dd2c722ee6a4c7a5b718a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 14 Mar 2023 11:23:08 +0100 Subject: [PATCH 068/140] chore(main): release 1.19.0 (#422) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2439b4c0..96a4f65e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [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) From cec000dfd863bd681a5195eb71c0797f5d030062 Mon Sep 17 00:00:00 2001 From: Lc Date: Thu, 16 Mar 2023 19:16:55 +0800 Subject: [PATCH 069/140] 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 --- lua/lazyvim/config/init.lua | 6 +++--- lua/lazyvim/plugins/ui.lua | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 1caa03b9..9e881c7c 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -21,7 +21,7 @@ local defaults = { diagnostics = { Error = " ", Warn = " ", - Hint = " ", + Hint = " ", Info = " ", }, git = { @@ -42,7 +42,7 @@ local defaults = { Event = " ", Field = " ", File = " ", - Folder = " ", + Folder = " ", Function = " ", Interface = " ", Key = " ", @@ -50,7 +50,7 @@ local defaults = { Method = " ", Module = " ", Namespace = " ", - Null = "ﳠ ", + Null = " ", Number = " ", Object = " ", Operator = " ", diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index a4362cf9..83824e25 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -240,9 +240,9 @@ return { dashboard.section.header.val = vim.split(logo, "\n") dashboard.section.buttons.val = { - dashboard.button("f", " " .. " Find file", ":Telescope find_files "), + dashboard.button("f", " " .. " Find file", ":Telescope find_files "), dashboard.button("n", " " .. " New file", ":ene startinsert "), - dashboard.button("r", " " .. " Recent files", ":Telescope oldfiles "), + dashboard.button("r", " " .. " Recent files", ":Telescope oldfiles "), dashboard.button("g", " " .. " Find text", ":Telescope live_grep "), dashboard.button("c", " " .. " Config", ":e $MYVIMRC "), dashboard.button("s", " " .. " Restore Session", [[:lua require("persistence").load() ]]), From f0b548af2f602d4498f528cd1a4db8c1c0e5c048 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 16 Mar 2023 11:17:38 +0000 Subject: [PATCH 070/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index b259daab..486640eb 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 14 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 16 ============================================================================== Table of Contents *LazyVim-table-of-contents* From c10e550639caef68146d122d9bc4a66f2f38650a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 17 Mar 2023 08:04:17 +0100 Subject: [PATCH 071/140] feat(lsp): make lsp work when mason-lspconfig is disabled. Fixed #445 --- lua/lazyvim/plugins/lsp/init.lua | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 25b3a8f1..696cb4d0 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -101,16 +101,8 @@ 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" - end - - local mlsp = require("mason-lspconfig") - local available = mlsp.get_available_servers() + local have_mason, mlsp = pcall(require, "mason-lspconfig") + local available = have_mason and mlsp.get_available_servers() or {} local ensure_installed = {} ---@type string[] for server, server_opts in pairs(servers) do @@ -125,8 +117,10 @@ 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 end, }, From aa4f7ec6514c1ebbbea8b5041c15951ebb16c4da Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 17 Mar 2023 07:05:01 +0000 Subject: [PATCH 072/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 486640eb..b2d95e58 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 16 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 17 ============================================================================== Table of Contents *LazyVim-table-of-contents* From d0b378f427fc5d0a232a5b9c8032aa81fe165810 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 17 Mar 2023 08:16:40 +0100 Subject: [PATCH 073/140] chore(main): release 1.20.0 (#442) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96a4f65e..4a8fd310 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [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) From 9f5a0f1bd847663deea9cb48a178b85d7bdb3ec6 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 17 Mar 2023 16:29:32 +0100 Subject: [PATCH 074/140] feat(lsp): added keymap to see source actions with `cA` (useful for tsserver and others) --- lua/lazyvim/plugins/lsp/keymaps.lua | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/lsp/keymaps.lua b/lua/lazyvim/plugins/lsp/keymaps.lua index 91a4ed1d..682ec340 100644 --- a/lua/lazyvim/plugins/lsp/keymaps.lua +++ b/lua/lazyvim/plugins/lsp/keymaps.lua @@ -26,9 +26,24 @@ 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" }, - { "ca", vim.lsp.buf.code_action, desc = "Code Action", mode = { "n", "v" }, has = "codeAction" }, { "cf", format, desc = "Format Document", has = "documentFormatting" }, { "cf", format, desc = "Format Range", mode = "v", has = "documentRangeFormatting" }, + { "ca", vim.lsp.buf.code_action, desc = "Code Action", mode = { "n", "v" }, has = "codeAction" }, + { + "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] = { From b984c0cff57177fd002f8927d9914ecdf562623c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 17 Mar 2023 16:44:09 +0100 Subject: [PATCH 075/140] chore(main): release 1.21.0 (#449) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a8fd310..ecfea481 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [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 `<leader>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) From 501474e42166e199e61b4e704b266bd0a9625a65 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 17 Mar 2023 22:29:01 +0100 Subject: [PATCH 076/140] fix(config): compat with lazy.nvim --- lua/lazyvim/config/init.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 9e881c7c..96f790be 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -132,10 +132,11 @@ 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 From a0b12565545887fb97791a0efa9e089dd12967e4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 17 Mar 2023 22:31:38 +0100 Subject: [PATCH 077/140] chore(main): release 1.21.1 (#451) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ecfea481..66c4f408 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [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) From a7b25e13fa645dea848047e0dda54db9b254ec8e Mon Sep 17 00:00:00 2001 From: Pedro Cattori Date: Sun, 19 Mar 2023 02:58:51 -0400 Subject: [PATCH 078/140] fix(alpha): use `AlphaFooter` highlight for footer section (#461) --- lua/lazyvim/plugins/ui.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 83824e25..b664569c 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -253,9 +253,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, From db66353db9a072894ef56cbc2cd358a020b70255 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 19 Mar 2023 06:59:41 +0000 Subject: [PATCH 079/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index b2d95e58..b104b08b 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 17 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 19 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 7a8ca6222a554bdb78fb8de35404672fc4042302 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 19 Mar 2023 08:15:14 +0100 Subject: [PATCH 080/140] chore(main): release 1.21.2 (#463) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66c4f408..7bfb594d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [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) From 11d414c35841b35604e98cdc2d05e756da3c9421 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 19 Mar 2023 20:40:58 +0100 Subject: [PATCH 081/140] chore: update templates --- .github/ISSUE_TEMPLATE/bug_report.yml | 3 ++- .github/workflows/ci.yml | 10 +++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 0fd91466..03fbd8ca 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0fd094f5..964a780f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: | From df5cbfdbeccfa37ee391be8b49da7a4a4b6dcc40 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 20 Mar 2023 19:56:34 +0100 Subject: [PATCH 082/140] feat(mason): compatibility with the new mason registry --- lua/lazyvim/plugins/lsp/init.lua | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 696cb4d0..c89f13fc 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -101,15 +101,19 @@ return { require("lspconfig")[server].setup(server_opts) end + -- get all the servers that are available thourgh mason-lspconfig local have_mason, mlsp = pcall(require, "mason-lspconfig") - local available = have_mason and mlsp.get_available_servers() or {} + local all_mslp_servers = {} + if have_mason then + all_mslp_servers = vim.tbl_keys(require("mason-lspconfig.mappings.server").lspconfig_to_package) + end 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 @@ -161,12 +165,19 @@ return { 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, }, } From 18328d10c9f0b5b03c76f94ffce0d3ba7981bea5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 Mar 2023 18:57:14 +0000 Subject: [PATCH 083/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index b104b08b..93f17354 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 19 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 20 ============================================================================== Table of Contents *LazyVim-table-of-contents* From ade4342c42c47f4eadae3e6267ac35f546692158 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Tue, 21 Mar 2023 02:27:13 -0400 Subject: [PATCH 084/140] feat(treesitter): add luadoc (#469) --- lua/lazyvim/plugins/treesitter.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index c4bf6550..1efb0f33 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -43,6 +43,7 @@ return { "javascript", "json", "lua", + "luadoc", "luap", "markdown", "markdown_inline", From 049c84509c8b2f8122ffef366f242acb48de8397 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 21 Mar 2023 06:27:56 +0000 Subject: [PATCH 085/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 93f17354..b8c85a31 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 20 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 21 ============================================================================== Table of Contents *LazyVim-table-of-contents* From b0cef1f506e4bbaa8cfe07990ee49518d8e13f3d Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Wed, 22 Mar 2023 04:03:02 -0400 Subject: [PATCH 086/140] fix(autocmd): remove query from q-to-quit autocmd (#473) --- lua/lazyvim/config/autocmds.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/lazyvim/config/autocmds.lua b/lua/lazyvim/config/autocmds.lua index 4b6c9d7b..d37634cd 100644 --- a/lua/lazyvim/config/autocmds.lua +++ b/lua/lazyvim/config/autocmds.lua @@ -48,7 +48,6 @@ vim.api.nvim_create_autocmd("FileType", { "man", "notify", "qf", - "query", -- :InspectTree "spectre_panel", "startuptime", "tsplayground", From b48a1969d3f194ac96ffad437ca5d71a07545f44 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 22 Mar 2023 08:03:44 +0000 Subject: [PATCH 087/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index b8c85a31..18ffa2ea 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 21 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 22 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 381ee0a9fc536a4e1ed9ad3e089f10129f0d50a0 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 23 Mar 2023 08:00:24 +0100 Subject: [PATCH 088/140] fix(mason): removed flake8. You can add it back in your own configs if you need it or add ruff_lsp --- lua/lazyvim/plugins/lsp/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index c89f13fc..fe3eac9e 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -142,7 +142,7 @@ return { nls.builtins.diagnostics.fish, nls.builtins.formatting.stylua, nls.builtins.formatting.shfmt, - nls.builtins.diagnostics.flake8, + -- nls.builtins.diagnostics.flake8, }, } end, @@ -158,7 +158,7 @@ return { ensure_installed = { "stylua", "shfmt", - "flake8", + -- "flake8", }, }, ---@param opts MasonSettings | {ensure_installed: string[]} From c272cb294030f656b890f4b5b44d691c9e42aa50 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 23 Mar 2023 07:01:09 +0000 Subject: [PATCH 089/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 18ffa2ea..35b72a47 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 22 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 23 ============================================================================== Table of Contents *LazyVim-table-of-contents* From c4572fcec877053df89e7aba3bcd52a0ca5c7df7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 23 Mar 2023 08:12:56 +0100 Subject: [PATCH 090/140] chore(main): release 1.22.0 (#468) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bfb594d..da4e10c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [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) From 59eb19835f3b291912d46e5e8ea762367201cbf1 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Sat, 25 Mar 2023 04:42:57 -0400 Subject: [PATCH 091/140] feat(treesitter): use Python indents as they've improved greatly (#490) --- lua/lazyvim/plugins/treesitter.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 1efb0f33..c8bc4260 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -33,7 +33,7 @@ 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", From 7048619cc1a3eea3c06a0187886f4a7d0361b65d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 25 Mar 2023 08:43:47 +0000 Subject: [PATCH 092/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 35b72a47..6898309d 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 23 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 25 ============================================================================== Table of Contents *LazyVim-table-of-contents* From f67f20184f0fe852881d925d387ce138754fa147 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 25 Mar 2023 09:57:40 +0100 Subject: [PATCH 093/140] chore(main): release 1.23.0 (#492) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index da4e10c5..67c814c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [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) From ed48b85dbea30a15518b4caa58cbf5d2b54f97a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=B5=20Quang=20Chi=E1=BA=BFn?= <87252943+yeuxacucodon@users.noreply.github.com> Date: Fri, 31 Mar 2023 14:40:57 +0700 Subject: [PATCH 094/140] feat(autocmds): add auto create dir (#493) * feat(autocmds): add auto create dir * refactor: auto-create dir --------- Co-authored-by: Folke Lemaitre --- lua/lazyvim/config/autocmds.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lua/lazyvim/config/autocmds.lua b/lua/lazyvim/config/autocmds.lua index d37634cd..0e201f29 100644 --- a/lua/lazyvim/config/autocmds.lua +++ b/lua/lazyvim/config/autocmds.lua @@ -67,3 +67,12 @@ 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) + local file = vim.loop.fs_realpath(event.match) or event.match + vim.fn.mkdir(vim.fn.fnamemodify(file, ":p:h"), "p") + end, +}) From a6062758d2ef9c2ed2f0b703ba859aa4cbb6517c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 31 Mar 2023 07:41:46 +0000 Subject: [PATCH 095/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 6898309d..f6d3aa80 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 25 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 31 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 79fe0455a02b791eae26e9934fdbaf075d9522ae Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 31 Mar 2023 13:04:43 +0200 Subject: [PATCH 096/140] feat(lualine): added lazy extension --- lua/lazyvim/plugins/ui.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index b664569c..2c43cc0c 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -83,7 +83,7 @@ return { { "nvim-lualine/lualine.nvim", event = "VeryLazy", - opts = function(plugin) + opts = function() local icons = require("lazyvim.config").icons local function fg(name) @@ -98,7 +98,7 @@ return { options = { theme = "auto", globalstatus = true, - disabled_filetypes = { statusline = { "dashboard", "lazy", "alpha" } }, + disabled_filetypes = { statusline = { "dashboard", "alpha" } }, }, sections = { lualine_a = { "mode" }, @@ -154,7 +154,7 @@ return { end, }, }, - extensions = { "neo-tree" }, + extensions = { "neo-tree", "lazy" }, } end, }, From 7ce1b1519a45f48aa4b5f35b7b7a886b42fe56d8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 31 Mar 2023 13:17:00 +0200 Subject: [PATCH 097/140] chore(main): release 1.24.0 (#510) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67c814c6..fcf66d65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [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) From 078250a114b45785743fcfe0482c7667f304f92c Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Sat, 15 Apr 2023 17:11:29 -0400 Subject: [PATCH 098/140] refactor(treesitter)!: rename help to vimdoc (#521) --- lua/lazyvim/plugins/treesitter.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index c8bc4260..8aaea6ee 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -38,7 +38,6 @@ return { ensure_installed = { "bash", "c", - "help", "html", "javascript", "json", @@ -53,6 +52,7 @@ return { "tsx", "typescript", "vim", + "vimdoc", "yaml", }, incremental_selection = { From 1c06aa35ee126d150afcd67d7dea68dc809179ad Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 15 Apr 2023 21:12:09 +0000 Subject: [PATCH 099/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index f6d3aa80..4f73c97b 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 March 31 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 April 15 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 7476da78117b032bc34d0130e6b1f9c7eea77073 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 16 Apr 2023 07:53:42 +0200 Subject: [PATCH 100/140] fix(autocmds): don't auto create dirs for urls. Fixes #583 --- lua/lazyvim/config/autocmds.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/lazyvim/config/autocmds.lua b/lua/lazyvim/config/autocmds.lua index 0e201f29..3f808ede 100644 --- a/lua/lazyvim/config/autocmds.lua +++ b/lua/lazyvim/config/autocmds.lua @@ -72,6 +72,9 @@ vim.api.nvim_create_autocmd("FileType", { 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, From 7691daa036244f15b5c464d0493d6d84d9f1a6a6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 16 Apr 2023 05:54:27 +0000 Subject: [PATCH 101/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 4f73c97b..d31de2cb 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 April 15 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 April 16 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 6e01e8560e4ca197bc56666e9b969fe75d91b310 Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Sun, 16 Apr 2023 01:25:20 -0700 Subject: [PATCH 102/140] 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 --- lua/lazyvim/plugins/editor.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index cdefb03a..faea345a 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -122,7 +122,7 @@ return { }, { "sS", - Util.telescope("lsp_workspace_symbols", { + Util.telescope("lsp_dynamic_workspace_symbols", { symbols = { "Class", "Function", From 1defd5f67008c695a7d99d72bc50432de5eaed3a Mon Sep 17 00:00:00 2001 From: Shashank Tomar Date: Sun, 16 Apr 2023 18:39:12 +1000 Subject: [PATCH 103/140] feat(autocmds): add checkhealth filetype to close_with_q list (#512) --- lua/lazyvim/config/autocmds.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/config/autocmds.lua b/lua/lazyvim/config/autocmds.lua index 3f808ede..639a01c8 100644 --- a/lua/lazyvim/config/autocmds.lua +++ b/lua/lazyvim/config/autocmds.lua @@ -51,6 +51,7 @@ vim.api.nvim_create_autocmd("FileType", { "spectre_panel", "startuptime", "tsplayground", + "checkhealth", }, callback = function(event) vim.bo[event.buf].buflisted = false From a099b2d3ab3ff3bafb075c101e2b2a48b44fe869 Mon Sep 17 00:00:00 2001 From: Aaron Dill <117116764+aarondill@users.noreply.github.com> Date: Sun, 16 Apr 2023 03:43:14 -0500 Subject: [PATCH 104/140] 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. --- lua/lazyvim/plugins/lsp/keymaps.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/lsp/keymaps.lua b/lua/lazyvim/plugins/lsp/keymaps.lua index 682ec340..37301b50 100644 --- a/lua/lazyvim/plugins/lsp/keymaps.lua +++ b/lua/lazyvim/plugins/lsp/keymaps.lua @@ -49,8 +49,8 @@ function M.get() M._keys[#M._keys + 1] = { "cr", function() - require("inc_rename") - return ":IncRename " .. vim.fn.expand("") + local inc_rename = require("inc_rename") + return ":" .. inc_rename.config.cmd_name .. " " .. vim.fn.expand("") end, expr = true, desc = "Rename", From bef36bb2fd7493828529ed49a071d240602b164d Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 16 Apr 2023 10:47:36 +0200 Subject: [PATCH 105/140] fix(format): ignore vim.b.autoformat when formatting using key bindings. Fixes #575 --- lua/lazyvim/plugins/lsp/format.lua | 5 +++-- lua/lazyvim/plugins/lsp/keymaps.lua | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/lsp/format.lua b/lua/lazyvim/plugins/lsp/format.lua index 3605fc54..06841e21 100644 --- a/lua/lazyvim/plugins/lsp/format.lua +++ b/lua/lazyvim/plugins/lsp/format.lua @@ -18,9 +18,10 @@ 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 diff --git a/lua/lazyvim/plugins/lsp/keymaps.lua b/lua/lazyvim/plugins/lsp/keymaps.lua index 37301b50..e6f8d755 100644 --- a/lua/lazyvim/plugins/lsp/keymaps.lua +++ b/lua/lazyvim/plugins/lsp/keymaps.lua @@ -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 From 2d8116ef674ad4b2a3ba62f590ff32d1c30a2f9c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 16 Apr 2023 11:03:54 +0200 Subject: [PATCH 106/140] fix(lsp): gt -> gT. Fixes #554 --- lua/lazyvim/plugins/lsp/keymaps.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/lsp/keymaps.lua b/lua/lazyvim/plugins/lsp/keymaps.lua index e6f8d755..a4b4895c 100644 --- a/lua/lazyvim/plugins/lsp/keymaps.lua +++ b/lua/lazyvim/plugins/lsp/keymaps.lua @@ -18,7 +18,7 @@ function M.get() { "gr", "Telescope lsp_references", desc = "References" }, { "gD", vim.lsp.buf.declaration, desc = "Goto Declaration" }, { "gI", "Telescope lsp_implementations", desc = "Goto Implementation" }, - { "gt", "Telescope lsp_type_definitions", desc = "Goto Type Definition" }, + { "gT", "Telescope lsp_type_definitions", desc = "Goto Type Definition" }, { "K", vim.lsp.buf.hover, desc = "Hover" }, { "gK", vim.lsp.buf.signature_help, desc = "Signature Help", has = "signatureHelp" }, { "", vim.lsp.buf.signature_help, mode = "i", desc = "Signature Help", has = "signatureHelp" }, From a9e9204daec3355015bbe677068198cf38cd2cf3 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 16 Apr 2023 11:18:44 +0200 Subject: [PATCH 107/140] fix(lazygit): dont use `` for normal more for laygit to prevent delays on ``. Fixes #567 --- lua/lazyvim/config/keymaps.lua | 6 +++--- lua/lazyvim/util/init.lua | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 85b64478..0d8759b6 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -112,8 +112,8 @@ local conceallevel = vim.o.conceallevel > 0 and vim.o.conceallevel or 3 map("n", "uc", function() Util.toggle("conceallevel", false, {0, conceallevel}) end, { desc = "Toggle Conceal" }) -- lazygit -map("n", "gg", function() Util.float_term({ "lazygit" }, { cwd = Util.get_root() }) end, { desc = "Lazygit (root dir)" }) -map("n", "gG", function() Util.float_term({ "lazygit" }) end, { desc = "Lazygit (cwd)" }) +map("n", "gg", function() Util.float_term({ "lazygit" }, { cwd = Util.get_root(), esc_esc = false }) end, { desc = "Lazygit (root dir)" }) +map("n", "gG", function() Util.float_term({ "lazygit" }, {esc_esc = false}) end, { desc = "Lazygit (cwd)" }) -- quit map("n", "qq", "qa", { desc = "Quit all" }) @@ -126,7 +126,7 @@ end -- floating terminal map("n", "ft", function() Util.float_term(nil, { cwd = Util.get_root() }) end, { desc = "Terminal (root dir)" }) map("n", "fT", function() Util.float_term() end, { desc = "Terminal (cwd)" }) -map("t", "", "", {desc = "Enter Normal Mode"}) +map("t", "", "", { desc = "Enter Normal Mode" }) -- windows map("n", "ww", "p", { desc = "Other window" }) diff --git a/lua/lazyvim/util/init.lua b/lua/lazyvim/util/init.lua index 1ef39a78..0bbabae2 100644 --- a/lua/lazyvim/util/init.lua +++ b/lua/lazyvim/util/init.lua @@ -102,15 +102,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", "", "", { buffer = float.buf, nowait = true }) + end end ---@param silent boolean? From 02c5e8d953fff68b832a8f22a83428bd229ddc59 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 16 Apr 2023 11:34:35 +0200 Subject: [PATCH 108/140] fix(config): options cant be disabled with lazyvim config. Fixes #566 --- lua/lazyvim/config/init.lua | 5 +++-- lua/lazyvim/config/options.lua | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 96f790be..24c19aa7 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -14,7 +14,8 @@ 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 = { @@ -141,7 +142,7 @@ function M.load(name) }) 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) diff --git a/lua/lazyvim/config/options.lua b/lua/lazyvim/config/options.lua index bf3efb7c..0d302003 100644 --- a/lua/lazyvim/config/options.lua +++ b/lua/lazyvim/config/options.lua @@ -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 From 36aa64bc0b3d24045e6f83adc9a13f95ed52269d Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 16 Apr 2023 11:35:35 +0200 Subject: [PATCH 109/140] build: deprecated treesitter method --- lua/lazyvim/util/build.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/util/build.lua b/lua/lazyvim/util/build.lua index 872930f3..bbfb60bb 100644 --- a/lua/lazyvim/util/build.lua +++ b/lua/lazyvim/util/build.lua @@ -256,7 +256,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 From 98775f56312110c640be7e9d43ecc766a116427a Mon Sep 17 00:00:00 2001 From: Loi Chyan Date: Sun, 16 Apr 2023 20:15:34 +0800 Subject: [PATCH 110/140] feat(telescope): add document/workspace diagnostics and todo/fixme telescope keymaps (#557) --- lua/lazyvim/plugins/editor.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index faea345a..d03e88b5 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -89,7 +89,8 @@ return { { "sb", "Telescope current_buffer_fuzzy_find", desc = "Buffer" }, { "sc", "Telescope command_history", desc = "Command History" }, { "sC", "Telescope commands", desc = "Commands" }, - { "sd", "Telescope diagnostics", desc = "Diagnostics" }, + { "sd", "Telescope diagnostics bufnr=0", desc = "Document diagnostics" }, + { "sD", "Telescope diagnostics", desc = "Workspace diagnostics" }, { "sg", Util.telescope("live_grep"), desc = "Grep (root dir)" }, { "sG", Util.telescope("live_grep", { cwd = false }), desc = "Grep (cwd)" }, { "sh", "Telescope help_tags", desc = "Help Pages" }, @@ -373,6 +374,7 @@ return { { "xt", "TodoTrouble", desc = "Todo (Trouble)" }, { "xT", "TodoTrouble keywords=TODO,FIX,FIXME", desc = "Todo/Fix/Fixme (Trouble)" }, { "st", "TodoTelescope", desc = "Todo" }, + { "sT", "TodoTelescope keywords=TODO,FIX,FIXME", desc = "Todo/Fix/Fixme" }, }, }, } From 29ec138f8e171358f5f108752638ef1fa4325725 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 16 Apr 2023 14:17:09 +0200 Subject: [PATCH 111/140] chore(main): release 2.0.0 (#588) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fcf66d65..3607b090 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # Changelog +## [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 `<esc>` for normal more for laygit to prevent delays on ``. Fixes [#567](https://github.com/LazyVim/LazyVim/issues/567) ([a9e9204](https://github.com/LazyVim/LazyVim/commit/a9e9204daec3355015bbe677068198cf38cd2cf3)) +* **lsp:** 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) From df94a044ec656c456067b550531a62e80a5be420 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 16 Apr 2023 21:33:55 +0200 Subject: [PATCH 112/140] feat(which-key): easier integration for which-key group names --- lua/lazyvim/plugins/editor.lua | 17 +++++++---------- lua/lazyvim/plugins/ui.lua | 11 +++++++++++ 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index d03e88b5..6beaff20 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -218,11 +218,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" }, @@ -239,11 +235,12 @@ return { ["u"] = { name = "+ui" }, ["w"] = { name = "+windows" }, ["x"] = { name = "+diagnostics/quickfix" }, - } - if Util.has("noice.nvim") then - keymaps["sn"] = { name = "+noice" } - end - wk.register(keymaps) + }, + }, + config = function(_, opts) + local wk = require("which-key") + wk.setup(opts) + wk.register(opts.defaults) end, }, diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 2c43cc0c..26e6e092 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -199,6 +199,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["sn"] = { name = "+noice" } + end + end, + }, + }, opts = { lsp = { override = { From bc14e02a1ff43f1a69d2a6755faeec8a5ec26ac9 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 16 Apr 2023 21:35:38 +0200 Subject: [PATCH 113/140] feat: added extra for dap --- lua/lazyvim/config/init.lua | 7 ++ lua/lazyvim/plugins/extras/dap/core.lua | 92 +++++++++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/dap/core.lua diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 24c19aa7..71bdb54f 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -19,6 +19,13 @@ local defaults = { }, -- icons used by other plugins icons = { + dap = { + Stopped = { " ", "DiagnosticWarn", "DapStoppedLine" }, + Breakpoint = " ", + BreakpointCondition = " ", + BreakpointRejected = { " ", "DiagnosticError" }, + LogPoint = ".>", + }, diagnostics = { Error = " ", Warn = " ", diff --git a/lua/lazyvim/plugins/extras/dap/core.lua b/lua/lazyvim/plugins/extras/dap/core.lua new file mode 100644 index 00000000..48a5875e --- /dev/null +++ b/lua/lazyvim/plugins/extras/dap/core.lua @@ -0,0 +1,92 @@ +return { + "mfussenegger/nvim-dap", + + dependencies = { + + -- fancy UI for the debugger + { + "rcarriga/nvim-dap-ui", + -- stylua: ignore + keys = { + { "du", function() require("dapui").toggle({ }) end, desc = "Dap UI" } + }, + 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 = { + ["d"] = { name = "+debug" }, + ["da"] = { name = "+adapters" }, + }, + }, + }, + + -- mason.nvim integration + { + "jay-babu/mason-nvim-dap.nvim", + dependencies = "mason.nvim", + 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 = { + { "db", function() require("dap").toggle_breakpoint() end, desc = "Toggle Breakpoint" }, + { "dB", function() require("dap").set_breakpoint(vim.fn.input('Breakpoint condition: ')) end, desc = "Breakpoint Condition" }, + { "dc", function() require("dap").continue() end, desc = "Continue" }, + { "do", function() require("dap").step_over() end, desc = "Step Over" }, + { "di", function() require("dap").step_into() end, desc = "Step Into" }, + { "dw", function() require("dap.ui.widgets").hover() end, desc = "Widgets" }, + { "dr", function() require("dap").repl.open() end, desc = "Repl" }, + }, + + 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, +} From f562d1d19761c3419380c3b175fd00a440ff0932 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 16 Apr 2023 21:35:52 +0200 Subject: [PATCH 114/140] feat(dap): added extra for dap nlua --- lua/lazyvim/plugins/extras/dap/nlua.lua | 27 +++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/dap/nlua.lua diff --git a/lua/lazyvim/plugins/extras/dap/nlua.lua b/lua/lazyvim/plugins/extras/dap/nlua.lua new file mode 100644 index 00000000..1d9eb650 --- /dev/null +++ b/lua/lazyvim/plugins/extras/dap/nlua.lua @@ -0,0 +1,27 @@ +return { + "mfussenegger/nvim-dap", + + dependencies = { + { + "jbyuki/one-small-step-for-vimkind", + -- stylua: ignore + keys = { + { "daL", function() require("osv").launch({ port = 8086 }) end, desc = "Adapter Lua Server" }, + { "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, + }, + }, +} From 54846ff763722abb433bcadc8499f02c02ff3710 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 16 Apr 2023 21:50:48 +0200 Subject: [PATCH 115/140] docs: add extras keymaps to keymaps --- lua/lazyvim/util/build.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lua/lazyvim/util/build.lua b/lua/lazyvim/util/build.lua index bbfb60bb..e76098a4 100644 --- a/lua/lazyvim/util/build.lua +++ b/lua/lazyvim/util/build.lua @@ -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 = {} From feaeab9fcabf005cbf18b846d2ab0129a73837a9 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 16 Apr 2023 21:56:38 +0200 Subject: [PATCH 116/140] fix(dap): added DapInstall and DapUninstall to cmds --- lua/lazyvim/plugins/extras/dap/core.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/dap/core.lua b/lua/lazyvim/plugins/extras/dap/core.lua index 48a5875e..0b7e9ac2 100644 --- a/lua/lazyvim/plugins/extras/dap/core.lua +++ b/lua/lazyvim/plugins/extras/dap/core.lua @@ -48,6 +48,7 @@ return { { "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 From 700cdaf30d9b5425a3fa599ac00f835dfc02fe6c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 16 Apr 2023 22:05:08 +0200 Subject: [PATCH 117/140] chore(main): release 2.1.0 (#594) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3607b090..2e131cf7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [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) From 0cb89742216d4c73fa944ab9e2fcd21793ed7a78 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 16 Apr 2023 22:34:56 +0200 Subject: [PATCH 118/140] fix(lsp): gT => gy. keymap for goto type definition. Fixes #554 --- lua/lazyvim/plugins/lsp/keymaps.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/lsp/keymaps.lua b/lua/lazyvim/plugins/lsp/keymaps.lua index a4b4895c..de97d08d 100644 --- a/lua/lazyvim/plugins/lsp/keymaps.lua +++ b/lua/lazyvim/plugins/lsp/keymaps.lua @@ -18,7 +18,7 @@ function M.get() { "gr", "Telescope lsp_references", desc = "References" }, { "gD", vim.lsp.buf.declaration, desc = "Goto Declaration" }, { "gI", "Telescope lsp_implementations", desc = "Goto Implementation" }, - { "gT", "Telescope lsp_type_definitions", desc = "Goto Type Definition" }, + { "gy", "Telescope lsp_type_definitions", desc = "Goto T[y]pe Definition" }, { "K", vim.lsp.buf.hover, desc = "Hover" }, { "gK", vim.lsp.buf.signature_help, desc = "Signature Help", has = "signatureHelp" }, { "", vim.lsp.buf.signature_help, mode = "i", desc = "Signature Help", has = "signatureHelp" }, From 0155de00ab76e7ffc1d8232c10121f24c4e84cd9 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 16 Apr 2023 23:08:46 +0200 Subject: [PATCH 119/140] feat(noice): added keymap to dismiss all noice messages --- lua/lazyvim/plugins/ui.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 26e6e092..1139dc5d 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -229,6 +229,7 @@ return { { "snl", function() require("noice").cmd("last") end, desc = "Noice Last Message" }, { "snh", function() require("noice").cmd("history") end, desc = "Noice History" }, { "sna", function() require("noice").cmd("all") end, desc = "Noice All" }, + { "snd", function() require("noice").cmd("dismiss") end, desc = "Dismiss All" }, { "", function() if not require("noice.lsp").scroll(4) then return "" end end, silent = true, expr = true, desc = "Scroll forward", mode = {"i", "n", "s"} }, { "", function() if not require("noice.lsp").scroll(-4) then return "" end end, silent = true, expr = true, desc = "Scroll backward", mode = {"i", "n", "s"}}, }, From df9547f43223fd89ccc7c1fa5088623ca3c2cfd4 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 17 Apr 2023 07:33:55 +0200 Subject: [PATCH 120/140] fix(telescope): consistent keymap description. Fixes #600 --- lua/lazyvim/plugins/editor.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index 6beaff20..f225f677 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -73,7 +73,7 @@ return { version = false, -- telescope did only one release, so use HEAD for now keys = { { ",", "Telescope buffers show_all_buffers=true", desc = "Switch Buffer" }, - { "/", Util.telescope("live_grep"), desc = "Find in Files (Grep)" }, + { "/", Util.telescope("live_grep"), desc = "Grep (root dir)" }, { ":", "Telescope command_history", desc = "Command History" }, { "", Util.telescope("files"), desc = "Find Files (root dir)" }, -- find @@ -226,7 +226,7 @@ return { ["["] = { name = "+prev" }, [""] = { name = "+tabs" }, ["b"] = { name = "+buffer" }, - ["c"] = { name = "+code" }, + ["f"] = { name = "+file/find" }, ["g"] = { name = "+git" }, ["gh"] = { name = "+hunks" }, From 338680d80af0b936bb761064956cd64b6a4fe3cd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 17 Apr 2023 05:34:39 +0000 Subject: [PATCH 121/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index d31de2cb..6002eb8a 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 April 16 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 April 17 ============================================================================== Table of Contents *LazyVim-table-of-contents* From b391c37e5395d9897a49a7a0a3786b0819e5d7f2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 17 Apr 2023 08:31:16 +0200 Subject: [PATCH 122/140] chore(main): release 2.2.0 (#595) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e131cf7..addb2922 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [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 => 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) From a94f7afdebc56338b5552de11561646d8ef4b5be Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 17 Apr 2023 08:49:38 +0200 Subject: [PATCH 123/140] fix(telescope): typo --- lua/lazyvim/plugins/editor.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index f225f677..5ba69477 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -226,7 +226,7 @@ return { ["["] = { name = "+prev" }, [""] = { name = "+tabs" }, ["b"] = { name = "+buffer" }, - ["c"] = { name = "+code" }, ["f"] = { name = "+file/find" }, ["g"] = { name = "+git" }, ["gh"] = { name = "+hunks" }, From 5f6913c0dbac1026db70534e537c49d74f038ca1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 17 Apr 2023 08:51:54 +0200 Subject: [PATCH 124/140] chore(main): release 2.2.1 (#601) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index addb2922..7770975c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [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) From cfaf3b054e1a68ea0f7a73d51a0f6c27395198e9 Mon Sep 17 00:00:00 2001 From: Jonas Holst Damtoft Date: Mon, 17 Apr 2023 17:53:39 +0200 Subject: [PATCH 125/140] feat(dap): add step out, rebind step over (#605) --- lua/lazyvim/plugins/extras/dap/core.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/dap/core.lua b/lua/lazyvim/plugins/extras/dap/core.lua index 0b7e9ac2..35e1b5cd 100644 --- a/lua/lazyvim/plugins/extras/dap/core.lua +++ b/lua/lazyvim/plugins/extras/dap/core.lua @@ -72,8 +72,9 @@ return { { "db", function() require("dap").toggle_breakpoint() end, desc = "Toggle Breakpoint" }, { "dB", function() require("dap").set_breakpoint(vim.fn.input('Breakpoint condition: ')) end, desc = "Breakpoint Condition" }, { "dc", function() require("dap").continue() end, desc = "Continue" }, - { "do", function() require("dap").step_over() end, desc = "Step Over" }, + { "dO", function() require("dap").step_over() end, desc = "Step Over" }, { "di", function() require("dap").step_into() end, desc = "Step Into" }, + { "do", function() require("dap").step_out() end, desc = "Step Out" }, { "dw", function() require("dap.ui.widgets").hover() end, desc = "Widgets" }, { "dr", function() require("dap").repl.open() end, desc = "Repl" }, }, From 77efbe8bcf76675ba83257a376001e0e86dbd2c4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 17 Apr 2023 20:53:26 +0200 Subject: [PATCH 126/140] chore(main): release 2.3.0 (#606) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7770975c..4d334766 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [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) From 06c38c52a91bb1dcc2dec2d79d6e13606324be77 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 18 Apr 2023 19:59:19 +0200 Subject: [PATCH 127/140] feat(diagnostics): show diagnostics source when more than one source is reporting diagnostics --- lua/lazyvim/plugins/lsp/init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index fe3eac9e..2f761754 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -21,7 +21,11 @@ return { diagnostics = { underline = true, update_in_insert = false, - virtual_text = { spacing = 4, prefix = "●" }, + virtual_text = { + spacing = 4, + source = "if_many", + prefix = "●", + }, severity_sort = true, }, -- Automatically format on save From 01a1b8e80db55963f281cf36674cf1c174e2f50e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 18 Apr 2023 20:00:02 +0200 Subject: [PATCH 128/140] feat(diagnostics): added support for setting prefix = "icons". Check the docs on how to enable --- lua/lazyvim/plugins/lsp/init.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 2f761754..aeb284bb 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -25,6 +25,9 @@ return { 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, }, @@ -83,6 +86,19 @@ return { name = "DiagnosticSign" .. name vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" }) end + + if 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(opts.diagnostics) local servers = opts.servers From 95b86c8d1d05684134a7af24d694ea8fd8046646 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 18 Apr 2023 18:01:24 +0000 Subject: [PATCH 129/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 6002eb8a..7564f95e 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 April 17 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 April 18 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 38ad79d5485c083afdb04b1fb9f9683403a6d7bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ph=C3=BAc=20H=2E=20L=C3=AA=20Kh=E1=BA=AFc?= Date: Tue, 18 Apr 2023 19:23:39 +0100 Subject: [PATCH 130/140] 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 --- lua/lazyvim/plugins/extras/dap/core.lua | 17 +++++++++++++---- lua/lazyvim/plugins/ui.lua | 10 ++++++++-- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/lua/lazyvim/plugins/extras/dap/core.lua b/lua/lazyvim/plugins/extras/dap/core.lua index 35e1b5cd..c8699395 100644 --- a/lua/lazyvim/plugins/extras/dap/core.lua +++ b/lua/lazyvim/plugins/extras/dap/core.lua @@ -8,7 +8,8 @@ return { "rcarriga/nvim-dap-ui", -- stylua: ignore keys = { - { "du", function() require("dapui").toggle({ }) end, desc = "Dap UI" } + { "du", function() require("dapui").toggle({ }) end, desc = "Dap UI" }, + { "de", function() require("dapui").eval() end, desc = "Eval", mode = {"n", "v"} }, }, opts = {}, config = function(_, opts) @@ -69,14 +70,22 @@ return { -- stylua: ignore keys = { - { "db", function() require("dap").toggle_breakpoint() end, desc = "Toggle Breakpoint" }, { "dB", function() require("dap").set_breakpoint(vim.fn.input('Breakpoint condition: ')) end, desc = "Breakpoint Condition" }, + { "db", function() require("dap").toggle_breakpoint() end, desc = "Toggle Breakpoint" }, { "dc", function() require("dap").continue() end, desc = "Continue" }, - { "dO", function() require("dap").step_over() end, desc = "Step Over" }, + { "dC", function() require("dap").run_to_cursor() end, desc = "Run to Cursor" }, + { "dg", function() require("dap").goto_() end, desc = "Go to line (no execute)" }, { "di", function() require("dap").step_into() end, desc = "Step Into" }, + { "dj", function() require("dap").down() end, desc = "Down" }, + { "dk", function() require("dap").up() end, desc = "Up" }, + { "dl", function() require("dap").run_last() end, desc = "Run Last" }, { "do", function() require("dap").step_out() end, desc = "Step Out" }, - { "dw", function() require("dap.ui.widgets").hover() end, desc = "Widgets" }, + { "dO", function() require("dap").step_over() end, desc = "Step Over" }, + { "dp", function() require("dap").pause() end, desc = "Pause" }, { "dr", function() require("dap").repl.open() end, desc = "Repl" }, + { "ds", function() require("dap").session() end, desc = "Session" }, + { "dt", function() require("dap").terminate() end, desc = "Terminate" }, + { "dw", function() require("dap.ui.widgets").hover() end, desc = "Widgets" }, }, config = function() diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 1139dc5d..8d7bd4b7 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -122,17 +122,23 @@ return { }, }, lualine_x = { + -- stylua: ignore + { + function() return " " .. require("dap").status() end, + cond = function () return package.loaded["dap"] and require("dap").status() ~= "" end, + color = fg("Debug"), + }, -- stylua: ignore { 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 = 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 = fg("Constant"), }, { require("lazy.status").updates, cond = require("lazy.status").has_updates, color = fg("Special") }, { From ef21bea975df97694f7491dcd199d9d116227235 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 18 Apr 2023 20:30:46 +0200 Subject: [PATCH 131/140] chore(main): release 2.4.0 (#614) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d334766..c5caf88d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [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) From 17fe32e428bbade6f91770814e8748425bfc01a2 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 19 Apr 2023 07:21:44 +0200 Subject: [PATCH 132/140] fix(lsp): properly check that diagnostics virtual_text is a table. Fixes #618 --- lua/lazyvim/plugins/lsp/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index aeb284bb..29efddb8 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -87,7 +87,7 @@ return { vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" }) end - if opts.diagnostics.virtual_text.prefix == "icons" then + 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 From ae8c371ff486d8b65d3bed0786328c20817557e3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 19 Apr 2023 05:22:38 +0000 Subject: [PATCH 133/140] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 7564f95e..e96a3e1f 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 April 18 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 April 19 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 3518c1d73b20bc2db35035b60d415a4f861677a2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 19 Apr 2023 07:23:42 +0200 Subject: [PATCH 134/140] chore(main): release 2.4.1 (#622) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5caf88d..bde0020d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [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) From 1caa27ba4acb04ebbc64a91de242574790dcf92f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 19 Apr 2023 07:49:26 +0200 Subject: [PATCH 135/140] fix(diagnostics): deepcopy diagnostic params. Fixes #621 --- lua/lazyvim/plugins/lsp/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 29efddb8..ba6c4ea6 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -99,7 +99,7 @@ return { end end - vim.diagnostic.config(opts.diagnostics) + 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()) From 0b8c799a7a20624b8d607190fa33e70adacb0b03 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 19 Apr 2023 07:52:26 +0200 Subject: [PATCH 136/140] chore(main): release 2.4.2 (#623) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bde0020d..e9787604 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [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) From 1d2c97cbda099c76ee132ee5019a3f80fd88f8ed Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 19 Apr 2023 16:44:57 +0200 Subject: [PATCH 137/140] fix(treesitter): de-duplicate langs in endure_installed. Fixes #628 --- lua/lazyvim/plugins/treesitter.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 8aaea6ee..d1eeb191 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -67,6 +67,17 @@ return { }, ---@param opts TSConfig config = function(_, opts) + if type(opts.ensure_installed) == "table" then + ---@type table + 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, }, From 55cc8b67fcf18d76aeb1ac9f74328ac1c34cc357 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 19 Apr 2023 17:07:32 +0200 Subject: [PATCH 138/140] chore(main): release 2.4.3 (#630) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9787604..da87fd55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [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) From ac1051686bcff8377f1d99228bcbe64530ec384a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 19 Apr 2023 19:58:05 +0200 Subject: [PATCH 139/140] feat(lsp): added support for setting global lsp client capabilities --- lua/lazyvim/plugins/lsp/init.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index ba6c4ea6..42176c59 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -31,6 +31,8 @@ return { }, severity_sort = true, }, + -- add any global capabilities here + capabilities = {}, -- Automatically format on save autoformat = true, -- options for vim.lsp.buf.format @@ -102,7 +104,13 @@ return { 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", { From 342fa02370538fcb856ce2f77d46392dbbfdaa46 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 19 Apr 2023 20:04:23 +0200 Subject: [PATCH 140/140] chore(main): release 2.5.0 (#635) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index da87fd55..2519346e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [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)