From 98e196b669672181f1cbd6d3c36d7e889af664f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Thu, 7 Mar 2024 21:47:39 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=91=EF=B8=8F=20remove(nvim):=20lazyrc;?= =?UTF-8?q?=20now=20using=20lazyvims=20one?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/nvim/lua/config/lazy.lua | 2 +- .../nvim/lua/plugins/extras/util/lazyrc.lua | 39 ------------------- 2 files changed, 1 insertion(+), 40 deletions(-) delete mode 100644 .config/nvim/lua/plugins/extras/util/lazyrc.lua diff --git a/.config/nvim/lua/config/lazy.lua b/.config/nvim/lua/config/lazy.lua index 3a20e1a1..a10b6b7d 100644 --- a/.config/nvim/lua/config/lazy.lua +++ b/.config/nvim/lua/config/lazy.lua @@ -12,7 +12,7 @@ require("lazy").setup({ -- add LazyVim and import its plugins { "LazyVim/LazyVim", import = "lazyvim.plugins" }, { import = "plugins" }, - { import = "plugins.extras.util.lazyrc" }, + { import = "lazyvim.plugins.extras.lazyrc" }, }, defaults = { -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. diff --git a/.config/nvim/lua/plugins/extras/util/lazyrc.lua b/.config/nvim/lua/plugins/extras/util/lazyrc.lua deleted file mode 100644 index 4ae88441..00000000 --- a/.config/nvim/lua/plugins/extras/util/lazyrc.lua +++ /dev/null @@ -1,39 +0,0 @@ ---[[ -Enable project-specific plugin specs. - -File .lazy.lua: - is read when present in the current working directory - should return a plugin spec - has to be manually trusted for each instance of the file - -This extra should be the last plugin spec added to lazy.nvim - -See: - :h 'exrc' - :h :trust ---]] -local filepath = vim.fn.fnamemodify(".lazy.lua", ":p") -local file = vim.secure.read(filepath) -if not file then - return {} -end - -vim.api.nvim_create_autocmd("User", { - pattern = "VeryLazy", - once = true, - callback = function() - local Config = require("lazy.core.config") - local Util = require("lazyvim.util") - local lazyrc_idx = Util.plugin.extra_idx("lazyrc") - - if lazyrc_idx and lazyrc_idx ~= #Config.spec.modules then - Util.warn({ - "The `lazyrc` extra must be the last plugin spec added to **lazy.nvim**. ", - "", - "Add `{ import = 'lazyvim.plugins.extras.lazyrc' }` to file `config.lazy`. ", - "Do not use the `LazyExtras` command. ", - }, { title = "LazyVim", once = true }) - end - end, -}) -return loadstring(file)()