diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-02-25 10:02:21 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-25 10:02:21 +0000 |
commit | 1fe48a0115c24240f5a3e1b329e642f18e2715d6 (patch) | |
tree | 88c3290bced7671039b4765a5f599a019aa3c6e6 /crates/ra_ide/src/lib.rs | |
parent | 5e6f4ca6905e02a5fa34ef292fa2abefcd982222 (diff) | |
parent | 17ffdf9c27a6bb5cf5d30ad6a677390609fcf861 (diff) |
Merge #3159
3159: Server-side Semantic Tokens r=matklad a=kjeremy
Takes the output of `syntax_highlighting` and converts it to the proposed semantic tokens API (so far only `textDocument/semanticTokens`. There's a lot of cool stuff we could do with this and the "Inspect Editor Tokens and Scopes" vscode command (pic below) is a cool way to see what has tokens and what doesn't.
Incredibly hacky and could panic due to unwraps, `panic!` etc. To use: run with `code-insiders --enable-proposed-api matklad.rust-analyzer`. If you try to run this without `--enable-proposed-api` it will crash.
![image](https://user-images.githubusercontent.com/4325700/74595603-7c66cf00-5011-11ea-9593-312663f04fc1.png)
@matklad I'm mostly looking for design feedback.
Co-authored-by: kjeremy <[email protected]>
Co-authored-by: Jeremy Kolb <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/lib.rs')
-rw-r--r-- | crates/ra_ide/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_ide/src/lib.rs b/crates/ra_ide/src/lib.rs index f86f98be7..82e10bc7e 100644 --- a/crates/ra_ide/src/lib.rs +++ b/crates/ra_ide/src/lib.rs | |||
@@ -75,7 +75,7 @@ pub use crate::{ | |||
75 | runnables::{Runnable, RunnableKind, TestId}, | 75 | runnables::{Runnable, RunnableKind, TestId}, |
76 | source_change::{FileSystemEdit, SourceChange, SourceFileEdit}, | 76 | source_change::{FileSystemEdit, SourceChange, SourceFileEdit}, |
77 | ssr::SsrError, | 77 | ssr::SsrError, |
78 | syntax_highlighting::HighlightedRange, | 78 | syntax_highlighting::{tags, HighlightedRange}, |
79 | }; | 79 | }; |
80 | 80 | ||
81 | pub use hir::Documentation; | 81 | pub use hir::Documentation; |