自动跳转
vscode 插件好多好多,多到让人头花脑胀。而我最讨厌的就是 C、C++ 无法自动跳转了。 不过还好现在有了 clangd 插件,可以更好的自动跳转了。
虽然插件很好,但是还是配置还是有门槛。
如果是 cmake 系统,应该使用这样的方式
1
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1
如果就只有 Makefile,那么应该使用
1
bear -- make
Lua 配置
Navigate to a directory where you want to store the type definitions
1
2
3
mkdir -p ~/.local/share/lua-language-server/meta
cd ~/.local/share/lua-language-server/meta
git clone https://github.com/LuaCATS/openresty
Config vscode
Press ctrl + shift + p and then type Preferences: Open User Settings (JSON)
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
{
"cSpell.userWords": [
"cjson",
"lrucache",
"resty",
"aliyun",
"addrs",
"httpc",
"HTTPDNS",
"receiveany",
"preread",
"NOAUTH",
"nbytes",
"plen",
"atyp",
"mbits",
"agentzh",
"lshift",
"rshift",
"tohex",
"cdef",
"settimeout",
"settimeouts",
"shdict",
"lmdb",
"nkeys"
],
"Lua.workspace.library": [
"${3rd}/openresty/library"
],
"Lua.diagnostics.globals": ["ngx"],
"Lua.runtime.version": "LuaJIT",
}