Commit e593da1
committed
Don't respond to LSP requests before startup.
A common error found while using emacs + lsp-mode + rust-analyzer is
that on startup I receive the following logs:
```
LSP :: Error from the Language Server: waiting for cargo metadata or
cargo check (Unknown error) [4 times]
```
This looks similar to rust-lang#10910, and as some people mention, everything
works well once `cargo metadata` finishes running.
I stumbled accross a [helpful
comment](https://github.com/rust-lang/rust-analyzer/blob/d382e24a11c8706b201c8437894506d191691334/crates/rust-analyzer/src/main_loop.rs#L567-L568)
which made me think that it might be worth waiting for startup to
finish, before attempting to respond to LSP requests.1 parent 50ed1a5 commit e593da1
1 file changed
+23
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
157 | 167 | | |
158 | 168 | | |
159 | 169 | | |
| |||
166 | 176 | | |
167 | 177 | | |
168 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
169 | 192 | | |
170 | 193 | | |
171 | 194 | | |
| |||
0 commit comments