This commit is contained in:
QQ 2023-10-02 22:05:38 +08:00
parent c1541c6e2e
commit e084437b4d
4 changed files with 43 additions and 23 deletions

View File

@ -1,21 +1,8 @@
local G = require('G') G = require('G')
local lazypath = G.fn.stdpath("data") .. "/lazy/lazy.nvim" require('plugsettings')
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) if G.g.vscode then
if vim.g.vscode then
require('vscode.vscode') require('vscode.vscode')
else else
require('neovim.neovim') require('neovim.neovim')

View File

@ -1,11 +1,14 @@
if [ -f /etc/lsb-release ]; then if [ -f /etc/lsb-release ]; then
echo "This linux is Ubuntu!!!" echo "This linux is Ubuntu!!!"
# 安装neovim
apt install software-properties-common apt install software-properties-common
add-apt-repository ppa:neovim-ppa/unstable add-apt-repository ppa:neovim-ppa/unstable
apt update && apt upgrade -y && apt install neovim -y apt update && apt upgrade -y && apt install neovim -y
# 安装nodejslsp 用得到)
curl -sL https://deb.nodesource.com/setup_lts.x | bash - curl -sL https://deb.nodesource.com/setup_lts.x | bash -
apt update && apt upgrade -y && apt install nodejs -y apt update && apt upgrade -y && apt install nodejs -y

View File

@ -1,12 +1,13 @@
local G = {} local G = {}
G.g = vim.g G.g = vim.g
G.b = vim.b G.b = vim.b
G.o = vim.o G.o = vim.o
G.fn = vim.fn G.fn = vim.fn
G.api = vim.api G.api = vim.api
G.opt = vim.opt G.opt = vim.opt
G.loop = vim.loop G.loop = vim.loop
G.lb = vim.lsp.buf
function G.map(maps) function G.map(maps)
for _,map in pairs(maps) do for _,map in pairs(maps) do

View File

@ -1,3 +1,32 @@
return { return {
'neovim/nvim-lspconfig', {
'neovim/nvim-lspconfig',
config = function()
local lsp = require('lspconfig')
require'lspconfig'.pyright.setup{}
-- lsp.lua_ls.setup{}
-- local opts = {buffer = ev.buf}
G.map({
-- G.lb = vim.lsp.buf
-- { 'n', 'gD', G.lb.declaration, opts},
-- { 'n', 'gd', G.lb.definition, opts},
-- { 'n', 'gi', G.lb.implementation, opts},
})
end,
},
{
'hrsh7th/nvim-cmp',
dependencies = {
'hrsh7th/cmp-cmdline',
'hrsh7th/cmp-path',
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-nvim-lsp',
},
},
{
'williamboman/mason.nvim',
},
} }