mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Semantic highlighting spike
Very simple approach: For each identifier, set the hash of the range where it's defined as its 'id' and use it in the VSCode extension to generate unique colors. Thus, the generated colors are per-file. They are also quite fragile, and I'm not entirely sure why. Looks like we need to make sure the same ranges aren't overwritten by a later request?
This commit is contained in:
parent
4b48cff022
commit
5bf3e949e8
9 changed files with 409 additions and 39 deletions
|
@ -129,6 +129,7 @@ pub struct PublishDecorationsParams {
|
|||
pub struct Decoration {
|
||||
pub range: Range,
|
||||
pub tag: &'static str,
|
||||
pub id: Option<String>,
|
||||
}
|
||||
|
||||
pub enum ParentModule {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue