From b0c72897dcd90dec0afd56a6ed658089036cc748 Mon Sep 17 00:00:00 2001 From: QQ Date: Sat, 7 Oct 2023 10:49:13 +0800 Subject: [PATCH] asd --- init.lua | 36 ++++++++++++++++++++++++++++++++++++ install | 24 ------------------------ lua/G.lua | 24 ------------------------ 3 files changed, 36 insertions(+), 48 deletions(-) delete mode 100755 install diff --git a/init.lua b/init.lua index 5d6308c..edea048 100644 --- a/init.lua +++ b/init.lua @@ -1,5 +1,41 @@ G = require('G') +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, + }) + + G.fn.system({ + "git", + "config", + "--global", + "credential.helper", + "store", + }) + +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) + if G.g.vscode then require('vscode.vscode') else diff --git a/install b/install deleted file mode 100755 index a9029d4..0000000 --- a/install +++ /dev/null @@ -1,24 +0,0 @@ -if [ -f /etc/lsb-release ]; then - - echo "This linux is Ubuntu!!!" - - # 安装neovim - apt install software-properties-common - add-apt-repository ppa:neovim-ppa/unstable - apt update && apt upgrade -y && apt install neovim -y - - - # 安装nodejs(lsp 用得到) - curl -sL https://deb.nodesource.com/setup_18.x | bash - - apt update && apt upgrade -y && apt install nodejs -y - - # 安装python3 - - git config --global credential.helper store -else - - echo "This linux is Archlinux!!!" - sudo pacman -S --needed --noconfirm neovim nodejs -fi - - diff --git a/lua/G.lua b/lua/G.lua index f58a611..1614fe8 100644 --- a/lua/G.lua +++ b/lua/G.lua @@ -44,30 +44,6 @@ 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