From 962d79f5b482d79f044daa6ff2df047623063b44 Mon Sep 17 00:00:00 2001 From: QQ Date: Thu, 5 Oct 2023 23:21:33 +0800 Subject: [PATCH] wqe --- init.lua | 2 -- lua/G.lua | 26 ++++++++++++++++++++++++++ lua/plugsettings.lua | 25 ------------------------- 3 files changed, 26 insertions(+), 27 deletions(-) diff --git a/init.lua b/init.lua index c3abf23..5d6308c 100644 --- a/init.lua +++ b/init.lua @@ -1,7 +1,5 @@ G = require('G') -require('plugsettings') - if G.g.vscode then require('vscode.vscode') else diff --git a/lua/G.lua b/lua/G.lua index 403e64b..f58a611 100644 --- a/lua/G.lua +++ b/lua/G.lua @@ -44,4 +44,30 @@ end G.g.mapleader = ' ' +local lazypath = G.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not G.loop.fs_stat(lazypath) then + G.fn.system({ + "git", + "clone", + "--filter=blob:none", + "http://git.qqnewbie.top/newbieQQ/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) +end + +G.opt.rtp:prepend(lazypath) + +local normalplugs = require('normal.plug') +local vscodeplugs = require('vscode.plug') +local neovimplugs = require('neovim.plug') + +if G.g.vscode then + plugs = {vscodeplugs, normalplugs} +else + plugs = {neovimplugs, normalplugs} +end + +require("lazy").setup(plugs) + return G diff --git a/lua/plugsettings.lua b/lua/plugsettings.lua index 90921a2..e69de29 100644 --- a/lua/plugsettings.lua +++ b/lua/plugsettings.lua @@ -1,25 +0,0 @@ -local lazypath = G.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not G.loop.fs_stat(lazypath) then - G.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) -end - -G.opt.rtp:prepend(lazypath) - -local normalplugs = require('normal.plug') -local vscodeplugs = require('vscode.plug') -local neovimplugs = require('neovim.plug') - -if G.g.vscode then - plugs = {vscodeplugs, normalplugs} -else - plugs = {neovimplugs, normalplugs} -end - -require("lazy").setup(plugs)