Skip to content

Commit 989ceaf

Browse files
authored
chore: version 0.2.1 (#97)
* fix:(rust) auto install rust-analyzer * chore: version v0.2.1
1 parent a7ed01e commit 989ceaf

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

lang/rust/repo.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,15 @@ next:
8686
}
8787

8888
func GetDefaultLSP() (lang uniast.Language, name string) {
89-
return uniast.Rust, "rust-analyzer"
89+
if _, err := exec.LookPath("rust-analyzer"); err == nil {
90+
return uniast.Rust, "rust-analyzer"
91+
}
92+
name, err := InstallLanguageServer()
93+
if err != nil {
94+
log.Error("Failed to install rust-analyzer: %v\n", err)
95+
os.Exit(1)
96+
}
97+
return uniast.Rust, name
9098
}
9199

92100
func GetLastCommitTime(repo string) time.Time {

version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
package main
1818

1919
const (
20-
Version = "0.2.0"
20+
Version = "0.2.1"
2121
)

0 commit comments

Comments
 (0)