-
-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathinit_pack.lua
52 lines (47 loc) · 1.26 KB
/
init_pack.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
-- init.lua
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"
local Plugin_folder
local host = os.getenv("HOST_NAME")
if host and (host:find("Ray") or host:find("ray")) then
Plugin_folder = [[~/github/ray-x/]] -- vim.fn.expand("$HOME") .. '/github/'
else
Plugin_folder = [[ray-x/]]
end
local function load_plugins()
require("packer").startup({
function(use)
use({ "wbthomason/packer.nvim" })
use({
"neovim/nvim-lspconfig",
config = function()
require("lspconfig").gopls.setup({})
end,
})
use({ Plugin_folder .. "lsp_signature.nvim" })
end,
config = {
package_root = package_root,
compile_path = install_path .. "/plugin/packer_compiled.lua",
},
})
end
if vim.fn.isdirectory(install_path) == 0 then
vim.fn.system({
"git",
"clone",
"https://github.com/wbthomason/packer.nvim",
install_path,
})
load_plugins()
require("packer").sync()
else
load_plugins()
end
vim.cmd("colorscheme murphy")
vim.cmd("syntax on")
require("lspconfig").tsserver.setup({})
require("lspconfig").sumneko_lua.setup({})
require("lsp_signature").setup({})