zed icon indicating copy to clipboard operation
zed copied to clipboard

rust lsp error?

Open 0x2CA opened this issue 10 months ago • 3 comments

Check for existing issues

  • [X] Completed

Describe the bug / provide steps to reproduce it

clone main, open any rs file. build and run successes image

Environment

Zed: v0.131.4 (Zed Preview) OS: macOS 14.2.1 Memory: 32 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

{"jsonrpc":"2.0","id":84,"result":[{"title":"Flip comma","kind":"refactor.rewrite","data":{"codeActionParams":{"textDocument":{"uri":"file:///Users/0x2ca/WorkSpace/Rust/zed/crates/editor/src/element.rs"},"range":{"start":{"line":3024,"character":52},"end":{"line":3024,"character":52}},"context":{"diagnostics":[{"range":{"start":{"line":3024,"character":38},"end":{"line":3024,"character":52}},"severity":1,"code":"E0599","source":"rustc","message":"no variant or associated item named `MediumAbsolute` found for enum `TimestampFormat` in the current scope\nvariant or associated item not found in `TimestampFormat`"}],"only":["","quickfix","refactor","refactor.extract","source"]}},"id":"flip_comma:RefactorRewrite:0"}},{"title":"Replace qualified path with use","kind":"refactor.rewrite","data":{"codeActionParams":{"textDocument":{"uri":"file:///Users/0x2ca/WorkSpace/Rust/zed/crates/editor/src/element.rs"},"range":{"start":{"line":3024,"character":52},"end":{"line":3024,"character":52}},"context":{"diagnostics":[{"range":{"start":{"line":3024,"character":38},"end":{"line":3024,"character":52}},"severity":1,"code":"E0599","source":"rustc","message":"no variant or associated item named `MediumAbsolute` found for enum `TimestampFormat` in the current scope\nvariant or associated item not found in `TimestampFormat`"}],"only":["","quickfix","refactor","refactor.extract","source"]}},"id":"replace_qualified_name_with_use:RefactorRewrite:1"}},{"title":"Extract into variable","kind":"refactor.extract","data":{"codeActionParams":{"textDocument":{"uri":"file:///Users/0x2ca/WorkSpace/Rust/zed/crates/editor/src/element.rs"},"range":{"start":{"line":3024,"character":52},"end":{"line":3024,"character":52}},"context":{"diagnostics":[{"range":{"start":{"line":3024,"character":38},"end":{"line":3024,"character":52}},"severity":1,"code":"E0599","source":"rustc","message":"no variant or associated item named `MediumAbsolute` found for enum `TimestampFormat` in the current scope\nvariant or associated item not found in `TimestampFormat`"}],"only":["","quickfix","refactor","refactor.extract","source"]}},"id":"extract_variable:RefactorExtract:2"}}]}

0x2CA avatar Apr 16 '24 06:04 0x2CA

Hey @0x2CA - If you run editor: restart language server, does it come back? What happens if you do a cargo clean and then restart the language server?

JosephTLyons avatar Apr 16 '24 17:04 JosephTLyons

Hey @0x2CA - If you run editor: restart language server, does it come back? What happens if you do a cargo clean and then restart the language server?

hi cargo clean is no effect,I realized that editor: restart language server was suddenly missing from the command.In the old version I used it

https://github.com/zed-industries/zed/assets/19868292/fb477406-43ee-4e89-a580-b178fbcff872

now the tips is misplaced

image

0x2CA avatar Apr 17 '24 00:04 0x2CA

execute editor: restart language server is now no errors ,but it seems that a new problem has now been discovered, the this seems to be a command matching issue?

0x2CA avatar Apr 17 '24 01:04 0x2CA

image

Now it's happening again and restarting the lsp service doesn't help

0x2CA avatar Apr 30 '24 06:04 0x2CA

@0x2CA Are you still seeing this issue or was it resolved?

notpeter avatar Jun 20 '24 14:06 notpeter

There is a certain serendipity to this problem, it doesn't always appear, I was only having it from time to time and haven't noticed it happening lately, I'm shutting it down for now until it reappears

0x2CA avatar Jun 21 '24 01:06 0x2CA

image There still seems to be a problem.

0x2CA avatar Jun 21 '24 04:06 0x2CA