nvim/init.lua

33 lines
733 B
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

G = require('G')
-- 安装/定位 lazy.nvimVSCode 和原生 Neovim 都需要)
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',
lazypath,
})
end
G.opt.rtp:prepend(lazypath)
require('keymap')
if G.g.vscode then
require('vscode')
else
require('options')
local clone_prefix = G.use_ssh and 'git@github.com:%s.git' or 'https://github.com/%s.git'
require('lazy').setup(
require('plugs'), {
lockfile = G.fn.stdpath('data') .. '/lazy/lazy-lock.json',
git = {
url_format = clone_prefix,
}
}
)
end