Skip to content
This repository was archived by the owner on Nov 12, 2022. It is now read-only.

Commit be7c10b

Browse files
committed
old setup
1 parent 090c8a8 commit be7c10b

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

a.lua

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
local lsp_installer = require("nvim-lsp-installer")
2+
3+
lsp_installer.settings {
4+
ui = {
5+
icons = {
6+
server_installed = "",
7+
server_pending = "",
8+
server_uninstalled = "",
9+
},
10+
},
11+
}
12+
13+
local function on_attach(client, bufnr)
14+
-- set up buffer keymaps, etc.
15+
end
16+
17+
lsp_installer.on_server_ready(function (server)
18+
local opts = {
19+
on_attach = on_attach
20+
}
21+
22+
if server.name == "tsserver" then
23+
local tsutils = require "nvim-lsp-ts-utils"
24+
opts.init_options = { hostInfo = "neovim" }
25+
opts.on_attach = function (client, bufnr)
26+
tsutils.setup {}
27+
tsutils.setup_client(client)
28+
end
29+
elseif server.name == "sumneko_lua" then
30+
opts.settings = {
31+
Lua = {
32+
diagnostics = {
33+
globals = { "vim" }
34+
}
35+
}
36+
}
37+
end
38+
39+
server:setup(opts)
40+
end)

0 commit comments

Comments
 (0)