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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
return {
{
"neovim/nvim-lspconfig",
lazy = false,
config = function()
vim.lsp.set_log_level("debug")
local nvim_lsp = require('lspconfig')
nvim_lsp.clangd.setup({
enure_installed = { "lua_ls"},
cmd = {
"clangd",
--"--query-driver=*arm-none-eabi*",
-- NOTE:使用如下绝对路径时反而无效
-- "--query-driver=${path_to_compiler}\\gcc-arm-none-eabi\\12.2.rel1\\bin\\arm-none-eabi*",
},
filetypes = { "c", "cpp", "objc", "objcpp", "cuda", "proto" },
})
nvim_lsp.lua_ls.setup({
cmd = {'lua-language-server'};
settings = {
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = 'LuaJIT',
-- Setup your lua path
path = vim.split(package.path, ';'),
},
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = {'vim'},
},
--workspace = {
-- -- Make the server aware of Neovim runtime files
-- library = {
-- [vim.fn.expand('$VIMRUNTIME/lua')] = true,
-- [vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true,
-- },
--},
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = {
enable = false,
},
},
}
},
})
--gopls for go
nvim_lsp.gopls.setup({
cmd = {'gopls'};
--settings = {
-- gopls = {
-- --ui = {
-- -- completion = {
-- -- usePlaceholders = true,
-- -- },
-- --},
-- },
--}
})
end
}
}
|