commit | 3bda0cc2c07f6330b543be2c12c5e156847ba94e | [log] [tgz] |
---|---|---|
author | bors <bors@rust-lang.org> | Fri Oct 18 11:23:05 2024 +0000 |
committer | bors <bors@rust-lang.org> | Fri Oct 18 11:23:05 2024 +0000 |
tree | adf37437f58907c123f4ce856d0f650c8a7d3fbf | |
parent | a40c399a3f47b32c50b4e0b2d30475f8295a6ebf [diff] | |
parent | d42a4e6c8848a40ba332d06890fc897c88a0af09 [diff] |
Auto merge of #18243 - krobelus:clamp-position-character, r=Veykril Clamp Position::character to line length LSP says about Position::character > If the character value is greater than the line length it defaults back to the line length. but from_proto::offset() doesn't implement this. A client might for example request code actions for a whole line by sending Position::character=99999. I don't think there is ever a reason (besides laziness) why the client can't specify the line length instead but I guess we should not crash but follow protocol. Not sure how to update Cargo.lock (lib/README.md doesn't say how). Fixes #18240
rust-analyzer is a modular compiler frontend for the Rust language. It is a part of a larger rls-2.0 effort to create excellent IDE support for Rust.
https://rust-analyzer.github.io/manual.html#installation
If you want to contribute to rust-analyzer check out the CONTRIBUTING.md or if you are just curious about how things work under the hood, check the ./docs/dev folder.
If you want to use rust-analyzer's language server with your editor of choice, check the manual folder. It also contains some tips & tricks to help you be more productive when using rust-analyzer.
See the corresponding sections of the manual.
For usage and troubleshooting requests, please use “IDEs and Editors” category of the Rust forum:
https://users.rust-lang.org/c/ide/14
For questions about development and implementation, join rust-analyzer working group on Zulip:
https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer
rust-analyzer is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT for details.