在vim运行zls时,会提示找不到zls.json
可以通过zls config来配置
Welcome to the ZLS configuration wizard!
*
|\
/* \
| *\
_/_*___|_ x
| @ @ /
@ \ /
\__-/ /
? Should this configuration be system-wide? (y/n) > y
Found zig executable '/root/zig/zig-linux/zig' in PATH.
? Which code editor do you use? (select one)
- VSCode
- Sublime
- Kate
- Neovim
- Vim8
- Emacs
- Doom
- Other
> vim8
? Do you want to enable snippets? (y/n) > Y
? Do you want to enable snippets? (y/n) > y
? Do you want to enable style warnings? (y/n) > y
? Do you want to enable semantic highlighting? (y/n) > y
? Do you want to enable .* and .? completions? (y/n) > y
Writing config to /etc/zls.json ... successful.
To use ZLS in Neovim/Vim8, we recommend using CoC engine.
You can get it from
Then, simply issue cmd from Neovim/Vim8 `:CocConfig`, and add this to your CoC config:
{
"languageserver": {
"zls" : {
"command": "command_or_path_to_zls",
"filetypes": ["zig"]
}
}
}
Thank you for choosing ZLS!
You have new mail in /var/spool/mail/root
[root@server232 zls]# cat /etc/zls.json
{"zig_exe_path":"/root/zig/zig-linux/zig","enable_snippets":true,"warn_style":true,"enable_semantic_tokens":true,"operator_completions":true,"include_at_in_builtins":false,"max_detail_length":1048576}
阅读(280) | 评论(0) | 转发(0) |