From a0afe8fef9dc76b469a78435cdd3f2c5ee01f282 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 12 May 2024 18:23:14 +0200 Subject: [PATCH 1/9] fix(dot): remove `.env` => `sh` since this is already the default --- lua/lazyvim/plugins/extras/util/dot.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/util/dot.lua b/lua/lazyvim/plugins/extras/util/dot.lua index d12171f5..ad4e2278 100644 --- a/lua/lazyvim/plugins/extras/util/dot.lua +++ b/lua/lazyvim/plugins/extras/util/dot.lua @@ -35,7 +35,6 @@ return { vim.filetype.add({ extension = { rasi = "rasi", rofi = "rasi", wofi = "rasi" }, filename = { - [".env"] = "sh", ["vifmrc"] = "vim", }, pattern = { From e89653f4107724f53964a379337947490117a7dc Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 12 May 2024 22:08:13 +0200 Subject: [PATCH 2/9] fix(pretty_path): properly escape `%` characters --- lua/lazyvim/util/lualine.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/util/lualine.lua b/lua/lazyvim/util/lualine.lua index 757ddb01..3e546873 100644 --- a/lua/lazyvim/util/lualine.lua +++ b/lua/lazyvim/util/lualine.lua @@ -46,6 +46,7 @@ end ---@param hl_group? string ---@return string function M.format(component, text, hl_group) + text = text:gsub("%%", "%%%%") if not hl_group or hl_group == "" then return text end From f4490252fb2262208923ba197eb521732a602ac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=B5=20Quang=20Chi=E1=BA=BFn?= <87252943+2giosangmitom@users.noreply.github.com> Date: Mon, 13 May 2024 03:10:32 +0700 Subject: [PATCH 3/9] feat(vue): add Vue.js support to LazyVim (#3094) --- lua/lazyvim/plugins/extras/lang/vue.lua | 46 +++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/lang/vue.lua diff --git a/lua/lazyvim/plugins/extras/lang/vue.lua b/lua/lazyvim/plugins/extras/lang/vue.lua new file mode 100644 index 00000000..a943874b --- /dev/null +++ b/lua/lazyvim/plugins/extras/lang/vue.lua @@ -0,0 +1,46 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "vue" }) + end + end, + }, + + { + "neovim/nvim-lspconfig", + opts = function(_, opts) + local vue_typescript_plugin = require("mason-registry").get_package("vue-language-server"):get_install_path() + .. "/node_modules/@vue/language-server" + .. "/node_modules/@vue/typescript-plugin" + + opts.servers = vim.tbl_deep_extend("force", opts.servers, { + volar = {}, + -- Volar 2.0 has discontinued their "take over mode" which in previous version provided support for typescript in vue files. + -- The new approach to get typescript support involves using the typescript language server along side volar. + tsserver = { + init_options = { + plugins = { + -- Use typescript language server along with vue typescript plugin + { + name = "@vue/typescript-plugin", + location = vue_typescript_plugin, + languages = { "javascript", "typescript", "vue" }, + }, + }, + }, + filetypes = { + "javascript", + "javascriptreact", + "javascript.jsx", + "typescript", + "typescriptreact", + "typescript.tsx", + "vue", + }, + }, + }) + end, + }, +} From 73de8dde2bb513337426d5ead862e4fc6dbb8fdf Mon Sep 17 00:00:00 2001 From: Rubin Bhandari Date: Mon, 13 May 2024 01:57:05 +0545 Subject: [PATCH 4/9] feat(extras): add refactoring.nvim (#3040) * feat(editor): add refactoring.nvim More on: https://github.com/ThePrimeagen/refactoring.nvim#features * Update lua/lazyvim/plugins/extras/editor/refactoring.lua Co-authored-by: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> * Update lua/lazyvim/plugins/extras/editor/refactoring.lua Co-authored-by: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> * indent fixes --------- Co-authored-by: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> --- .../plugins/extras/editor/refactoring.lua | 125 ++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/editor/refactoring.lua diff --git a/lua/lazyvim/plugins/extras/editor/refactoring.lua b/lua/lazyvim/plugins/extras/editor/refactoring.lua new file mode 100644 index 00000000..e5852a3c --- /dev/null +++ b/lua/lazyvim/plugins/extras/editor/refactoring.lua @@ -0,0 +1,125 @@ +return { + { + "ThePrimeagen/refactoring.nvim", + event = { "BufReadPre", "BufNewFile" }, + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-treesitter/nvim-treesitter", + }, + keys = { + { + "rs", + function() + require("telescope").extensions.refactoring.refactors() + end, + mode = "v", + desc = "Refactor", + }, + { + "ri", + function() + require("refactoring").refactor("Inline Variable") + end, + mode = { "n", "v" }, + desc = "Inline Variable", + }, + { + "rb", + function() + require("refactoring").refactor("Extract Block") + end, + desc = "Extract Block", + }, + { + "rf", + function() + require("refactoring").refactor("Extract Block To File") + end, + desc = "Extract Block To File", + }, + { + "rP", + function() + require("refactoring").debug.printf({ below = false }) + end, + desc = "Debug Print", + }, + { + "rp", + function() + require("refactoring").debug.print_var({ normal = true }) + end, + desc = "Debug Print Variable", + }, + { + "rc", + function() + require("refactoring").debug.cleanup({}) + end, + desc = "Debug Cleanup", + }, + { + "rf", + function() + require("refactoring").refactor("Extract Function") + end, + mode = "v", + desc = "Extract Function", + }, + { + "rF", + function() + require("refactoring").refactor("Extract Function To File") + end, + mode = "v", + desc = "Extract Function To File", + }, + { + "rx", + function() + require("refactoring").refactor("Extract Variable") + end, + mode = "v", + desc = "Extract Variable", + }, + { + "rp", + function() + require("refactoring").debug.print_var() + end, + mode = "v", + desc = "Debug Print Variable", + }, + }, + opts = { + prompt_func_return_type = { + go = false, + java = false, + cpp = false, + c = false, + h = false, + hpp = false, + cxx = false, + }, + prompt_func_param_type = { + go = false, + java = false, + cpp = false, + c = false, + h = false, + hpp = false, + cxx = false, + }, + printf_statements = {}, + print_var_statements = {}, + }, + config = function(_, opts) + require("refactoring").setup(opts) + if LazyVim.has("telescope.nvim") then + LazyVim.on_load("telescope.nvim", function() + require("telescope").load_extension("refactoring") + end) + end + end, + }, +} From 8087283fea62e5673764dfa13906eadb24110622 Mon Sep 17 00:00:00 2001 From: Akira Itai Date: Sun, 12 May 2024 22:03:10 -0700 Subject: [PATCH 5/9] fix(rust): update creates.nvim src option to completion (#3149) --- lua/lazyvim/plugins/extras/lang/rust.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/rust.lua b/lua/lazyvim/plugins/extras/lang/rust.lua index 8a665c6c..6fe9e88e 100644 --- a/lua/lazyvim/plugins/extras/lang/rust.lua +++ b/lua/lazyvim/plugins/extras/lang/rust.lua @@ -8,7 +8,7 @@ return { "Saecki/crates.nvim", event = { "BufRead Cargo.toml" }, opts = { - src = { + completion = { cmp = { enabled = true }, }, }, From 36b59b26088d240815ddcb0f76160a72ea2495a6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 13 May 2024 05:03:43 +0000 Subject: [PATCH 6/9] 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 6460b1fa..53beed41 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 May 12 +*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 May 13 ============================================================================== Table of Contents *LazyVim-table-of-contents* From c54eeb53905e8da27814f52eaf1ad63aeff4cbe4 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Mon, 13 May 2024 09:20:34 +0300 Subject: [PATCH 7/9] fix(lazyfile): exclude `filetypedetect` from skips (#3004) --- lua/lazyvim/util/plugin.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/util/plugin.lua b/lua/lazyvim/util/plugin.lua index a8e784b6..13a2acec 100644 --- a/lua/lazyvim/util/plugin.lua +++ b/lua/lazyvim/util/plugin.lua @@ -86,7 +86,11 @@ function M.lazy_file() ---@type table local skips = {} for _, event in ipairs(events) do - skips[event.event] = skips[event.event] or Event.get_augroups(event.event) + local augroups = Event.get_augroups(event.event) + local groups = vim.tbl_filter(function(t) + return not vim.tbl_contains({ t }, "filetypedetect") + end, augroups) + skips[event.event] = skips[event.event] or groups end vim.api.nvim_exec_autocmds("User", { pattern = "LazyFile", modeline = false }) From abb1ff0d600b3446b612390f0482cf92bdc84ab0 Mon Sep 17 00:00:00 2001 From: Jordan McAlpine <128929391+mickalpine@users.noreply.github.com> Date: Mon, 13 May 2024 02:21:33 -0400 Subject: [PATCH 8/9] fix(ansible): ansiblels not loading, keymap desc. (#2739) If lazy extras yaml is enabled, yamlls was being loaded not ansiblels. Add ft = {} to nvim-ansible spec allows ft=yaml.ansible to be detected. Re-mapped nvim-ansible plugin key to not conflict with neotest. Added a description for the keymap. --- lua/lazyvim/plugins/extras/lang/ansible.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/ansible.lua b/lua/lazyvim/plugins/extras/lang/ansible.lua index 301fa494..d1112115 100644 --- a/lua/lazyvim/plugins/extras/lang/ansible.lua +++ b/lua/lazyvim/plugins/extras/lang/ansible.lua @@ -25,12 +25,14 @@ return { }, { "mfussenegger/nvim-ansible", + ft = {}, keys = { { - "tr", + "ta", function() require("ansible").run() end, + desc = "Ansible Run Playbook/Role", silent = true, }, }, From 39901c1f00eca36beb211978164744ae41be7781 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 13 May 2024 08:53:17 +0200 Subject: [PATCH 9/9] fix(fzf-native): try rebuilding fzf-native when needed. Fixes #2464 --- lua/lazyvim/plugins/editor.lua | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index c25537f4..907d2dc0 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -1,3 +1,6 @@ +local have_make = vim.fn.executable("make") == 1 +local have_cmake = vim.fn.executable("cmake") == 1 + return { -- file explorer @@ -141,12 +144,23 @@ return { dependencies = { { "nvim-telescope/telescope-fzf-native.nvim", - build = vim.fn.executable("make") == 1 and "make" + build = have_make and "make" or "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build", - enabled = vim.fn.executable("make") == 1 or vim.fn.executable("cmake") == 1, - config = function() + enabled = have_make or have_cmake, + config = function(plugin) LazyVim.on_load("telescope.nvim", function() - require("telescope").load_extension("fzf") + local ok, err = pcall(require("telescope").load_extension, "fzf") + if not ok then + local lib = plugin.dir .. "/build/libfzf." .. (LazyVim.is_win() and "dll" or "so") + if not vim.uv.fs_stat(lib) then + LazyVim.warn("`telescope-fzf-native.nvim` not built. Rebuilding...") + require("lazy").build({ plugins = { plugin }, show = false }):wait(function() + LazyVim.info("Rebuilding `telescope-fzf-native.nvim` done.\nPlease restart Neovim.") + end) + else + LazyVim.error("Failed to load `telescope-fzf-native.nvim`:\n" .. err) + end + end end) end, },