From dbec83d57a1d5936ac860c37e0393a89b7cae7e9 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 6 Jun 2024 18:05:09 +0200 Subject: [PATCH 01/51] feat(neo-tree): added l:open and h:close_node to neo-tree. Closes #3293 --- lua/lazyvim/plugins/editor.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index b434ded1..3dc5159b 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -72,6 +72,8 @@ return { }, window = { mappings = { + ["l"] = "open", + ["h"] = "close_node", [""] = "none", ["Y"] = { function(state) From 2a5ab3109a7e5f3ef98c2a93f24738797c6d9cc6 Mon Sep 17 00:00:00 2001 From: Dusty Phillips <86920+dusty-phillips@users.noreply.github.com> Date: Thu, 6 Jun 2024 13:54:02 -0300 Subject: [PATCH 02/51] feat(docs): add link to LazyVim For Ambitious Developers to README (#3504) As requested, here's a link to my book from the README. I'll add the video and this link to the main page of lazyvim.org as well. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index ba763770..67684a03 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,10 @@ There's a great video created by [@elijahmanor](https://github.com/elijahmanor) [![Watch the video](https://img.youtube.com/vi/N93cTbtLCIM/hqdefault.jpg)](https://www.youtube.com/watch?v=N93cTbtLCIM) +[@dusty-phillips](https://github.com/dusty-phillips) is working on a book called +[LazyVim for Ambitious Developers](https://lazyvim-ambitious-devs.phillips.codes) +available for free online. + ## 📂 File Structure The files under config will be automatically loaded at the appropriate time, From 1699091d70959489409acdf1a135ac3b70dcb105 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 6 Jun 2024 16:54:37 +0000 Subject: [PATCH 03/51] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index dc2d3f72..d79c066f 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -102,6 +102,10 @@ There’s a great video created by @elijahmanor +@dusty-phillips is working on a book called +LazyVim for Ambitious Developers + available for free online. + FILE STRUCTURE *LazyVim-file-structure* @@ -125,6 +129,7 @@ Refer to the docs 2. *image*: https://user-images.githubusercontent.com/292349/213447056-92290767-ea16-430c-8727-ce994c93e9cc.png 3. *@elijahmanor*: 4. *Watch the video*: https://img.youtube.com/vi/N93cTbtLCIM/hqdefault.jpg +5. *@dusty-phillips*: Generated by panvimdoc From 92106484ed89efb364568fa27a689bd8be83d066 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Thu, 6 Jun 2024 21:52:40 +0300 Subject: [PATCH 04/51] fix(mini.files): fix error about `opts.mappings` (#3507) --- .../plugins/extras/editor/mini-files.lua | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/mini-files.lua b/lua/lazyvim/plugins/extras/editor/mini-files.lua index 8f0a4954..2261567d 100644 --- a/lua/lazyvim/plugins/extras/editor/mini-files.lua +++ b/lua/lazyvim/plugins/extras/editor/mini-files.lua @@ -1,6 +1,14 @@ return { "echasnovski/mini.files", opts = { + mappings = { + toggle_hidden = "g.", + change_cwd = "gc", + go_in_horizontal = "s", + go_in_vertical = "v", + go_in_horizontal_plus = "S", + go_in_vertical_plus = "V", + }, windows = { preview = true, width_focus = 30, @@ -82,22 +90,17 @@ return { vim.keymap.set( "n", - opts.mappings.toggle_hidden or "g.", + opts.mappings.toggle_hidden, toggle_dotfiles, { buffer = buf_id, desc = "Toggle hidden files" } ) - vim.keymap.set( - "n", - opts.mappings.change_cwd or "gc", - files_set_cwd, - { buffer = args.data.buf_id, desc = "Set cwd" } - ) + vim.keymap.set("n", opts.mappings.change_cwd, files_set_cwd, { buffer = args.data.buf_id, desc = "Set cwd" }) - map_split(buf_id, opts.mappings.go_in_horizontal or "s", "horizontal", false) - map_split(buf_id, opts.mappings.go_in_vertical or "v", "vertical", false) - map_split(buf_id, opts.mappings.go_in_horizontal_plus or "S", "horizontal", true) - map_split(buf_id, opts.mappings.go_in_vertical_plus or "V", "vertical", true) + map_split(buf_id, opts.mappings.go_in_horizontal, "horizontal", false) + map_split(buf_id, opts.mappings.go_in_vertical, "vertical", false) + map_split(buf_id, opts.mappings.go_in_horizontal_plus, "horizontal", true) + map_split(buf_id, opts.mappings.go_in_vertical_plus, "vertical", true) end, }) From 276b8032bedb6e1601ae85ecdfaee63217843b4f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 6 Jun 2024 22:37:47 +0200 Subject: [PATCH 05/51] feat(options): when available use treesitter spell regions for spell checking --- lua/lazyvim/config/options.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/config/options.lua b/lua/lazyvim/config/options.lua index cdf5289d..b82a763a 100644 --- a/lua/lazyvim/config/options.lua +++ b/lua/lazyvim/config/options.lua @@ -82,6 +82,7 @@ opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift t opt.smartcase = true -- Don't ignore case with capitals opt.smartindent = true -- Insert indents automatically opt.spelllang = { "en" } +opt.spelloptions:append("noplainbuffer") opt.splitbelow = true -- Put new windows below current opt.splitkeep = "screen" opt.splitright = true -- Put new windows right of current From 8ca72451298f60e6440ac48293052c5e82bd8ec6 Mon Sep 17 00:00:00 2001 From: Rubin Bhandari Date: Fri, 7 Jun 2024 02:23:24 +0545 Subject: [PATCH 06/51] feat(autocmd): enable spell for typst and text file (#3505) --- lua/lazyvim/config/autocmds.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/config/autocmds.lua b/lua/lazyvim/config/autocmds.lua index b2135870..5b519797 100644 --- a/lua/lazyvim/config/autocmds.lua +++ b/lua/lazyvim/config/autocmds.lua @@ -85,7 +85,7 @@ vim.api.nvim_create_autocmd("FileType", { -- wrap and check for spell in text filetypes vim.api.nvim_create_autocmd("FileType", { group = augroup("wrap_spell"), - pattern = { "gitcommit", "markdown" }, + pattern = { "*.txt", "*.tex", "*.typ", "gitcommit", "markdown" }, callback = function() vim.opt_local.wrap = true vim.opt_local.spell = true From 59495c18714d8ae4c0b5f7a41dad96e39f9eb189 Mon Sep 17 00:00:00 2001 From: Igor Guerrero Date: Thu, 6 Jun 2024 15:27:59 -0600 Subject: [PATCH 07/51] feat(sql): add SQL extra (#1740) Co-authored-by: Fredrik Averpil Co-authored-by: Folke Lemaitre --- lua/lazyvim/config/autocmds.lua | 1 + lua/lazyvim/plugins/extras/lang/sql.lua | 130 ++++++++++++++++++++++++ 2 files changed, 131 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/lang/sql.lua diff --git a/lua/lazyvim/config/autocmds.lua b/lua/lazyvim/config/autocmds.lua index 5b519797..2fc283ba 100644 --- a/lua/lazyvim/config/autocmds.lua +++ b/lua/lazyvim/config/autocmds.lua @@ -66,6 +66,7 @@ vim.api.nvim_create_autocmd("FileType", { "checkhealth", "neotest-summary", "neotest-output-panel", + "dbout", }, callback = function(event) vim.bo[event.buf].buflisted = false diff --git a/lua/lazyvim/plugins/extras/lang/sql.lua b/lua/lazyvim/plugins/extras/lang/sql.lua new file mode 100644 index 00000000..6e43c0ef --- /dev/null +++ b/lua/lazyvim/plugins/extras/lang/sql.lua @@ -0,0 +1,130 @@ +local sql_ft = { "sql", "mysql", "plsql" } + +return { + recommended = function() + return LazyVim.extras.wants({ + ft = sql_ft, + }) + end, + + { + "tpope/vim-dadbod", + cmd = "DB", + }, + + { + "kristijanhusak/vim-dadbod-completion", + dependencies = "vim-dadbod", + ft = sql_ft, + init = function() + vim.api.nvim_create_autocmd("FileType", { + pattern = sql_ft, + callback = function() + local cmp = require("cmp") + + -- global sources + ---@param source cmp.SourceConfig + local sources = vim.tbl_map(function(source) + return { name = source.name } + end, cmp.get_config().sources) + + -- add vim-dadbod-completion source + table.insert(sources, { name = "vim-dadbod-completion" }) + + -- update sources for the current buffer + cmp.setup.buffer({ sources = sources }) + end, + }) + end, + }, + + { + "kristijanhusak/vim-dadbod-ui", + cmd = { "DBUI", "DBUIToggle", "DBUIAddConnection", "DBUIFindBuffer" }, + dependencies = "vim-dadbod", + keys = { + { "D", "DBUIToggle", desc = "Toggle DBUI" }, + }, + init = function() + local data_path = vim.fn.stdpath("data") + + vim.g.db_ui_auto_execute_table_helpers = 1 + vim.g.db_ui_save_location = data_path .. "/dadbod_ui" + vim.g.db_ui_show_database_icon = true + vim.g.db_ui_tmp_query_location = data_path .. "/dadbod_ui/tmp" + vim.g.db_ui_use_nerd_fonts = true + vim.g.db_ui_use_nvim_notify = true + + -- NOTE: The default behavior of auto-execution of queries on save is disabled + -- this is useful when you have a big query that you don't want to run every time + -- you save the file running those queries can crash neovim to run use the + -- default keymap: S + vim.g.db_ui_execute_on_save = false + end, + }, + + -- Treesitter + { + "nvim-treesitter/nvim-treesitter", + optional = true, + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "sql" }) + end + end, + }, + + -- Edgy integration + { + "folke/edgy.nvim", + optional = true, + opts = function(_, opts) + table.insert(opts.right, { + title = "Database", + ft = "dbui", + pinned = true, + width = 0.3, + open = function() + vim.cmd("DBUI") + end, + }) + + table.insert(opts.bottom, { + title = "DB Query Result", + ft = "dbout", + }) + end, + }, + + -- Linters & formatters + { + "williamboman/mason.nvim", + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "sqlfluff" }) + end, + }, + { + "mfussenegger/nvim-lint", + optional = true, + opts = function(_, opts) + for _, ft in ipairs(sql_ft) do + opts.linters_by_ft[ft] = opts.linters_by_ft[ft] or {} + table.insert(opts.linters_by_ft[ft], "sqlfluff") + end + end, + }, + { + "stevearc/conform.nvim", + optional = true, + opts = function(_, opts) + opts.formatters.sqlfluff = { + args = { "format", "--dialect=ansi", "-" }, + } + for _, ft in ipairs(sql_ft) do + opts.formatters_by_ft[ft] = opts.formatters_by_ft[ft] or {} + table.insert(opts.formatters_by_ft[ft], "sqlfluff") + end + end, + }, +} From f70d350085dc0972e35300c6116ea1f13f5dc8cc Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 7 Jun 2024 06:16:32 +0200 Subject: [PATCH 08/51] style: comment --- lua/lazyvim/plugins/coding.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/lazyvim/plugins/coding.lua b/lua/lazyvim/plugins/coding.lua index 0e903ba0..cf563f4a 100644 --- a/lua/lazyvim/plugins/coding.lua +++ b/lua/lazyvim/plugins/coding.lua @@ -19,7 +19,6 @@ return { -- auto_brackets = { "python" } -- } -- ``` - opts = function() vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true }) local cmp = require("cmp") From ab41ff551b89fde27a0225bc1aa7245bcaec472e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 7 Jun 2024 09:03:59 +0200 Subject: [PATCH 09/51] refactor: use lazy's new `opts_extend` functionality for treesitter and mason --- lua/lazyvim/plugins/extras/lang/ansible.lua | 6 +---- lua/lazyvim/plugins/extras/lang/astro.lua | 6 +---- lua/lazyvim/plugins/extras/lang/clangd.lua | 12 ++-------- lua/lazyvim/plugins/extras/lang/cmake.lua | 11 ++------- lua/lazyvim/plugins/extras/lang/docker.lua | 11 ++------- lua/lazyvim/plugins/extras/lang/elixir.lua | 8 +------ lua/lazyvim/plugins/extras/lang/elm.lua | 11 ++------- lua/lazyvim/plugins/extras/lang/git.lua | 10 ++------ lua/lazyvim/plugins/extras/lang/gleam.lua | 6 +---- lua/lazyvim/plugins/extras/lang/go.lua | 24 ++++--------------- lua/lazyvim/plugins/extras/lang/haskell.lua | 16 +++---------- lua/lazyvim/plugins/extras/lang/helm.lua | 6 ++++- lua/lazyvim/plugins/extras/lang/java.lua | 10 ++------ lua/lazyvim/plugins/extras/lang/json.lua | 6 +---- lua/lazyvim/plugins/extras/lang/kotlin.lua | 8 ++----- lua/lazyvim/plugins/extras/lang/markdown.lua | 5 +--- lua/lazyvim/plugins/extras/lang/nix.lua | 5 +--- lua/lazyvim/plugins/extras/lang/omnisharp.lua | 12 ++-------- lua/lazyvim/plugins/extras/lang/php.lua | 10 ++------ lua/lazyvim/plugins/extras/lang/python.lua | 6 +---- lua/lazyvim/plugins/extras/lang/r.lua | 6 +---- lua/lazyvim/plugins/extras/lang/ruby.lua | 6 +---- lua/lazyvim/plugins/extras/lang/rust.lua | 10 ++------ lua/lazyvim/plugins/extras/lang/scala.lua | 6 +---- lua/lazyvim/plugins/extras/lang/sql.lua | 11 ++------- lua/lazyvim/plugins/extras/lang/svelte.lua | 6 +---- lua/lazyvim/plugins/extras/lang/terraform.lua | 14 ++--------- lua/lazyvim/plugins/extras/lang/thrift.lua | 6 +---- lua/lazyvim/plugins/extras/lang/vue.lua | 6 +---- lua/lazyvim/plugins/extras/util/dot.lua | 5 +--- lua/lazyvim/plugins/extras/util/gitui.lua | 5 +--- lua/lazyvim/plugins/lsp/init.lua | 2 +- lua/lazyvim/plugins/treesitter.lua | 1 + 33 files changed, 54 insertions(+), 219 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/ansible.lua b/lua/lazyvim/plugins/extras/lang/ansible.lua index 0a3987a6..29d1711a 100644 --- a/lua/lazyvim/plugins/extras/lang/ansible.lua +++ b/lua/lazyvim/plugins/extras/lang/ansible.lua @@ -7,11 +7,7 @@ return { end, { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - -- for ansiblels validation - vim.list_extend(opts.ensure_installed, { "ansible-lint" }) - end, + opts = { ensure_installed = { "ansible-lint" } }, }, { "neovim/nvim-lspconfig", diff --git a/lua/lazyvim/plugins/extras/lang/astro.lua b/lua/lazyvim/plugins/extras/lang/astro.lua index c0e8cfc0..b0bd2616 100644 --- a/lua/lazyvim/plugins/extras/lang/astro.lua +++ b/lua/lazyvim/plugins/extras/lang/astro.lua @@ -15,11 +15,7 @@ return { { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "astro" }) - end - end, + opts = { ensure_installed = { "astro" } }, }, -- LSP Servers diff --git a/lua/lazyvim/plugins/extras/lang/clangd.lua b/lua/lazyvim/plugins/extras/lang/clangd.lua index f9fb1f13..dccbc9cb 100644 --- a/lua/lazyvim/plugins/extras/lang/clangd.lua +++ b/lua/lazyvim/plugins/extras/lang/clangd.lua @@ -16,11 +16,7 @@ return { -- Add C/C++ to treesitter { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "cpp" }) - end - end, + opts = { ensure_installed = { "cpp" } }, }, { @@ -120,11 +116,7 @@ return { -- Ensure C/C++ debugger is installed "williamboman/mason.nvim", optional = true, - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "codelldb" }) - end - end, + opts = { ensure_installed = { "codelldb" } }, }, opts = function() local dap = require("dap") diff --git a/lua/lazyvim/plugins/extras/lang/cmake.lua b/lua/lazyvim/plugins/extras/lang/cmake.lua index a5bc804c..72cd0b1c 100644 --- a/lua/lazyvim/plugins/extras/lang/cmake.lua +++ b/lua/lazyvim/plugins/extras/lang/cmake.lua @@ -7,11 +7,7 @@ return { end, { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "cmake" }) - end - end, + opts = { ensure_installed = { "cmake" } }, }, { "nvimtools/none-ls.nvim", @@ -34,10 +30,7 @@ return { }, { "mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "cmakelang", "cmakelint" }) - end, + opts = { ensure_installed = { "cmakelang", "cmakelint" } }, }, { "neovim/nvim-lspconfig", diff --git a/lua/lazyvim/plugins/extras/lang/docker.lua b/lua/lazyvim/plugins/extras/lang/docker.lua index 98a9be44..ea26b013 100644 --- a/lua/lazyvim/plugins/extras/lang/docker.lua +++ b/lua/lazyvim/plugins/extras/lang/docker.lua @@ -7,18 +7,11 @@ return { end, { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "dockerfile" }) - end - end, + opts = { ensure_installed = { "dockerfile" } }, }, { "mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "hadolint" }) - end, + opts = { ensure_installed = { "hadolint" } }, }, { "nvimtools/none-ls.nvim", diff --git a/lua/lazyvim/plugins/extras/lang/elixir.lua b/lua/lazyvim/plugins/extras/lang/elixir.lua index 503dbbed..a9956570 100644 --- a/lua/lazyvim/plugins/extras/lang/elixir.lua +++ b/lua/lazyvim/plugins/extras/lang/elixir.lua @@ -7,13 +7,7 @@ return { end, { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - vim.list_extend(opts.ensure_installed, { - "elixir", - "heex", - "eex", - }) - end, + opts = { ensure_installed = { "elixir", "heex", "eex" } }, }, { "nvim-neotest/neotest", diff --git a/lua/lazyvim/plugins/extras/lang/elm.lua b/lua/lazyvim/plugins/extras/lang/elm.lua index 28c5339f..9e21ab0a 100644 --- a/lua/lazyvim/plugins/extras/lang/elm.lua +++ b/lua/lazyvim/plugins/extras/lang/elm.lua @@ -6,19 +6,12 @@ return { { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "elm" }) - end - end, + opts = { ensure_installed = { "elm" } }, }, { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "elm-format" }) - end, + opts = { ensure_installed = { "elm-format" } }, }, { diff --git a/lua/lazyvim/plugins/extras/lang/git.lua b/lua/lazyvim/plugins/extras/lang/git.lua index 5a839031..0fc92c4d 100644 --- a/lua/lazyvim/plugins/extras/lang/git.lua +++ b/lua/lazyvim/plugins/extras/lang/git.lua @@ -5,19 +5,13 @@ return { -- Treesitter git support { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "git_config", "gitcommit", "git_rebase", "gitignore", "gitattributes" }) - end, + opts = { ensure_installed = { "git_config", "gitcommit", "git_rebase", "gitignore", "gitattributes" } }, }, { "nvim-cmp", dependencies = { - { - "petertriho/cmp-git", - opts = {}, - }, + { "petertriho/cmp-git", opts = {} }, }, ---@module 'cmp' ---@param opts cmp.ConfigSchema diff --git a/lua/lazyvim/plugins/extras/lang/gleam.lua b/lua/lazyvim/plugins/extras/lang/gleam.lua index fe0172cd..956d2882 100644 --- a/lua/lazyvim/plugins/extras/lang/gleam.lua +++ b/lua/lazyvim/plugins/extras/lang/gleam.lua @@ -6,11 +6,7 @@ return { { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "gleam" }) - end - end, + opts = { ensure_installed = { "gleam" } }, }, { diff --git a/lua/lazyvim/plugins/extras/lang/go.lua b/lua/lazyvim/plugins/extras/lang/go.lua index 2ec43e22..5551789e 100644 --- a/lua/lazyvim/plugins/extras/lang/go.lua +++ b/lua/lazyvim/plugins/extras/lang/go.lua @@ -7,14 +7,7 @@ return { end, { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - vim.list_extend(opts.ensure_installed, { - "go", - "gomod", - "gowork", - "gosum", - }) - end, + opts = { ensure_installed = { "go", "gomod", "gowork", "gosum" } }, }, { "neovim/nvim-lspconfig", @@ -90,10 +83,7 @@ return { -- Ensure Go tools are installed { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "goimports", "gofumpt" }) - end, + opts = { ensure_installed = { "goimports", "gofumpt" } }, }, { "nvimtools/none-ls.nvim", @@ -101,10 +91,7 @@ return { dependencies = { { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "gomodifytags", "impl" }) - end, + opts = { ensure_installed = { "gomodifytags", "impl" } }, }, }, opts = function(_, opts) @@ -132,10 +119,7 @@ return { dependencies = { { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "delve" }) - end, + opts = { ensure_installed = { "delve" } }, }, { "leoluz/nvim-dap-go", diff --git a/lua/lazyvim/plugins/extras/lang/haskell.lua b/lua/lazyvim/plugins/extras/lang/haskell.lua index 5ec5a5ec..77b0413a 100644 --- a/lua/lazyvim/plugins/extras/lang/haskell.lua +++ b/lua/lazyvim/plugins/extras/lang/haskell.lua @@ -9,11 +9,7 @@ return { -- Add Haskell to treesitter { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "haskell" }) - end - end, + opts = { ensure_installed = { "haskell" } }, }, { @@ -33,10 +29,7 @@ return { { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "haskell-language-server" }) - end, + opts = { ensure_installed = { "haskell-language-server" } }, }, { @@ -45,10 +38,7 @@ return { dependencies = { { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "haskell-debug-adapter" }) - end, + opts = { ensure_installed = { "haskell-debug-adapter" } }, }, }, }, diff --git a/lua/lazyvim/plugins/extras/lang/helm.lua b/lua/lazyvim/plugins/extras/lang/helm.lua index 566e7975..4145b790 100644 --- a/lua/lazyvim/plugins/extras/lang/helm.lua +++ b/lua/lazyvim/plugins/extras/lang/helm.lua @@ -16,7 +16,11 @@ return { }) end, - { "towolf/vim-helm", ft = "helm" }, + { + "nvim-treesitter/nvim-treesitter", + opts = { ensure_installed = { "helm" } }, + }, + { "neovim/nvim-lspconfig", opts = { diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index a1b49716..86be762a 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -33,10 +33,7 @@ return { -- Add java to treesitter. { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "java" }) - end, + opts = { ensure_installed = { "java" } }, }, -- Ensure java debugger and test packages are installed. @@ -46,10 +43,7 @@ return { dependencies = { { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "java-test", "java-debug-adapter" }) - end, + opts = { ensure_installed = { "java-debug-adapter", "java-test" } }, }, }, }, diff --git a/lua/lazyvim/plugins/extras/lang/json.lua b/lua/lazyvim/plugins/extras/lang/json.lua index 688432ec..d51a6b19 100644 --- a/lua/lazyvim/plugins/extras/lang/json.lua +++ b/lua/lazyvim/plugins/extras/lang/json.lua @@ -9,11 +9,7 @@ return { -- add json to treesitter { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "json5" }) - end - end, + opts = { ensure_installed = { "json5" } }, }, -- yaml schema support diff --git a/lua/lazyvim/plugins/extras/lang/kotlin.lua b/lua/lazyvim/plugins/extras/lang/kotlin.lua index 087f3620..a15f3cc4 100644 --- a/lua/lazyvim/plugins/extras/lang/kotlin.lua +++ b/lua/lazyvim/plugins/extras/lang/kotlin.lua @@ -15,16 +15,12 @@ return { -- Add packages(linting, debug adapter) { "williamboman/mason.nvim", - opts = function(_, opts) - vim.list_extend(opts.ensure_installed or {}, { "ktlint" }) - end, + opts = { ensure_installed = { "ktlint" } }, }, -- Add syntax highlighting { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - vim.list_extend(opts.ensure_installed or {}, { "kotlin" }) - end, + opts = { ensure_installed = { "kotlin" } }, }, -- Add language server { diff --git a/lua/lazyvim/plugins/extras/lang/markdown.lua b/lua/lazyvim/plugins/extras/lang/markdown.lua index 6d5ff4d3..0b1c08a8 100644 --- a/lua/lazyvim/plugins/extras/lang/markdown.lua +++ b/lua/lazyvim/plugins/extras/lang/markdown.lua @@ -17,10 +17,7 @@ return { }, { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "markdownlint", "markdown-toc" }) - end, + opts = { ensure_installed = { "markdownlint", "markdown-toc" } }, }, { "nvimtools/none-ls.nvim", diff --git a/lua/lazyvim/plugins/extras/lang/nix.lua b/lua/lazyvim/plugins/extras/lang/nix.lua index b349bb2c..76a42ebe 100644 --- a/lua/lazyvim/plugins/extras/lang/nix.lua +++ b/lua/lazyvim/plugins/extras/lang/nix.lua @@ -5,10 +5,7 @@ return { }, { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "nix" }) - end, + opts = { ensure_installed = { "nix" } }, }, { "neovim/nvim-lspconfig", diff --git a/lua/lazyvim/plugins/extras/lang/omnisharp.lua b/lua/lazyvim/plugins/extras/lang/omnisharp.lua index 74fd2bd2..fa0dac48 100644 --- a/lua/lazyvim/plugins/extras/lang/omnisharp.lua +++ b/lua/lazyvim/plugins/extras/lang/omnisharp.lua @@ -9,11 +9,7 @@ return { { "Hoffs/omnisharp-extended-lsp.nvim", lazy = true }, { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "c_sharp" }) - end - end, + opts = { ensure_installed = { "c_sharp" } }, }, { "nvimtools/none-ls.nvim", @@ -41,11 +37,7 @@ return { }, { "williamboman/mason.nvim", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "netcoredbg", "csharpier" }) - end - end, + opts = { ensure_installed = { "csharpier", "netcoredbg" } }, }, { "neovim/nvim-lspconfig", diff --git a/lua/lazyvim/plugins/extras/lang/php.lua b/lua/lazyvim/plugins/extras/lang/php.lua index 31ee7026..334091bb 100644 --- a/lua/lazyvim/plugins/extras/lang/php.lua +++ b/lua/lazyvim/plugins/extras/lang/php.lua @@ -6,9 +6,7 @@ return { { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - vim.list_extend(opts.ensure_installed, { "php" }) - end, + opts = { ensure_installed = { "php" } }, }, { @@ -25,11 +23,7 @@ return { optional = true, dependencies = { "williamboman/mason.nvim", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - table.insert(opts.ensure_installed, "php-debug-adapter") - end - end, + opts = { ensure_installed = { "php-debug-adapter" } }, }, opts = function() local dap = require("dap") diff --git a/lua/lazyvim/plugins/extras/lang/python.lua b/lua/lazyvim/plugins/extras/lang/python.lua index 811bd27f..1d2bb206 100644 --- a/lua/lazyvim/plugins/extras/lang/python.lua +++ b/lua/lazyvim/plugins/extras/lang/python.lua @@ -24,11 +24,7 @@ return { end, { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "ninja", "rst" }) - end - end, + opts = { ensure_installed = { "ninja", "rst" } }, }, { "neovim/nvim-lspconfig", diff --git a/lua/lazyvim/plugins/extras/lang/r.lua b/lua/lazyvim/plugins/extras/lang/r.lua index b8279e8a..e3dd3302 100644 --- a/lua/lazyvim/plugins/extras/lang/r.lua +++ b/lua/lazyvim/plugins/extras/lang/r.lua @@ -59,11 +59,7 @@ return { }, { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "r", "rnoweb" }) - end - end, + opts = { ensure_installed = { "r", "rnoweb" } }, }, { "neovim/nvim-lspconfig", diff --git a/lua/lazyvim/plugins/extras/lang/ruby.lua b/lua/lazyvim/plugins/extras/lang/ruby.lua index c9686432..c70e645d 100644 --- a/lua/lazyvim/plugins/extras/lang/ruby.lua +++ b/lua/lazyvim/plugins/extras/lang/ruby.lua @@ -7,11 +7,7 @@ return { end, { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - vim.list_extend(opts.ensure_installed, { - "ruby", - }) - end, + opts = { ensure_installed = { "ruby" } }, }, { "neovim/nvim-lspconfig", diff --git a/lua/lazyvim/plugins/extras/lang/rust.lua b/lua/lazyvim/plugins/extras/lang/rust.lua index e53e881e..e5a9acd2 100644 --- a/lua/lazyvim/plugins/extras/lang/rust.lua +++ b/lua/lazyvim/plugins/extras/lang/rust.lua @@ -30,20 +30,14 @@ return { -- Add Rust & related to treesitter { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "ron", "rust" }) - end, + opts = { ensure_installed = { "rust", "ron" } }, }, -- Ensure Rust debugger is installed { "williamboman/mason.nvim", optional = true, - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "codelldb" }) - end, + opts = { ensure_installed = { "codelldb" } }, }, { diff --git a/lua/lazyvim/plugins/extras/lang/scala.lua b/lua/lazyvim/plugins/extras/lang/scala.lua index 2092b15c..3b159697 100644 --- a/lua/lazyvim/plugins/extras/lang/scala.lua +++ b/lua/lazyvim/plugins/extras/lang/scala.lua @@ -7,11 +7,7 @@ return { end, { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "scala" }) - end - end, + opts = { ensure_installed = { "scala" } }, }, { "scalameta/nvim-metals", diff --git a/lua/lazyvim/plugins/extras/lang/sql.lua b/lua/lazyvim/plugins/extras/lang/sql.lua index 6e43c0ef..4f185ab1 100644 --- a/lua/lazyvim/plugins/extras/lang/sql.lua +++ b/lua/lazyvim/plugins/extras/lang/sql.lua @@ -67,11 +67,7 @@ return { { "nvim-treesitter/nvim-treesitter", optional = true, - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "sql" }) - end - end, + opts = { ensure_installed = { "sql" } }, }, -- Edgy integration @@ -99,10 +95,7 @@ return { -- Linters & formatters { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "sqlfluff" }) - end, + opts = { ensure_installed = { "sqlfluff" } }, }, { "mfussenegger/nvim-lint", diff --git a/lua/lazyvim/plugins/extras/lang/svelte.lua b/lua/lazyvim/plugins/extras/lang/svelte.lua index e7954137..2d711ab6 100644 --- a/lua/lazyvim/plugins/extras/lang/svelte.lua +++ b/lua/lazyvim/plugins/extras/lang/svelte.lua @@ -15,11 +15,7 @@ return { { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "svelte" }) - end - end, + opts = { ensure_installed = { "svelte" } }, }, -- LSP Servers diff --git a/lua/lazyvim/plugins/extras/lang/terraform.lua b/lua/lazyvim/plugins/extras/lang/terraform.lua index e75a0eca..33c7c61c 100644 --- a/lua/lazyvim/plugins/extras/lang/terraform.lua +++ b/lua/lazyvim/plugins/extras/lang/terraform.lua @@ -8,14 +8,7 @@ return { { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { - "terraform", - "hcl", - }) - end - end, + opts = { ensure_installed = { "terraform", "hcl" } }, }, { "neovim/nvim-lspconfig", @@ -28,10 +21,7 @@ return { -- ensure terraform tools are installed { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "tflint" }) - end, + opts = { ensure_installed = { "tflint" } }, }, { "nvimtools/none-ls.nvim", diff --git a/lua/lazyvim/plugins/extras/lang/thrift.lua b/lua/lazyvim/plugins/extras/lang/thrift.lua index d651f25a..9cb6d973 100644 --- a/lua/lazyvim/plugins/extras/lang/thrift.lua +++ b/lua/lazyvim/plugins/extras/lang/thrift.lua @@ -5,11 +5,7 @@ return { }, { "nvim-treesitter", - optional = true, - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "thrift" }) - end, + opts = { ensure_installed = { "thrift" } }, }, { "nvim-lspconfig", diff --git a/lua/lazyvim/plugins/extras/lang/vue.lua b/lua/lazyvim/plugins/extras/lang/vue.lua index 6c47d56e..45f1a9f7 100644 --- a/lua/lazyvim/plugins/extras/lang/vue.lua +++ b/lua/lazyvim/plugins/extras/lang/vue.lua @@ -11,11 +11,7 @@ return { { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "vue" }) - end - end, + opts = { ensure_installed = { "vue" } }, }, -- Add LSP servers diff --git a/lua/lazyvim/plugins/extras/util/dot.lua b/lua/lazyvim/plugins/extras/util/dot.lua index 8066d363..ba2f627d 100644 --- a/lua/lazyvim/plugins/extras/util/dot.lua +++ b/lua/lazyvim/plugins/extras/util/dot.lua @@ -19,10 +19,7 @@ return { }, { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "shellcheck" }) - end, + opts = { ensure_installed = { "shellcheck" } }, }, -- add some stuff to treesitter { diff --git a/lua/lazyvim/plugins/extras/util/gitui.lua b/lua/lazyvim/plugins/extras/util/gitui.lua index 2a7a4fa6..b5033235 100644 --- a/lua/lazyvim/plugins/extras/util/gitui.lua +++ b/lua/lazyvim/plugins/extras/util/gitui.lua @@ -3,6 +3,7 @@ return { -- Ensure GitUI tool is installed { "williamboman/mason.nvim", + opts = { ensure_installed = { "gitui" } }, keys = { { "gG", @@ -30,9 +31,5 @@ return { end, }) end, - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "gitui" }) - end, }, } diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 5066d393..371315ef 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -261,11 +261,11 @@ return { cmd = "Mason", keys = { { "cm", "Mason", desc = "Mason" } }, build = ":MasonUpdate", + opts_extend = { "ensure_installed" }, opts = { ensure_installed = { "stylua", "shfmt", - -- "flake8", }, }, ---@param opts MasonSettings | {ensure_installed: string[]} diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 60be5ed9..2c4ee5b2 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -22,6 +22,7 @@ return { { "", desc = "Increment Selection" }, { "", desc = "Decrement Selection", mode = "x" }, }, + opts_extend = { "ensure_installed" }, ---@type TSConfig ---@diagnostic disable-next-line: missing-fields opts = { From e1c54ac638bf63b12586926c5b3a550a29a71d94 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Jun 2024 07:04:47 +0000 Subject: [PATCH 10/51] 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 d79c066f..309ad8fc 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 June 06 +*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 June 07 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 119dcb949a84d9b10a620c9ad8400c220c5e5adb Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 7 Jun 2024 10:53:53 +0200 Subject: [PATCH 11/51] fix: removed leader-m, since it is leading to too many issues. Still available at leader-wm --- lua/lazyvim/config/keymaps.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index b1db0b44..48ae24f8 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -182,7 +182,6 @@ map("n", "w|", "v", { desc = "Split Window Right", remap = true }) map("n", "-", "s", { desc = "Split Window Below", remap = true }) map("n", "|", "v", { desc = "Split Window Right", remap = true }) map("n", "wm", function() LazyVim.toggle.maximize() end, { desc = "Maximize Toggle" }) -map("n", "m", function() LazyVim.toggle.maximize() end, { desc = "Maximize Toggle" }) -- tabs map("n", "l", "tablast", { desc = "Last Tab" }) From 827aa5380a883e6a2a9904c253627489d43d3050 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Fri, 7 Jun 2024 13:12:05 +0300 Subject: [PATCH 12/51] fix(lualine): only show one Lualine component for symbols (#3514) Fixes #3511 --- lua/lazyvim/plugins/extras/editor/aerial.lua | 36 +++++++++++--------- lua/lazyvim/plugins/extras/editor/navic.lua | 18 +++++----- 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/aerial.lua b/lua/lazyvim/plugins/extras/editor/aerial.lua index afa2a602..ad527aae 100644 --- a/lua/lazyvim/plugins/extras/editor/aerial.lua +++ b/lua/lazyvim/plugins/extras/editor/aerial.lua @@ -104,27 +104,29 @@ return { "nvim-lualine/lualine.nvim", optional = true, opts = function(_, opts) - table.insert(opts.sections.lualine_c, { - "aerial", - sep = " ", -- separator between symbols - sep_icon = "", -- separator between icon and symbol + if not vim.g.trouble_lualine then + table.insert(opts.sections.lualine_c, { + "aerial", + sep = " ", -- separator between symbols + sep_icon = "", -- separator between icon and symbol - -- The number of symbols to render top-down. In order to render only 'N' last - -- symbols, negative numbers may be supplied. For instance, 'depth = -1' can - -- be used in order to render only current symbol. - depth = 5, + -- The number of symbols to render top-down. In order to render only 'N' last + -- symbols, negative numbers may be supplied. For instance, 'depth = -1' can + -- be used in order to render only current symbol. + depth = 5, - -- When 'dense' mode is on, icons are not rendered near their symbols. Only - -- a single icon that represents the kind of current symbol is rendered at - -- the beginning of status line. - dense = false, + -- When 'dense' mode is on, icons are not rendered near their symbols. Only + -- a single icon that represents the kind of current symbol is rendered at + -- the beginning of status line. + dense = false, - -- The separator to be used to separate symbols in dense mode. - dense_sep = ".", + -- The separator to be used to separate symbols in dense mode. + dense_sep = ".", - -- Color the symbol icons. - colored = true, - }) + -- Color the symbol icons. + colored = true, + }) + end end, }, } diff --git a/lua/lazyvim/plugins/extras/editor/navic.lua b/lua/lazyvim/plugins/extras/editor/navic.lua index ad31d575..e89bc11f 100644 --- a/lua/lazyvim/plugins/extras/editor/navic.lua +++ b/lua/lazyvim/plugins/extras/editor/navic.lua @@ -29,14 +29,16 @@ return { "nvim-lualine/lualine.nvim", optional = true, opts = function(_, opts) - table.insert(opts.sections.lualine_c, { - function() - return require("nvim-navic").get_location() - end, - cond = function() - return package.loaded["nvim-navic"] and require("nvim-navic").is_available() - end, - }) + if not vim.g.trouble_lualine then + table.insert(opts.sections.lualine_c, { + function() + return require("nvim-navic").get_location() + end, + cond = function() + return package.loaded["nvim-navic"] and require("nvim-navic").is_available() + end, + }) + end end, }, } From c452fd730c94bfcbb5f9f4af1cae3c851f9456a3 Mon Sep 17 00:00:00 2001 From: Ray Wong Date: Fri, 7 Jun 2024 20:23:04 +0900 Subject: [PATCH 13/51] fix(editor): telescope init error when trouble.nvim is disabled (#3518) I got this error message when opening telescope. ``` Failed to run `config` for telescope.nvim ...l/share/nvim/lazy/LazyVim/lua/lazyvim/plugins/editor.lua:241: module 'trouble.sources.telescope' not found: ^Ino field package.preload['trouble.sources.telescope'] ... ``` After investigating it, the reason was I have `trouble.nvim` disabled but the default base `opts` function is loading it. I tried wrapping it with a function to lazy load the `trouble.nvim` module and it worked in my local setup. --- 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 3dc5159b..8f4891b7 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -240,7 +240,9 @@ return { opts = function() local actions = require("telescope.actions") - local open_with_trouble = require("trouble.sources.telescope").open + local open_with_trouble = function(...) + return require("trouble.sources.telescope").open(...) + end local find_files_no_ignore = function() local action_state = require("telescope.actions.state") local line = action_state.get_current_line() From c1cb4467ec78b309784f948a47883ab11a2eecd9 Mon Sep 17 00:00:00 2001 From: Rubin Bhandari Date: Fri, 7 Jun 2024 17:20:25 +0545 Subject: [PATCH 14/51] style: fix some spells (#3517) --- lua/lazyvim/plugins/extras/util/octo.lua | 4 ++-- tests/extras/lang_spec.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/util/octo.lua b/lua/lazyvim/plugins/extras/util/octo.lua index 317e6850..39c8866e 100644 --- a/lua/lazyvim/plugins/extras/util/octo.lua +++ b/lua/lazyvim/plugins/extras/util/octo.lua @@ -18,8 +18,8 @@ return { picker = "telescope", }, keys = { - { "gi", "Octo issue list", desc = "List Isues (Octo)" }, - { "gI", "Octo issue search", desc = "Search Isues (Octo)" }, + { "gi", "Octo issue list", desc = "List Issues (Octo)" }, + { "gI", "Octo issue search", desc = "Search Issues (Octo)" }, { "gp", "Octo pr list", desc = "List PRs (Octo)" }, { "gP", "Octo pr search", desc = "Search PRs (Octo)" }, { "gr", "Octo repo list", desc = "List Repos (Octo)" }, diff --git a/tests/extras/lang_spec.lua b/tests/extras/lang_spec.lua index 86cd0823..7c81c667 100644 --- a/tests/extras/lang_spec.lua +++ b/tests/extras/lang_spec.lua @@ -83,7 +83,7 @@ describe("Extra", function() local opts = Plugin.values(ts, "opts", false) if not vim.tbl_isempty(opts.ensure_installed) then - it("does not install defaut Treesitter langs", function() + it("does not install default Treesitter langs", function() local invalid = vim.tbl_filter(function(v) return vim.tbl_contains(tsensure, v) end, opts.ensure_installed or {}) From 94c338765cdcb306d5d7f7427101c3a54bf3ce3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Jensen?= <53434466+HeadCookie@users.noreply.github.com> Date: Fri, 7 Jun 2024 16:05:59 +0200 Subject: [PATCH 15/51] style: fix spelling in octo keymap description (#3521) --- lua/lazyvim/plugins/extras/util/octo.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lua/lazyvim/plugins/extras/util/octo.lua b/lua/lazyvim/plugins/extras/util/octo.lua index 39c8866e..fad1ac25 100644 --- a/lua/lazyvim/plugins/extras/util/octo.lua +++ b/lua/lazyvim/plugins/extras/util/octo.lua @@ -25,13 +25,13 @@ return { { "gr", "Octo repo list", desc = "List Repos (Octo)" }, { "gS", "Octo search", desc = "Search (Octo)" }, - { "a", "", desc = "+assignee (Otco)", ft = "octo" }, - { "c", "", desc = "+comment/code (Otco)", ft = "octo" }, - { "l", "", desc = "+label (Otco)", ft = "octo" }, - { "i", "", desc = "+issue (Otco)", ft = "octo" }, - { "r", "", desc = "+react (Otco)", ft = "octo" }, - { "p", "", desc = "+pr (Otco)", ft = "octo" }, - { "v", "", desc = "+review (Otco)", ft = "octo" }, + { "a", "", desc = "+assignee (Octo)", ft = "octo" }, + { "c", "", desc = "+comment/code (Octo)", ft = "octo" }, + { "l", "", desc = "+label (Octo)", ft = "octo" }, + { "i", "", desc = "+issue (Octo)", ft = "octo" }, + { "r", "", desc = "+react (Octo)", ft = "octo" }, + { "p", "", desc = "+pr (Octo)", ft = "octo" }, + { "v", "", desc = "+review (Octo)", ft = "octo" }, { "@", "@", mode = "i", ft = "octo", silent = true }, { "#", "#", mode = "i", ft = "octo", silent = true }, }, From 2ac3f0daa12e7719a9371fc9bfb80b1ac65c2c09 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 7 Jun 2024 16:27:31 +0200 Subject: [PATCH 16/51] ci: Create dependabot.yml --- .github/dependabot.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..0d08e261 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + - package-ecosystem: "github-actions" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" From 913902ba362603a4620f8981fdedac7f53816b3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ant=C3=B3nio=20mora?= Date: Fri, 7 Jun 2024 12:23:23 -0300 Subject: [PATCH 17/51] feat(lang): add clojure support (#2179) This adds support to Clojure as an extra _lang_ configuration. Closes https://github.com/LazyVim/LazyVim/pull/1484 @folke I read the docs and couldn't find a recommendation on _how_ to suggest features, so I figured opening a PR should be enought. please let me know if I should do anything else. --------- Co-authored-by: github-actions[bot] Co-authored-by: Folke Lemaitre --- lua/lazyvim/plugins/extras/lang/clojure.lua | 98 +++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/lang/clojure.lua diff --git a/lua/lazyvim/plugins/extras/lang/clojure.lua b/lua/lazyvim/plugins/extras/lang/clojure.lua new file mode 100644 index 00000000..1740ce52 --- /dev/null +++ b/lua/lazyvim/plugins/extras/lang/clojure.lua @@ -0,0 +1,98 @@ +return { + recommended = function() + return LazyVim.extras.wants({ + ft = { "clojure", "edn" }, + root = { "project.clj", "deps.edn", "build.boot", "shadow-cljs.edn", "bb.edn" }, + }) + end, + + -- Add Clojure & related to treesitter + { + "nvim-treesitter/nvim-treesitter", + opts = { ensure_installed = { "clojure" } }, + }, + + -- Extend auto completion + { + "hrsh7th/nvim-cmp", + optional = true, + dependencies = { + "PaterJason/cmp-conjure", + }, + opts = function(_, opts) + if type(opts.sources) == "table" then + vim.list_extend(opts.sources, { name = "clojure" }) + end + end, + }, + + -- Enable rainbow parenthesis + { "HiPhish/rainbow-delimiters.nvim" }, + + -- Add s-exp mappings + { "PaterJason/nvim-treesitter-sexp" }, + + -- Colorize the output of the log buffer + { + "m00qek/baleia.nvim", + config = function() + vim.g.conjure_baleia = require("baleia").setup({ line_starts_at = 3 }) + + vim.api.nvim_create_user_command("BaleiaColorize", function() + vim.g.conjure_baleia.once(vim.api.nvim_get_current_buf()) + end, { bang = true }) + + vim.api.nvim_create_user_command("BaleiaLogs", vim.g.conjure_baleia.logger.show, { bang = true }) + end, + }, + + -- Use Clojure REPL + { + "Olical/conjure", + config = function(_, _) + require("conjure.main").main() + require("conjure.mapping")["on-filetype"]() + end, + init = function() + -- print color codes if baleia.nvim is available + local colorize = require("lazyvim.util").has("baleia.nvim") + + if colorize then + vim.g["conjure#log#strip_ansi_escape_sequences_line_limit"] = 0 + else + vim.g["conjure#log#strip_ansi_escape_sequences_line_limit"] = 1 + end + + -- disable diagnostics in log buffer and colorize it + vim.api.nvim_create_autocmd({ "BufWinEnter" }, { + pattern = "conjure-log-*", + callback = function() + local buffer = vim.api.nvim_get_current_buf() + vim.diagnostic.enable(false, { bufnr = buffer }) + + if colorize and vim.g.conjure_baleia then + vim.g.conjure_baleia.automatically(buffer) + end + + vim.keymap.set( + { "n", "v" }, + "[c", + "call search('^; -\\+$', 'bw')", + { silent = true, buffer = true, desc = "Jumps to the begining of previous evaluation output." } + ) + vim.keymap.set( + { "n", "v" }, + "]c", + "call search('^; -\\+$', 'w')", + { silent = true, buffer = true, desc = "Jumps to the begining of next evaluation output." } + ) + end, + }) + + -- prefer LSP for jump-to-definition and symbol-doc, and use conjure + -- alternatives with K and gd + vim.g["conjure#mapping#doc_word"] = "K" + vim.g["conjure#mapping#def_word"] = "gd" + end, + }, +} From 789b1b4fd492a906aad33d2d87b6ee068facbc6b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 20:44:39 +0200 Subject: [PATCH 18/51] chore(main): release 12.9.0 (#3501) :robot: I have created a release *beep* *boop* --- ## [12.9.0](https://github.com/LazyVim/LazyVim/compare/v12.8.0...v12.9.0) (2024-06-07) ### Features * **autocmd:** enable spell for typst and text file ([#3505](https://github.com/LazyVim/LazyVim/issues/3505)) ([8ca7245](https://github.com/LazyVim/LazyVim/commit/8ca72451298f60e6440ac48293052c5e82bd8ec6)) * **docs:** add link to LazyVim For Ambitious Developers to README ([#3504](https://github.com/LazyVim/LazyVim/issues/3504)) ([2a5ab31](https://github.com/LazyVim/LazyVim/commit/2a5ab3109a7e5f3ef98c2a93f24738797c6d9cc6)) * **lang:** add clojure support ([#2179](https://github.com/LazyVim/LazyVim/issues/2179)) ([913902b](https://github.com/LazyVim/LazyVim/commit/913902ba362603a4620f8981fdedac7f53816b3a)) * **neo-tree:** added l:open and h:close_node to neo-tree. Closes [#3293](https://github.com/LazyVim/LazyVim/issues/3293) ([dbec83d](https://github.com/LazyVim/LazyVim/commit/dbec83d57a1d5936ac860c37e0393a89b7cae7e9)) * **options:** when available use treesitter spell regions for spell checking ([276b803](https://github.com/LazyVim/LazyVim/commit/276b8032bedb6e1601ae85ecdfaee63217843b4f)) * **sql:** add SQL extra ([#1740](https://github.com/LazyVim/LazyVim/issues/1740)) ([59495c1](https://github.com/LazyVim/LazyVim/commit/59495c18714d8ae4c0b5f7a41dad96e39f9eb189)) ### Bug Fixes * **editor:** telescope init error when trouble.nvim is disabled ([#3518](https://github.com/LazyVim/LazyVim/issues/3518)) ([c452fd7](https://github.com/LazyVim/LazyVim/commit/c452fd730c94bfcbb5f9f4af1cae3c851f9456a3)) * **lualine:** only show one Lualine component for symbols ([#3514](https://github.com/LazyVim/LazyVim/issues/3514)) ([827aa53](https://github.com/LazyVim/LazyVim/commit/827aa5380a883e6a2a9904c253627489d43d3050)), closes [#3511](https://github.com/LazyVim/LazyVim/issues/3511) * **mini.files:** fix error about `opts.mappings` ([#3507](https://github.com/LazyVim/LazyVim/issues/3507)) ([9210648](https://github.com/LazyVim/LazyVim/commit/92106484ed89efb364568fa27a689bd8be83d066)) * removed leader-m, since it is leading to too many issues. Still available at leader-wm ([119dcb9](https://github.com/LazyVim/LazyVim/commit/119dcb949a84d9b10a620c9ad8400c220c5e5adb)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index af64098e..8dd99c1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## [12.9.0](https://github.com/LazyVim/LazyVim/compare/v12.8.0...v12.9.0) (2024-06-07) + + +### Features + +* **autocmd:** enable spell for typst and text file ([#3505](https://github.com/LazyVim/LazyVim/issues/3505)) ([8ca7245](https://github.com/LazyVim/LazyVim/commit/8ca72451298f60e6440ac48293052c5e82bd8ec6)) +* **docs:** add link to LazyVim For Ambitious Developers to README ([#3504](https://github.com/LazyVim/LazyVim/issues/3504)) ([2a5ab31](https://github.com/LazyVim/LazyVim/commit/2a5ab3109a7e5f3ef98c2a93f24738797c6d9cc6)) +* **lang:** add clojure support ([#2179](https://github.com/LazyVim/LazyVim/issues/2179)) ([913902b](https://github.com/LazyVim/LazyVim/commit/913902ba362603a4620f8981fdedac7f53816b3a)) +* **neo-tree:** added l:open and h:close_node to neo-tree. Closes [#3293](https://github.com/LazyVim/LazyVim/issues/3293) ([dbec83d](https://github.com/LazyVim/LazyVim/commit/dbec83d57a1d5936ac860c37e0393a89b7cae7e9)) +* **options:** when available use treesitter spell regions for spell checking ([276b803](https://github.com/LazyVim/LazyVim/commit/276b8032bedb6e1601ae85ecdfaee63217843b4f)) +* **sql:** add SQL extra ([#1740](https://github.com/LazyVim/LazyVim/issues/1740)) ([59495c1](https://github.com/LazyVim/LazyVim/commit/59495c18714d8ae4c0b5f7a41dad96e39f9eb189)) + + +### Bug Fixes + +* **editor:** telescope init error when trouble.nvim is disabled ([#3518](https://github.com/LazyVim/LazyVim/issues/3518)) ([c452fd7](https://github.com/LazyVim/LazyVim/commit/c452fd730c94bfcbb5f9f4af1cae3c851f9456a3)) +* **lualine:** only show one Lualine component for symbols ([#3514](https://github.com/LazyVim/LazyVim/issues/3514)) ([827aa53](https://github.com/LazyVim/LazyVim/commit/827aa5380a883e6a2a9904c253627489d43d3050)), closes [#3511](https://github.com/LazyVim/LazyVim/issues/3511) +* **mini.files:** fix error about `opts.mappings` ([#3507](https://github.com/LazyVim/LazyVim/issues/3507)) ([9210648](https://github.com/LazyVim/LazyVim/commit/92106484ed89efb364568fa27a689bd8be83d066)) +* removed leader-m, since it is leading to too many issues. Still available at leader-wm ([119dcb9](https://github.com/LazyVim/LazyVim/commit/119dcb949a84d9b10a620c9ad8400c220c5e5adb)) + ## [12.8.0](https://github.com/LazyVim/LazyVim/compare/v12.7.0...v12.8.0) (2024-06-06) From c16fb5d49bfe10041fb36f6ac80a755767b9e6bf Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 7 Jun 2024 22:48:26 +0200 Subject: [PATCH 19/51] fix(formatting): remove deprecation check on some options --- lua/lazyvim/plugins/formatting.lua | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/lua/lazyvim/plugins/formatting.lua b/lua/lazyvim/plugins/formatting.lua index 28dea8ed..0935f6b3 100644 --- a/lua/lazyvim/plugins/formatting.lua +++ b/lua/lazyvim/plugins/formatting.lua @@ -2,27 +2,10 @@ local M = {} ---@param opts ConformOpts function M.setup(_, opts) - for name, formatter in pairs(opts.formatters or {}) do - if type(formatter) == "table" then - ---@diagnostic disable-next-line: undefined-field - if formatter.extra_args then - ---@diagnostic disable-next-line: undefined-field - formatter.prepend_args = formatter.extra_args - LazyVim.deprecate( - ("opts.formatters.%s.extra_args"):format(name), - ("opts.formatters.%s.prepend_args"):format(name) - ) - end - end - end - for _, key in ipairs({ "format_on_save", "format_after_save" }) do if opts[key] then - LazyVim.warn( - ("Don't set `opts.%s` for `conform.nvim`.\n**LazyVim** will use the conform formatter automatically"):format( - key - ) - ) + local msg = "Don't set `opts.%s` for `conform.nvim`.\n**LazyVim** will use the conform formatter automatically" + LazyVim.warn(msg:format(key)) ---@diagnostic disable-next-line: no-unknown opts[key] = nil end From b714f286623cca6e3da31df43c4cf4354a46c36d Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 7 Jun 2024 22:48:50 +0200 Subject: [PATCH 20/51] feat(util): added LazyVim.has_extra --- lua/lazyvim/util/init.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/lazyvim/util/init.lua b/lua/lazyvim/util/init.lua index 9b13b50d..e23f9dfd 100644 --- a/lua/lazyvim/util/init.lua +++ b/lua/lazyvim/util/init.lua @@ -75,6 +75,12 @@ function M.has(plugin) return M.get_plugin(plugin) ~= nil end +---@param extra string +function M.has_extra(extra) + local modname = "lazyvim.plugins.extras." .. extra + return vim.tbl_contains(require("lazy.core.config").spec.modules, modname) +end + ---@param fn fun() function M.on_very_lazy(fn) vim.api.nvim_create_autocmd("User", { From 5a11d740e119d392858b97b69470201e66e66212 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 7 Jun 2024 22:49:06 +0200 Subject: [PATCH 21/51] feat(util): added LazyVim.memoize --- lua/lazyvim/util/init.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lua/lazyvim/util/init.lua b/lua/lazyvim/util/init.lua index e23f9dfd..d8f485ed 100644 --- a/lua/lazyvim/util/init.lua +++ b/lua/lazyvim/util/init.lua @@ -268,4 +268,17 @@ for _, level in ipairs({ "info", "warn", "error" }) do end end +local cache = {} ---@type table +---@generic T: fun() +---@param fn T +---@return T +function M.memoize(fn) + return function(...) + local key = vim.inspect({ ... }) + if cache[key] == nil then + cache[key] = fn(...) + end + return cache[key] + end +end return M From 7d50bf0626f768b4d036b500ff204835fa405b74 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 7 Jun 2024 23:00:30 +0200 Subject: [PATCH 22/51] feat(prettier): prettier is now enabled for all supported filetypes and no longer requires a config file by default --- .../plugins/extras/formatting/prettier.lua | 127 +++++++++++------- 1 file changed, 80 insertions(+), 47 deletions(-) diff --git a/lua/lazyvim/plugins/extras/formatting/prettier.lua b/lua/lazyvim/plugins/extras/formatting/prettier.lua index c0a84cba..d740b927 100644 --- a/lua/lazyvim/plugins/extras/formatting/prettier.lua +++ b/lua/lazyvim/plugins/extras/formatting/prettier.lua @@ -1,23 +1,95 @@ +---@diagnostic disable: inject-field if lazyvim_docs then - -- By default, prettier will only be used for formatting - -- if a prettier configuration file is found in the project. - -- Set to `false` to always use prettier for supported filetypes. - vim.g.lazyvim_prettier_needs_config = true + -- Enable the option to require a Prettier config file + -- If no prettier config file is found, the formatter will not be used + vim.g.lazyvim_prettier_needs_config = false end -local needs_config = vim.g.lazyvim_prettier_needs_config ~= false +---@alias ConformCtx {buf: number, filename: string, dirname: string} +local M = {} --- local check = vim.g.lazyvim_prettier +local supported = { + "css", + "fish", + "graphql", + "handlebars", + "html", + "javascript", + "javascriptreact", + "json", + "jsonc", + "less", + "lua", + "markdown", + "markdown.mdx", + "mysql", + "plsql", + "scss", + "sh", + "sql", + "typescript", + "typescriptreact", + "vue", + "yaml", +} -local enabled = {} ---@type table +--- Checks if a Prettier config file exists for the given context +---@param ctx ConformCtx +function M.has_config(ctx) + vim.fn.system({ "prettier", "--find-config-path", ctx.filename }) + return vim.v.shell_error == 0 +end + +--- Checks if a parser can be inferred for the given context: +--- * If the filetype is in the supported list, return true +--- * Otherwise, check if a parser can be inferred +---@param ctx ConformCtx +function M.has_parser(ctx) + local ft = vim.bo[ctx.buf].filetype --[[@as string]] + -- default filetypes are always supported + if vim.tbl_contains(supported, ft) then + return true + end + -- otherwise, check if a parser can be inferred + local ret = vim.fn.system({ "prettier", "--file-info", ctx.filename }) + ---@type boolean, string? + local ok, parser = pcall(function() + return vim.fn.json_decode(ret).inferredParser + end) + return ok and parser and parser ~= vim.NIL +end + +M.has_config = LazyVim.memoize(M.has_config) +M.has_parser = LazyVim.memoize(M.has_parser) return { { "williamboman/mason.nvim", + opts = { ensure_installed = { "prettier" } }, + }, + + -- conform + { + "stevearc/conform.nvim", + optional = true, + ---@param opts ConformOpts opts = function(_, opts) - table.insert(opts.ensure_installed, "prettier") + opts.formatters_by_ft = opts.formatters_by_ft or {} + for _, ft in ipairs(supported) do + opts.formatters_by_ft[ft] = { "prettier" } + end + + opts.formatters = { + prettier = { + condition = function(_, ctx) + return M.has_parser(ctx) and (vim.g.lazyvim_prettier_needs_config ~= true or M.has_config(ctx)) + end, + }, + } end, }, + + -- none-ls support { "nvimtools/none-ls.nvim", optional = true, @@ -27,43 +99,4 @@ return { table.insert(opts.sources, nls.builtins.formatting.prettier) end, }, - { - "stevearc/conform.nvim", - optional = true, - opts = { - formatters_by_ft = { - ["javascript"] = { "prettier" }, - ["javascriptreact"] = { "prettier" }, - ["typescript"] = { "prettier" }, - ["typescriptreact"] = { "prettier" }, - ["vue"] = { "prettier" }, - ["css"] = { "prettier" }, - ["scss"] = { "prettier" }, - ["less"] = { "prettier" }, - ["html"] = { "prettier" }, - ["json"] = { "prettier" }, - ["jsonc"] = { "prettier" }, - ["yaml"] = { "prettier" }, - ["markdown"] = { "prettier" }, - ["markdown.mdx"] = { "prettier" }, - ["graphql"] = { "prettier" }, - ["handlebars"] = { "prettier" }, - ["svelte"] = { "prettier" }, - }, - formatters = { - prettier = { - condition = function(_, ctx) - if not needs_config then - return true - end - if enabled[ctx.filename] == nil then - vim.fn.system({ "prettier", "--find-config-path", ctx.filename }) - enabled[ctx.filename] = vim.v.shell_error == 0 - end - return enabled[ctx.filename] - end, - }, - }, - }, - }, } From 214f5fccdf468030b05851ebfbef8394485322fb Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 7 Jun 2024 23:01:14 +0200 Subject: [PATCH 23/51] feat(prettier): with the prettier & astro extra, prettier will be enabled if the prettier-astro-plugin is available --- lua/lazyvim/plugins/extras/lang/astro.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lua/lazyvim/plugins/extras/lang/astro.lua b/lua/lazyvim/plugins/extras/lang/astro.lua index b0bd2616..a4384148 100644 --- a/lua/lazyvim/plugins/extras/lang/astro.lua +++ b/lua/lazyvim/plugins/extras/lang/astro.lua @@ -41,4 +41,14 @@ return { }) end, }, + + { + "conform.nvim", + opts = function(_, opts) + if LazyVim.has_extra("formatting.prettier") then + opts.formatters_by_ft = opts.formatters_by_ft or {} + opts.formatters_by_ft.astro = { "prettier" } + end + end, + }, } From 945143a34e298541989a9f050a3fb2ced6646e9e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 7 Jun 2024 23:01:47 +0200 Subject: [PATCH 24/51] feat(svelte): with prettier & svelte extra, prettier will be enabled when prettier-plugin-svelte is available --- lua/lazyvim/plugins/extras/lang/svelte.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lua/lazyvim/plugins/extras/lang/svelte.lua b/lua/lazyvim/plugins/extras/lang/svelte.lua index 2d711ab6..565e50e5 100644 --- a/lua/lazyvim/plugins/extras/lang/svelte.lua +++ b/lua/lazyvim/plugins/extras/lang/svelte.lua @@ -54,4 +54,14 @@ return { }) end, }, + + { + "conform.nvim", + opts = function(_, opts) + if LazyVim.has_extra("formatting.prettier") then + opts.formatters_by_ft = opts.formatters_by_ft or {} + opts.formatters_by_ft.svelte = { "prettier" } + end + end, + }, } From 49805748d4cefc077cc0c81e864f1757198fc3f4 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 7 Jun 2024 23:02:13 +0200 Subject: [PATCH 25/51] fix(extras): load prettier extra before svelte/astro --- lua/lazyvim/plugins/xtras.lua | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lua/lazyvim/plugins/xtras.lua b/lua/lazyvim/plugins/xtras.lua index 8b4b2ec9..e636c255 100644 --- a/lua/lazyvim/plugins/xtras.lua +++ b/lua/lazyvim/plugins/xtras.lua @@ -2,13 +2,14 @@ local Config = require("lazyvim.config") -- Some extras need to be loaded before others local prios = { - ["lazyvim.plugins.extras.editor.aerial"] = 100, - ["lazyvim.plugins.extras.editor.outline"] = 100, - ["lazyvim.plugins.extras.editor.trouble-v3"] = 100, - ["lazyvim.plugins.extras.lang.typescript"] = 5, - ["lazyvim.plugins.extras.ui.edgy"] = 2, ["lazyvim.plugins.extras.test.core"] = 1, ["lazyvim.plugins.extras.dap.core"] = 1, + ["lazyvim.plugins.extras.ui.edgy"] = 2, + ["lazyvim.plugins.extras.lang.typescript"] = 5, + ["lazyvim.plugins.extras.formatting.prettier"] = 10, + -- default priority is 50 + ["lazyvim.plugins.extras.editor.aerial"] = 100, + ["lazyvim.plugins.extras.editor.outline"] = 100, } ---@type string[] @@ -24,8 +25,8 @@ if vim.tbl_contains(compat, v) then end table.sort(extras, function(a, b) - local pa = prios[a] or 10 - local pb = prios[b] or 10 + local pa = prios[a] or 50 + local pb = prios[b] or 50 if pa == pb then return a < b end From 588240ca0973b42e151ad62d61da2f738f9cc755 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 7 Jun 2024 23:02:28 +0200 Subject: [PATCH 26/51] style: better types for vim.api.nvim_create_autocmd --- lua/lazyvim/types.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lua/lazyvim/types.lua b/lua/lazyvim/types.lua index 52a340c9..a963ac42 100644 --- a/lua/lazyvim/types.lua +++ b/lua/lazyvim/types.lua @@ -5,3 +5,20 @@ vim.g = {} _G.lazyvim_docs = true _G.LazyVim = require("lazyvim.util") + +---@class vim.api.create_autocmd.callback.args +---@field id number +---@field event string +---@field group number? +---@field match string +---@field buf number +---@field file string +---@field data any + +---@class vim.api.keyset.create_autocmd.opts: vim.api.keyset.create_autocmd +---@field callback? fun(ev:vim.api.create_autocmd.callback.args):boolean? + +--- @param event any (string|array) Event(s) that will trigger the handler +--- @param opts vim.api.keyset.create_autocmd.opts +--- @return integer +function vim.api.nvim_create_autocmd(event, opts) end From cfa8c9fbd45a36784f76d4842bc385828214ee1c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 7 Jun 2024 23:10:25 +0200 Subject: [PATCH 27/51] fix(clojure): removed rainbow delimiters and fixed some plugin setups. Closes #3530 --- lua/lazyvim/plugins/extras/lang/clojure.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/clojure.lua b/lua/lazyvim/plugins/extras/lang/clojure.lua index 1740ce52..7197aabd 100644 --- a/lua/lazyvim/plugins/extras/lang/clojure.lua +++ b/lua/lazyvim/plugins/extras/lang/clojure.lua @@ -26,17 +26,17 @@ return { end, }, - -- Enable rainbow parenthesis - { "HiPhish/rainbow-delimiters.nvim" }, - -- Add s-exp mappings - { "PaterJason/nvim-treesitter-sexp" }, + { "PaterJason/nvim-treesitter-sexp", opts = {}, event = "LazyFile" }, -- Colorize the output of the log buffer { "m00qek/baleia.nvim", - config = function() - vim.g.conjure_baleia = require("baleia").setup({ line_starts_at = 3 }) + opts = { + line_starts_at = 3, + }, + config = function(_, opts) + vim.g.conjure_baleia = require("baleia").setup(opts) vim.api.nvim_create_user_command("BaleiaColorize", function() vim.g.conjure_baleia.once(vim.api.nvim_get_current_buf()) @@ -49,6 +49,7 @@ return { -- Use Clojure REPL { "Olical/conjure", + event = "LazyFile", config = function(_, _) require("conjure.main").main() require("conjure.mapping")["on-filetype"]() From af80811be01f5349544a1b21e9dd03f0e25fefca Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Sat, 8 Jun 2024 00:12:59 +0300 Subject: [PATCH 28/51] fix(cmp): don't enable `snippets` source without `nvim-snippets` (#3527) Make it easier, so if users decide to disable `nvim-snippets`, they don't have to remove the `snippets` source manually in their config. --- 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 cf563f4a..155cfe80 100644 --- a/lua/lazyvim/plugins/coding.lua +++ b/lua/lazyvim/plugins/coding.lua @@ -111,7 +111,9 @@ return { return LazyVim.cmp.expand(item.body) end, } - table.insert(opts.sources, { name = "snippets" }) + if LazyVim.has("nvim-snippets") then + table.insert(opts.sources, { name = "snippets" }) + end end, keys = { { From ac9217b1994ad00b488ba73021d89afac03873ee Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 7 Jun 2024 23:23:59 +0200 Subject: [PATCH 29/51] fix(prettier): fixup --- .../plugins/extras/formatting/prettier.lua | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/lua/lazyvim/plugins/extras/formatting/prettier.lua b/lua/lazyvim/plugins/extras/formatting/prettier.lua index d740b927..13704ca9 100644 --- a/lua/lazyvim/plugins/extras/formatting/prettier.lua +++ b/lua/lazyvim/plugins/extras/formatting/prettier.lua @@ -10,7 +10,6 @@ local M = {} local supported = { "css", - "fish", "graphql", "handlebars", "html", @@ -19,14 +18,9 @@ local supported = { "json", "jsonc", "less", - "lua", "markdown", "markdown.mdx", - "mysql", - "plsql", "scss", - "sh", - "sql", "typescript", "typescriptreact", "vue", @@ -79,12 +73,11 @@ return { opts.formatters_by_ft[ft] = { "prettier" } end - opts.formatters = { - prettier = { - condition = function(_, ctx) - return M.has_parser(ctx) and (vim.g.lazyvim_prettier_needs_config ~= true or M.has_config(ctx)) - end, - }, + opts.formatters = opts.formatters or {} + opts.formatters.prettier = { + condition = function(_, ctx) + return M.has_parser(ctx) and (vim.g.lazyvim_prettier_needs_config ~= true or M.has_config(ctx)) + end, } end, }, From f202f573b4a8b23e5517504b41483eadf55a0699 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 7 Jun 2024 23:54:57 +0200 Subject: [PATCH 30/51] docs: updated news --- NEWS.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/NEWS.md b/NEWS.md index 05a1ddce..3b5657d7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,27 @@ ## 11.x +- **prettier** extra now works for all prettier supported filetypes + and will be enabled for astro/svelte extra if you have a proper + config file with the correct prettier plugin + +- **New Language Support:** SQL, Clojure, Thrift, Elm, Gleam, Angular, + NuShell, Svelte, Kotlin, Astro, Toml and PHP + +- The **typescript** extra now uses `vtsls` instead of `tsserver` + +- **New Extras:** `copilot-chat`, `git`, `octo`, `inc-rename` and `neogen` + +- **Keymaps:** + + - `gB` to open the current repo in the browser + - `gco` and `gcO` to add a comment below or above the current line + - `wm` to toggle window maximize + +- **lazydev.nvim:** faster alternative to `neodev.nvim` + +- **Options:** Added `linebreak=true` to default options. + - **Neovim >= 0.10** now uses the much faster [lazydev.nvim](https://github.com/folke/lazydev.nvim) instead of `neodev.nvim` From a5f8af912de4b334cb900a9f383b6e317568f27f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 23:57:13 +0200 Subject: [PATCH 31/51] chore(main): release 12.10.0 (#3532) :robot: I have created a release *beep* *boop* --- ## [12.10.0](https://github.com/LazyVim/LazyVim/compare/v12.9.0...v12.10.0) (2024-06-07) ### Features * **prettier:** prettier is now enabled for all supported filetypes and no longer requires a config file by default ([7d50bf0](https://github.com/LazyVim/LazyVim/commit/7d50bf0626f768b4d036b500ff204835fa405b74)) * **prettier:** with the prettier & astro extra, prettier will be enabled if the prettier-astro-plugin is available ([214f5fc](https://github.com/LazyVim/LazyVim/commit/214f5fccdf468030b05851ebfbef8394485322fb)) * **svelte:** with prettier & svelte extra, prettier will be enabled when prettier-plugin-svelte is available ([945143a](https://github.com/LazyVim/LazyVim/commit/945143a34e298541989a9f050a3fb2ced6646e9e)) * **util:** added LazyVim.has_extra ([b714f28](https://github.com/LazyVim/LazyVim/commit/b714f286623cca6e3da31df43c4cf4354a46c36d)) * **util:** added LazyVim.memoize ([5a11d74](https://github.com/LazyVim/LazyVim/commit/5a11d740e119d392858b97b69470201e66e66212)) ### Bug Fixes * **clojure:** removed rainbow delimiters and fixed some plugin setups. Closes [#3530](https://github.com/LazyVim/LazyVim/issues/3530) ([cfa8c9f](https://github.com/LazyVim/LazyVim/commit/cfa8c9fbd45a36784f76d4842bc385828214ee1c)) * **cmp:** don't enable `snippets` source without `nvim-snippets` ([#3527](https://github.com/LazyVim/LazyVim/issues/3527)) ([af80811](https://github.com/LazyVim/LazyVim/commit/af80811be01f5349544a1b21e9dd03f0e25fefca)) * **extras:** load prettier extra before svelte/astro ([4980574](https://github.com/LazyVim/LazyVim/commit/49805748d4cefc077cc0c81e864f1757198fc3f4)) * **formatting:** remove deprecation check on some options ([c16fb5d](https://github.com/LazyVim/LazyVim/commit/c16fb5d49bfe10041fb36f6ac80a755767b9e6bf)) * **prettier:** fixup ([ac9217b](https://github.com/LazyVim/LazyVim/commit/ac9217b1994ad00b488ba73021d89afac03873ee)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8dd99c1e..45c72e6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## [12.10.0](https://github.com/LazyVim/LazyVim/compare/v12.9.0...v12.10.0) (2024-06-07) + + +### Features + +* **prettier:** prettier is now enabled for all supported filetypes and no longer requires a config file by default ([7d50bf0](https://github.com/LazyVim/LazyVim/commit/7d50bf0626f768b4d036b500ff204835fa405b74)) +* **prettier:** with the prettier & astro extra, prettier will be enabled if the prettier-astro-plugin is available ([214f5fc](https://github.com/LazyVim/LazyVim/commit/214f5fccdf468030b05851ebfbef8394485322fb)) +* **svelte:** with prettier & svelte extra, prettier will be enabled when prettier-plugin-svelte is available ([945143a](https://github.com/LazyVim/LazyVim/commit/945143a34e298541989a9f050a3fb2ced6646e9e)) +* **util:** added LazyVim.has_extra ([b714f28](https://github.com/LazyVim/LazyVim/commit/b714f286623cca6e3da31df43c4cf4354a46c36d)) +* **util:** added LazyVim.memoize ([5a11d74](https://github.com/LazyVim/LazyVim/commit/5a11d740e119d392858b97b69470201e66e66212)) + + +### Bug Fixes + +* **clojure:** removed rainbow delimiters and fixed some plugin setups. Closes [#3530](https://github.com/LazyVim/LazyVim/issues/3530) ([cfa8c9f](https://github.com/LazyVim/LazyVim/commit/cfa8c9fbd45a36784f76d4842bc385828214ee1c)) +* **cmp:** don't enable `snippets` source without `nvim-snippets` ([#3527](https://github.com/LazyVim/LazyVim/issues/3527)) ([af80811](https://github.com/LazyVim/LazyVim/commit/af80811be01f5349544a1b21e9dd03f0e25fefca)) +* **extras:** load prettier extra before svelte/astro ([4980574](https://github.com/LazyVim/LazyVim/commit/49805748d4cefc077cc0c81e864f1757198fc3f4)) +* **formatting:** remove deprecation check on some options ([c16fb5d](https://github.com/LazyVim/LazyVim/commit/c16fb5d49bfe10041fb36f6ac80a755767b9e6bf)) +* **prettier:** fixup ([ac9217b](https://github.com/LazyVim/LazyVim/commit/ac9217b1994ad00b488ba73021d89afac03873ee)) + ## [12.9.0](https://github.com/LazyVim/LazyVim/compare/v12.8.0...v12.9.0) (2024-06-07) From 16f3ebb9f16accb972fc85f2d6c9b2e606097640 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 7 Jun 2024 23:59:06 +0200 Subject: [PATCH 32/51] docs(news): added link to news --- NEWS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS.md b/NEWS.md index 3b5657d7..497b3aae 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,8 @@ ## 11.x +- This **news** is now also available on the website at [https://www.lazyvim.org/news](https://www.lazyvim.org/news) + - **prettier** extra now works for all prettier supported filetypes and will be enabled for astro/svelte extra if you have a proper config file with the correct prettier plugin From 1394070aab122a052b3649f217a6841a8de67447 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 8 Jun 2024 00:11:24 +0200 Subject: [PATCH 33/51] docs(news): fixed versions --- NEWS.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/NEWS.md b/NEWS.md index 497b3aae..3abd43b7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,6 @@ # What's new? -## 11.x +## 12.x - This **news** is now also available on the website at [https://www.lazyvim.org/news](https://www.lazyvim.org/news) @@ -11,9 +11,17 @@ - **New Language Support:** SQL, Clojure, Thrift, Elm, Gleam, Angular, NuShell, Svelte, Kotlin, Astro, Toml and PHP +- **New Extras:** `copilot-chat`, `git`, `octo`, `inc-rename` and `neogen` + - The **typescript** extra now uses `vtsls` instead of `tsserver` -- **New Extras:** `copilot-chat`, `git`, `octo`, `inc-rename` and `neogen` +- **Neovim >= 0.10** now uses the much faster [lazydev.nvim](https://github.com/folke/lazydev.nvim) + instead of `neodev.nvim` + +- moved `neoconf.nvim` to extras. Project specific LSP settings + can be done with a `.lazy.lua` file instead. + +## 11.x - **Keymaps:** @@ -25,12 +33,6 @@ - **Options:** Added `linebreak=true` to default options. -- **Neovim >= 0.10** now uses the much faster [lazydev.nvim](https://github.com/folke/lazydev.nvim) - instead of `neodev.nvim` - -- moved `neoconf.nvim` to extras. Project specific LSP settings - can be done with a `.lazy.lua` file instead. - - `mini.ai` is back as a default plugin! Removing it was a mistake. It's a great plugin that enhances the native text objects. From d90930b13e4515a5f4e4f3892ac9f7c392c4f20c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 8 Jun 2024 07:30:49 +0200 Subject: [PATCH 34/51] fix(typescript): implemented move to new file. Fixes #3534 --- .../plugins/extras/lang/typescript.lua | 50 +++++++++++++++++++ lua/lazyvim/util/lsp.lua | 8 +-- 2 files changed, 55 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/typescript.lua b/lua/lazyvim/plugins/extras/lang/typescript.lua index 97c3353c..7316ad50 100644 --- a/lua/lazyvim/plugins/extras/lang/typescript.lua +++ b/lua/lazyvim/plugins/extras/lang/typescript.lua @@ -119,6 +119,56 @@ return { return true end, vtsls = function(_, opts) + LazyVim.lsp.on_attach(function(client, buffer) + client.commands["_typescript.moveToFileRefactoring"] = function(command, ctx) + ---@type string, string, lsp.Range + local action, uri, range = unpack(command.arguments) + + local function move(newf) + client.request("workspace/executeCommand", { + command = command.command, + arguments = { action, uri, range, newf }, + }) + end + + local fname = vim.uri_to_fname(uri) + client.request("workspace/executeCommand", { + command = "typescript.tsserverRequest", + arguments = { + "getMoveToRefactoringFileSuggestions", + { + file = fname, + startLine = range.start.line + 1, + startOffset = range.start.character + 1, + endLine = range["end"].line + 1, + endOffset = range["end"].character + 1, + }, + }, + }, function(_, result) + ---@type string[] + local files = result.body.files + table.insert(files, 1, "Enter new path...") + vim.ui.select(files, { + prompt = "Select move destination:", + format_item = function(f) + return vim.fn.fnamemodify(f, ":~:.") + end, + }, function(f) + if f and f:find("^Enter new path") then + vim.ui.input({ + prompt = "Enter move destination:", + default = vim.fn.fnamemodify(fname, ":h") .. "/", + completion = "file", + }, function(newf) + return newf and move(newf) + end) + elseif f then + move(f) + end + end) + end) + end + end, "vtsls") -- copy typescript settings to javascript opts.settings.javascript = vim.tbl_deep_extend("force", {}, opts.settings.typescript, opts.settings.javascript or {}) diff --git a/lua/lazyvim/util/lsp.lua b/lua/lazyvim/util/lsp.lua index f1be8801..11877f1b 100644 --- a/lua/lazyvim/util/lsp.lua +++ b/lua/lazyvim/util/lsp.lua @@ -22,12 +22,13 @@ function M.get_clients(opts) end ---@param on_attach fun(client:vim.lsp.Client, buffer) -function M.on_attach(on_attach) +---@param name? string +function M.on_attach(on_attach, name) return vim.api.nvim_create_autocmd("LspAttach", { callback = function(args) local buffer = args.buf ---@type number local client = vim.lsp.get_client_by_id(args.data.client_id) - if client then + if client and (not name or client.name == name) then return on_attach(client, buffer) end end, @@ -340,6 +341,7 @@ M.action = setmetatable({}, { ---@class LspCommand: lsp.ExecuteCommandParams ---@field open? boolean +---@field handler? lsp.Handler ---@param opts LspCommand function M.execute(opts) @@ -353,7 +355,7 @@ function M.execute(opts) params = params, }) else - return vim.lsp.buf_request(0, "workspace/executeCommand", params) + return vim.lsp.buf_request(0, "workspace/executeCommand", params, opts.handler) end end From 6098a36d927ee4d5f1f5344cc00db4a233728f4f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 8 Jun 2024 05:31:47 +0000 Subject: [PATCH 35/51] 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 309ad8fc..38e4c106 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 June 07 +*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 June 08 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 8f7ee56dab264615eeb3b83ecda68270bedc6595 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 8 Jun 2024 08:11:28 +0200 Subject: [PATCH 36/51] refactor: LazyVim.lsp.on_attach --- lua/lazyvim/plugins/extras/coding/copilot.lua | 6 ++--- lua/lazyvim/plugins/extras/lang/angular.lua | 8 +++---- lua/lazyvim/plugins/extras/lang/go.lua | 24 +++++++++---------- lua/lazyvim/plugins/extras/lang/helm.lua | 22 ++++++++--------- lua/lazyvim/plugins/extras/lang/python.lua | 8 +++---- lua/lazyvim/plugins/extras/lang/yaml.lua | 6 ++--- 6 files changed, 32 insertions(+), 42 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/copilot.lua b/lua/lazyvim/plugins/extras/coding/copilot.lua index afe14f61..a9897107 100644 --- a/lua/lazyvim/plugins/extras/coding/copilot.lua +++ b/lua/lazyvim/plugins/extras/coding/copilot.lua @@ -66,10 +66,8 @@ return { -- attach cmp source whenever copilot attaches -- fixes lazy-loading issues with the copilot cmp source LazyVim.lsp.on_attach(function(client) - if client.name == "copilot" then - copilot_cmp._on_insert_enter({}) - end - end) + copilot_cmp._on_insert_enter({}) + end, "copilot") end, }, }, diff --git a/lua/lazyvim/plugins/extras/lang/angular.lua b/lua/lazyvim/plugins/extras/lang/angular.lua index fef54cc7..9dd82329 100644 --- a/lua/lazyvim/plugins/extras/lang/angular.lua +++ b/lua/lazyvim/plugins/extras/lang/angular.lua @@ -36,11 +36,9 @@ return { setup = { angularls = function() LazyVim.lsp.on_attach(function(client) - if client.name == "angularls" then - --HACK: disable angular renaming capability due to duplicate rename popping up - client.server_capabilities.renameProvider = false - end - end) + --HACK: disable angular renaming capability due to duplicate rename popping up + client.server_capabilities.renameProvider = false + end, "angularls") end, }, }, diff --git a/lua/lazyvim/plugins/extras/lang/go.lua b/lua/lazyvim/plugins/extras/lang/go.lua index 5551789e..b3e0ffab 100644 --- a/lua/lazyvim/plugins/extras/lang/go.lua +++ b/lua/lazyvim/plugins/extras/lang/go.lua @@ -61,20 +61,18 @@ return { -- workaround for gopls not supporting semanticTokensProvider -- https://github.com/golang/go/issues/54531#issuecomment-1464982242 LazyVim.lsp.on_attach(function(client, _) - if client.name == "gopls" then - if not client.server_capabilities.semanticTokensProvider then - local semantic = client.config.capabilities.textDocument.semanticTokens - client.server_capabilities.semanticTokensProvider = { - full = true, - legend = { - tokenTypes = semantic.tokenTypes, - tokenModifiers = semantic.tokenModifiers, - }, - range = true, - } - end + if not client.server_capabilities.semanticTokensProvider then + local semantic = client.config.capabilities.textDocument.semanticTokens + client.server_capabilities.semanticTokensProvider = { + full = true, + legend = { + tokenTypes = semantic.tokenTypes, + tokenModifiers = semantic.tokenModifiers, + }, + range = true, + } end - end) + end, "gopls") -- end workaround end, }, diff --git a/lua/lazyvim/plugins/extras/lang/helm.lua b/lua/lazyvim/plugins/extras/lang/helm.lua index 4145b790..67ec0b26 100644 --- a/lua/lazyvim/plugins/extras/lang/helm.lua +++ b/lua/lazyvim/plugins/extras/lang/helm.lua @@ -1,13 +1,3 @@ -LazyVim.lsp.on_attach(function(client, buffer) - if client.name == "yamlls" then - if vim.api.nvim_get_option_value("filetype", { buf = buffer }) == "helm" then - vim.schedule(function() - vim.cmd("LspStop ++force yamlls") - end) - end - end -end) - return { recommended = function() return LazyVim.extras.wants({ @@ -25,9 +15,19 @@ return { "neovim/nvim-lspconfig", opts = { servers = { - yamlls = {}, helm_ls = {}, }, + setup = { + yamlls = function() + LazyVim.lsp.on_attach(function(client, buffer) + if vim.bo[buffer].filetype == "helm" then + vim.schedule(function() + vim.cmd("LspStop ++force yamlls") + end) + end + end, "yamlls") + end, + }, }, }, } diff --git a/lua/lazyvim/plugins/extras/lang/python.lua b/lua/lazyvim/plugins/extras/lang/python.lua index 1d2bb206..0be4b93c 100644 --- a/lua/lazyvim/plugins/extras/lang/python.lua +++ b/lua/lazyvim/plugins/extras/lang/python.lua @@ -58,11 +58,9 @@ return { setup = { [ruff] = function() LazyVim.lsp.on_attach(function(client, _) - if client.name == ruff then - -- Disable hover in favor of Pyright - client.server_capabilities.hoverProvider = false - end - end) + -- Disable hover in favor of Pyright + client.server_capabilities.hoverProvider = false + end, ruff) end, }, }, diff --git a/lua/lazyvim/plugins/extras/lang/yaml.lua b/lua/lazyvim/plugins/extras/lang/yaml.lua index b34e2a26..9a3aadb8 100644 --- a/lua/lazyvim/plugins/extras/lang/yaml.lua +++ b/lua/lazyvim/plugins/extras/lang/yaml.lua @@ -60,10 +60,8 @@ return { -- Neovim < 0.10 does not have dynamic registration for formatting if vim.fn.has("nvim-0.10") == 0 then LazyVim.lsp.on_attach(function(client, _) - if client.name == "yamlls" then - client.server_capabilities.documentFormattingProvider = true - end - end) + client.server_capabilities.documentFormattingProvider = true + end, "yamlls") end end, }, From 51854046dbb0bacf690ddc217cc76bf98c8ec1aa Mon Sep 17 00:00:00 2001 From: zeekrs Date: Sat, 8 Jun 2024 16:04:10 +0800 Subject: [PATCH 37/51] fix(extras): +prefix in which-key panel for visual mode (#3537) --- lua/lazyvim/plugins/extras/dap/core.lua | 2 +- lua/lazyvim/plugins/extras/editor/refactoring.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/dap/core.lua b/lua/lazyvim/plugins/extras/dap/core.lua index c76a0d5b..7bc2345f 100644 --- a/lua/lazyvim/plugins/extras/dap/core.lua +++ b/lua/lazyvim/plugins/extras/dap/core.lua @@ -53,7 +53,7 @@ return { -- stylua: ignore keys = { - { "d", "", desc = "+debug" }, + { "d", "", desc = "+debug", mode = {"n", "v"} }, { "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" }, diff --git a/lua/lazyvim/plugins/extras/editor/refactoring.lua b/lua/lazyvim/plugins/extras/editor/refactoring.lua index 586cda53..9d8f8f9c 100644 --- a/lua/lazyvim/plugins/extras/editor/refactoring.lua +++ b/lua/lazyvim/plugins/extras/editor/refactoring.lua @@ -7,7 +7,7 @@ return { "nvim-treesitter/nvim-treesitter", }, keys = { - { "r", "", desc = "+refactor" }, + { "r", "", desc = "+refactor", mode = { "n", "v" } }, { "rs", function() From fbb1276ffd45683d4d64a2d99907bdbd3421c16f Mon Sep 17 00:00:00 2001 From: Mykhailo Sabatura <34069301+mishasbtr@users.noreply.github.com> Date: Sat, 8 Jun 2024 23:57:45 +0200 Subject: [PATCH 38/51] fix(extra-lang-angular): add BufNew event to attach angular treesitter (#3522) ## Problem Sometimes angular treesitter didn't get started, e.g. when creating a new file. ## Solution - Add `BufNew` event to attach angular treesitter. - Change `BufRead` to `BufReadPost` for better readability. ### Related Neovim docs - [BufRead / BufReadPost docs](https://neovim.io/doc/user/autocmd.html#BufRead) - [BufNew](https://neovim.io/doc/user/autocmd.html#BufNew) --- lua/lazyvim/plugins/extras/lang/angular.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/angular.lua b/lua/lazyvim/plugins/extras/lang/angular.lua index 9dd82329..f039c3a0 100644 --- a/lua/lazyvim/plugins/extras/lang/angular.lua +++ b/lua/lazyvim/plugins/extras/lang/angular.lua @@ -14,7 +14,7 @@ return { if type(opts.ensure_installed) == "table" then vim.list_extend(opts.ensure_installed, { "angular", "scss" }) end - vim.api.nvim_create_autocmd("BufRead", { + vim.api.nvim_create_autocmd({ "BufReadPost", "BufNewFile" }, { pattern = { "*.component.html", "*.container.html" }, callback = function() vim.treesitter.start(nil, "angular") From 02dd65cdea1ae34cdf4ca00b20760dbb3cfcd72b Mon Sep 17 00:00:00 2001 From: DrummyFloyd Date: Sun, 9 Jun 2024 07:33:59 +0200 Subject: [PATCH 39/51] fix(helm): missing dependency (#3546) according to this comment https://github.com/LazyVim/LazyVim/commit/ab41ff551b89fde27a0225bc1aa7245bcaec472e#r142924660 --- lua/lazyvim/plugins/extras/lang/helm.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/lang/helm.lua b/lua/lazyvim/plugins/extras/lang/helm.lua index 67ec0b26..58d8bdc8 100644 --- a/lua/lazyvim/plugins/extras/lang/helm.lua +++ b/lua/lazyvim/plugins/extras/lang/helm.lua @@ -6,6 +6,7 @@ return { }) end, + { "towolf/vim-helm", ft = "helm" }, { "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = { "helm" } }, From 28426cc31c0653643f22563fab2f8badb8e8c4cb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 9 Jun 2024 05:34:35 +0000 Subject: [PATCH 40/51] 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 38e4c106..ad712151 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 June 08 +*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 June 09 ============================================================================== Table of Contents *LazyVim-table-of-contents* From aa059e0d496e570f898644d3f18bc344ca179d38 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 9 Jun 2024 07:37:09 +0200 Subject: [PATCH 41/51] fix(luasnip): disable nvim-snippets when luasnip is enabled. Fixes #3547 --- lua/lazyvim/plugins/extras/coding/luasnip.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/lazyvim/plugins/extras/coding/luasnip.lua b/lua/lazyvim/plugins/extras/coding/luasnip.lua index bf0b3ea0..f0aadc4f 100644 --- a/lua/lazyvim/plugins/extras/coding/luasnip.lua +++ b/lua/lazyvim/plugins/extras/coding/luasnip.lua @@ -46,4 +46,8 @@ return { { "", function() require("luasnip").jump(-1) end, mode = { "i", "s" } }, }, }, + { + "garymjr/nvim-snippets", + enabled = false, + }, } From 0567b37f61d5ad997793b950c38a6c8f73de3b9b Mon Sep 17 00:00:00 2001 From: Ian <66728045+zspher@users.noreply.github.com> Date: Sun, 9 Jun 2024 14:37:08 +0800 Subject: [PATCH 42/51] fix(lang): neotest not loading rust tests (#3544) fixes https://github.com/LazyVim/LazyVim/issues/3543 --- lua/lazyvim/plugins/extras/lang/rust.lua | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/rust.lua b/lua/lazyvim/plugins/extras/lang/rust.lua index e5a9acd2..92ac3caf 100644 --- a/lua/lazyvim/plugins/extras/lang/rust.lua +++ b/lua/lazyvim/plugins/extras/lang/rust.lua @@ -119,12 +119,10 @@ return { { "nvim-neotest/neotest", - optional = true, - opts = function(_, opts) - opts.adapters = opts.adapters or {} - vim.list_extend(opts.adapters, { - require("rustaceanvim.neotest"), - }) - end, + opts = { + adapters = { + ["rustaceanvim.neotest"] = {}, + }, + }, }, } From 547dc76a12309d4dafc970ae08832140eae51cba Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 9 Jun 2024 09:27:29 +0200 Subject: [PATCH 43/51] fix(rust): make neotest optional --- lua/lazyvim/plugins/extras/lang/rust.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/lang/rust.lua b/lua/lazyvim/plugins/extras/lang/rust.lua index 92ac3caf..a24d85f9 100644 --- a/lua/lazyvim/plugins/extras/lang/rust.lua +++ b/lua/lazyvim/plugins/extras/lang/rust.lua @@ -119,6 +119,7 @@ return { { "nvim-neotest/neotest", + optional = true, opts = { adapters = { ["rustaceanvim.neotest"] = {}, From 2848ee492baaffa3c1cf112c17543f077e9fab7f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 9 Jun 2024 11:36:44 +0200 Subject: [PATCH 44/51] ci: link to discussions --- .github/ISSUE_TEMPLATE/config.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 3ba13e0c..f861a282 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1 +1,5 @@ blank_issues_enabled: false +contact_links: + - name: Ask a question or start a discussion + url: https://github.com/LazyVim/LazyVim/discussions + about: Use Github discussions instead From 7793942ebafd32ef90f79e28979898f8013976ff Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 9 Jun 2024 11:42:58 +0200 Subject: [PATCH 45/51] feat(octo): re-open octo windows when restoring session + cleanup --- lua/lazyvim/plugins/extras/util/octo.lua | 55 +++++------------------- lua/lazyvim/util/ui.lua | 18 -------- 2 files changed, 11 insertions(+), 62 deletions(-) diff --git a/lua/lazyvim/plugins/extras/util/octo.lua b/lua/lazyvim/plugins/extras/util/octo.lua index fad1ac25..cc5c47bf 100644 --- a/lua/lazyvim/plugins/extras/util/octo.lua +++ b/lua/lazyvim/plugins/extras/util/octo.lua @@ -48,53 +48,20 @@ return { else LazyVim.error("`octo.nvim` requires `telescope.nvim` or `fzf-lua`") end - local Signs = require("octo.ui.signs") - ---@type {buf: number, from: number, to: number, dirty: boolean}[] - local signs = {} - - local unplace = Signs.unplace - function Signs.unplace(bufnr) - signs = vim.tbl_filter(function(s) - return s.buf ~= bufnr - end, signs) - return unplace(bufnr) - end - - function Signs.place_signs(bufnr, start_line, end_line, is_dirty) - signs[#signs + 1] = { buf = bufnr, from = start_line, to = end_line, dirty = is_dirty } - end - -- stylua: ignore - local corners = { - top = "┌╴", - middle = "│ ", - last = "└╴", - single = "[ ", - } - - --- Fixes octo's comment rendering to take wrapping into account - ---@param buf number - ---@param lnum number - ---@param vnum number - ---@param win number - table.insert(LazyVim.ui.virtual, function(buf, lnum, vnum, win) - lnum = lnum - 1 - for _, s in ipairs(signs) do - if buf == s.buf and lnum >= s.from and lnum <= s.to then - local height = vim.api.nvim_win_text_height(win, { start_row = s.from, end_row = s.to }).all - local height_end = vim.api.nvim_win_text_height(win, { start_row = s.to, end_row = s.to }).all - local corner = corners.middle - if height == 1 then - corner = corners.single - elseif lnum == s.from and vnum == 0 then - corner = corners.top - elseif lnum == s.to and vnum == height_end - 1 then - corner = corners.last + -- Keep some empty windows in sessions + vim.api.nvim_create_autocmd("ExitPre", { + group = vim.api.nvim_create_augroup("octo_exit_pre", { clear = true }), + callback = function(ev) + local keep = { "octo" } + for _, win in ipairs(vim.api.nvim_list_wins()) do + local buf = vim.api.nvim_win_get_buf(win) + if vim.tbl_contains(keep, vim.bo[buf].filetype) then + vim.bo[buf].buftype = "" -- set buftype to empty to keep the window end - return { { text = corner, texthl = s.dirty and "OctoDirty" or "IblScope" } } end - end - end) + end, + }) end, }, } diff --git a/lua/lazyvim/util/ui.lua b/lua/lazyvim/util/ui.lua index 978a7079..84ab8ab5 100644 --- a/lua/lazyvim/util/ui.lua +++ b/lua/lazyvim/util/ui.lua @@ -1,9 +1,6 @@ ---@class lazyvim.util.ui local M = {} ----@type (fun(buf:number, lnum:number, vnum:number, win:number):Sign[]?)[] -M.virtual = {} - ---@alias Sign {name:string, text:string, texthl:string, priority:number} -- Returns a list of regular and extmark signs sorted by priority (low to high) @@ -108,21 +105,9 @@ function M.statuscolumn() if show_signs then local signs = M.get_signs(buf, vim.v.lnum) - local has_virtual = false - for _, fn in ipairs(M.virtual) do - local virtual = fn(buf, vim.v.lnum, vim.v.virtnum, win) - if virtual then - has_virtual = true - vim.list_extend(signs, virtual) - end - end - ---@type Sign?,Sign?,Sign? local left, right, fold, githl for _, s in ipairs(signs) do - if s.name and s.name:lower():find("^octo_clean") then - s.texthl = "IblScope" - end if s.name and (s.name:find("GitSign") or s.name:find("MiniDiffSign")) then right = s if use_githl then @@ -132,9 +117,6 @@ function M.statuscolumn() left = s end end - if vim.v.virtnum ~= 0 and not has_virtual then - left = nil - end vim.api.nvim_win_call(win, function() if vim.fn.foldclosed(vim.v.lnum) >= 0 then From 1c46f544328b084753327a81b92e2b57ab568321 Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Sun, 9 Jun 2024 16:48:51 -0400 Subject: [PATCH 46/51] fix(typescript): clean up configuration of the vscode dap extension (#3556) `mason-nvim-dap.nvim` adds it's own adapter filetype mappings to the vscode extension in `nvim-dap` (as of https://github.com/jay-babu/mason-nvim-dap.nvim/pull/129) This also moves the type mappings for the `pwa-node` and `node` adapters to where they are defined in the typescript pack. Now that the default internal type mappings are configured we can rely on the automatic loading of the `.vscode/launch.json` that `nvim-dap` does --- lua/lazyvim/plugins/extras/dap/core.lua | 6 ------ lua/lazyvim/plugins/extras/lang/typescript.lua | 8 +++++++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lua/lazyvim/plugins/extras/dap/core.lua b/lua/lazyvim/plugins/extras/dap/core.lua index 7bc2345f..b7a088c1 100644 --- a/lua/lazyvim/plugins/extras/dap/core.lua +++ b/lua/lazyvim/plugins/extras/dap/core.lua @@ -87,16 +87,10 @@ return { -- setup dap config by VsCode launch.json file local vscode = require("dap.ext.vscode") - local _filetypes = require("mason-nvim-dap.mappings.filetypes") - local filetypes = vim.tbl_deep_extend("force", _filetypes, { - ["node"] = { "javascriptreact", "typescriptreact", "typescript", "javascript" }, - ["pwa-node"] = { "javascriptreact", "typescriptreact", "typescript", "javascript" }, - }) local json = require("plenary.json") vscode.json_decode = function(str) return vim.json.decode(json.json_strip_comments(str)) end - vscode.load_launchjs(nil, filetypes) end, }, diff --git a/lua/lazyvim/plugins/extras/lang/typescript.lua b/lua/lazyvim/plugins/extras/lang/typescript.lua index 7316ad50..139c3086 100644 --- a/lua/lazyvim/plugins/extras/lang/typescript.lua +++ b/lua/lazyvim/plugins/extras/lang/typescript.lua @@ -220,7 +220,13 @@ return { end end - for _, language in ipairs({ "typescript", "javascript", "typescriptreact", "javascriptreact" }) do + local js_filetypes = { "typescript", "javascript", "typescriptreact", "javascriptreact" } + + local vscode = require("dap.ext.vscode") + vscode.type_to_filetypes["node"] = js_filetypes + vscode.type_to_filetypes["pwa-node"] = js_filetypes + + for _, language in ipairs(js_filetypes) do if not dap.configurations[language] then dap.configurations[language] = { { From d7c7548e09af1d26db57f10be3c77a58f010b1d5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 9 Jun 2024 23:19:28 +0200 Subject: [PATCH 47/51] chore(main): release 12.11.0 (#3536) :robot: I have created a release *beep* *boop* --- ## [12.11.0](https://github.com/LazyVim/LazyVim/compare/v12.10.0...v12.11.0) (2024-06-09) ### Features * **octo:** re-open octo windows when restoring session + cleanup ([7793942](https://github.com/LazyVim/LazyVim/commit/7793942ebafd32ef90f79e28979898f8013976ff)) ### Bug Fixes * **extra-lang-angular:** add BufNew event to attach angular treesitter ([#3522](https://github.com/LazyVim/LazyVim/issues/3522)) ([fbb1276](https://github.com/LazyVim/LazyVim/commit/fbb1276ffd45683d4d64a2d99907bdbd3421c16f)) * **extras:** +prefix in which-key panel for visual mode ([#3537](https://github.com/LazyVim/LazyVim/issues/3537)) ([5185404](https://github.com/LazyVim/LazyVim/commit/51854046dbb0bacf690ddc217cc76bf98c8ec1aa)) * **helm:** missing dependency ([#3546](https://github.com/LazyVim/LazyVim/issues/3546)) ([02dd65c](https://github.com/LazyVim/LazyVim/commit/02dd65cdea1ae34cdf4ca00b20760dbb3cfcd72b)) * **lang:** neotest not loading rust tests ([#3544](https://github.com/LazyVim/LazyVim/issues/3544)) ([0567b37](https://github.com/LazyVim/LazyVim/commit/0567b37f61d5ad997793b950c38a6c8f73de3b9b)) * **luasnip:** disable nvim-snippets when luasnip is enabled. Fixes [#3547](https://github.com/LazyVim/LazyVim/issues/3547) ([aa059e0](https://github.com/LazyVim/LazyVim/commit/aa059e0d496e570f898644d3f18bc344ca179d38)) * **rust:** make neotest optional ([547dc76](https://github.com/LazyVim/LazyVim/commit/547dc76a12309d4dafc970ae08832140eae51cba)) * **typescript:** clean up configuration of the vscode dap extension ([#3556](https://github.com/LazyVim/LazyVim/issues/3556)) ([1c46f54](https://github.com/LazyVim/LazyVim/commit/1c46f544328b084753327a81b92e2b57ab568321)) * **typescript:** implemented move to new file. Fixes [#3534](https://github.com/LazyVim/LazyVim/issues/3534) ([d90930b](https://github.com/LazyVim/LazyVim/commit/d90930b13e4515a5f4e4f3892ac9f7c392c4f20c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45c72e6e..a0d7187f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## [12.11.0](https://github.com/LazyVim/LazyVim/compare/v12.10.0...v12.11.0) (2024-06-09) + + +### Features + +* **octo:** re-open octo windows when restoring session + cleanup ([7793942](https://github.com/LazyVim/LazyVim/commit/7793942ebafd32ef90f79e28979898f8013976ff)) + + +### Bug Fixes + +* **extra-lang-angular:** add BufNew event to attach angular treesitter ([#3522](https://github.com/LazyVim/LazyVim/issues/3522)) ([fbb1276](https://github.com/LazyVim/LazyVim/commit/fbb1276ffd45683d4d64a2d99907bdbd3421c16f)) +* **extras:** +prefix in which-key panel for visual mode ([#3537](https://github.com/LazyVim/LazyVim/issues/3537)) ([5185404](https://github.com/LazyVim/LazyVim/commit/51854046dbb0bacf690ddc217cc76bf98c8ec1aa)) +* **helm:** missing dependency ([#3546](https://github.com/LazyVim/LazyVim/issues/3546)) ([02dd65c](https://github.com/LazyVim/LazyVim/commit/02dd65cdea1ae34cdf4ca00b20760dbb3cfcd72b)) +* **lang:** neotest not loading rust tests ([#3544](https://github.com/LazyVim/LazyVim/issues/3544)) ([0567b37](https://github.com/LazyVim/LazyVim/commit/0567b37f61d5ad997793b950c38a6c8f73de3b9b)) +* **luasnip:** disable nvim-snippets when luasnip is enabled. Fixes [#3547](https://github.com/LazyVim/LazyVim/issues/3547) ([aa059e0](https://github.com/LazyVim/LazyVim/commit/aa059e0d496e570f898644d3f18bc344ca179d38)) +* **rust:** make neotest optional ([547dc76](https://github.com/LazyVim/LazyVim/commit/547dc76a12309d4dafc970ae08832140eae51cba)) +* **typescript:** clean up configuration of the vscode dap extension ([#3556](https://github.com/LazyVim/LazyVim/issues/3556)) ([1c46f54](https://github.com/LazyVim/LazyVim/commit/1c46f544328b084753327a81b92e2b57ab568321)) +* **typescript:** implemented move to new file. Fixes [#3534](https://github.com/LazyVim/LazyVim/issues/3534) ([d90930b](https://github.com/LazyVim/LazyVim/commit/d90930b13e4515a5f4e4f3892ac9f7c392c4f20c)) + ## [12.10.0](https://github.com/LazyVim/LazyVim/compare/v12.9.0...v12.10.0) (2024-06-07) From 65060ece6737299032598ddf7d3ff9a58640e49a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 10 Jun 2024 15:04:32 +0200 Subject: [PATCH 48/51] ci: pull request template --- .github/PULL_REQUEST_TEMPLATE.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..3dc0217b --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,15 @@ +# What is this PR for? + + + +## Does this PR fix an existing issue? + + + +## Checklist + +- [ ] I've read the [CONTRIBUTING](/CONTRIBUTING.md) guidelines. From 9d78a22252a6cfea551f6bc6bffae781e682159e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 10 Jun 2024 15:04:42 +0200 Subject: [PATCH 49/51] docs: added contributing --- CONTRIBUTING.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..16198586 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,28 @@ +# Contributing to LazyVim + +## General Guidelines + +- Avoid using Vim plugins whenever possible. +- If an extra requires a Vim plugin, explain why in the PR description. +- Ensure all configurations are overridable by the user, using Lazy's specs. +- Tag specs as `optional` if they should only be enabled when the user has them installed. +- Implement proper lazy-loading for every plugin added in an extra. +- Understand how Lazy's dependencies work. For Lua dependencies, do not specify + them in the `dependencies` field. Instead, add them as a separate spec with `lazy=true`. + +## Contributing an Extra Plugin + +- The plugin should be well-known and require significant configuration. +- Simple specs containing just the plugin with some options will not be accepted. + +## Contributing an Extra Language + +- The extra should include the setup most widely used by the community. +- Include Tree-sitter parsers that are not yet the default. +- Include the most widely used LSP server setup. +- Avoid the need for LSP wrapper packages whenever possible. +- Only add a formatter if it is typically used by the community instead of the LSP formatter. +- Only add extra linters if the community typically uses them instead of just the LSP linters. +- Every language extra requires a `recommended` section as part of the extra. + Check lspconfig server configurations for the proper filetypes and root directories. + Refer to other extras for creating the `recommended` section. From 4b1d39762773f60f35e73c32596610e360113a6a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 10 Jun 2024 13:05:24 +0000 Subject: [PATCH 50/51] 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 ad712151..3741c67c 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 June 09 +*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 June 10 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 4b7c389f14e06769fd4652f3dbf22ba2fb5ca8d7 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 10 Jun 2024 15:09:29 +0200 Subject: [PATCH 51/51] docs: fix link --- .github/PULL_REQUEST_TEMPLATE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 3dc0217b..c1b3225d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,4 +1,4 @@ -# What is this PR for? +## What is this PR for? @@ -12,4 +12,4 @@ ## Checklist -- [ ] I've read the [CONTRIBUTING](/CONTRIBUTING.md) guidelines. +- [ ] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines.