Fork by https://github.com/estin/simple-completion-language-server
具体改动请参考 #6 该 PR
zed 插件仓库: https://github.com/d1y/simple-completion-zed
暂时可以用这个过渡一下, 还是等官方支持这些功能吧
| 路径提示 | 代码片段 |
|---|---|
![]() |
![]() |
Homebrew:
brew tap d1ylab/homebrew-tap
brew install sclsFrom GitHub:
$ cargo install --git https://github.com/d1y/sclsFrom local repository:
$ git clone https://github.com/d1y/scls
$ cd scls
$ cargo install --path .zed-editor:
代码片段目录在 ~/.scls/snippets, 示例(~/.scls/snippets/go.toml):
[[snippets]]
prefix = "err"
scope = [ "go" ]
body = "if err := $1; err != nil {\n\t$2\t\n}"
[[snippets]]
prefix = "td"
scope = [ "javascript", "typescript", "go", "rust", "vue" ]
body = "// TODO: impl this"
[[snippets]]
prefix = "fx"
scope = [ "javascript", "typescript", "go", "rust", "vue" ]
body = "// FIXME: $1"可以使用
simple-completion-language-server fetch-snippets命令来调用 Nodejs 自动拉取 https://github.com/rafamadriz/friendly-snippets 仓库代码片段(它会自动生成配置文件)

