2022-03-04 06:26:43 +00:00
|
|
|
vim.cmd([[set runtimepath=$VIMRUNTIME]])
|
|
|
|
vim.cmd([[set packpath=/tmp/nvim/site]])
|
|
|
|
|
|
|
|
local package_root = '/tmp/nvim/site/pack'
|
|
|
|
local install_path = package_root .. '/packer/start/packer.nvim'
|
|
|
|
vim.g.coq_settings = {
|
|
|
|
['auto_start'] = 'shut-up',
|
|
|
|
}
|
|
|
|
|
|
|
|
local function load_plugins()
|
|
|
|
require('packer').startup({
|
|
|
|
function(use)
|
|
|
|
use('wbthomason/packer.nvim')
|
|
|
|
use('neovim/nvim-lspconfig')
|
|
|
|
use({
|
|
|
|
'williamboman/nvim-lsp-installer',
|
|
|
|
config = function()
|
|
|
|
local lsp_installer = require('nvim-lsp-installer')
|
2022-06-12 10:44:20 +00:00
|
|
|
lsp_installer.setup{}
|
2022-03-04 06:26:43 +00:00
|
|
|
end,
|
|
|
|
})
|
|
|
|
use({
|
|
|
|
'ray-x/navigator.lua',
|
|
|
|
config = function()
|
|
|
|
require('navigator').setup({
|
2022-03-10 22:03:28 +00:00
|
|
|
debug = true,
|
2022-03-04 06:26:43 +00:00
|
|
|
lsp_installer = true,
|
2022-03-10 22:03:28 +00:00
|
|
|
keymaps = { { key = 'gR', func = "require('navigator.reference').async_ref()" } },
|
2022-03-04 06:26:43 +00:00
|
|
|
})
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
use('ray-x/guihua.lua')
|
|
|
|
-- -- COQ (Autocompletion)
|
|
|
|
use('ms-jpq/coq_nvim')
|
|
|
|
use('ms-jpq/coq.artifacts')
|
|
|
|
use('ms-jpq/coq.thirdparty')
|
|
|
|
use('ray-x/aurora')
|
|
|
|
end,
|
|
|
|
config = {
|
|
|
|
package_root = package_root,
|
|
|
|
compile_path = install_path .. '/plugin/packer_compiled.lua',
|
|
|
|
},
|
|
|
|
})
|
|
|
|
-- navigator/LSP setup
|
|
|
|
end
|
|
|
|
|
|
|
|
if vim.fn.isdirectory(install_path) == 0 then
|
|
|
|
print('install packer')
|
|
|
|
vim.fn.system({
|
|
|
|
'git',
|
|
|
|
'clone',
|
|
|
|
'https://github.com/wbthomason/packer.nvim',
|
|
|
|
install_path,
|
|
|
|
})
|
|
|
|
load_plugins()
|
|
|
|
require('packer').sync()
|
|
|
|
vim.cmd('colorscheme aurora')
|
|
|
|
else
|
|
|
|
load_plugins()
|
|
|
|
vim.cmd('colorscheme aurora')
|
|
|
|
end
|