bors[bot]
b55d22e060
Merge #3388
...
3388: Remove inlay hint in diff views r=matklad a=vbfox
If the left side of a diff view that contain the old version of the file apply inlays they are misplaced and produce a weird display:

After the change:

The detection is done by blacklisting the url schemes used by git and subversion scm extensions, whitelisting `file` is also possible but neither is perfect as VSCode now support both pluggable scm extensions and pluggable remote filesystems. But I suspect that the list of scm extensions is more easily manageable.
**Note**: I can rebase on #3378 if needed as it touches the same lines of code
Co-authored-by: Julien Roncaglia <julien@roncaglia.fr>
2020-03-03 13:45:26 +00:00
Julien Roncaglia
2f54c1d653
Centralize the check for languageId on document
...
Also move visibleRustEditors to Ctx
2020-03-02 22:54:29 +01:00
Aleksey Kladov
dbd1698e02
Don't fail loudly if the old highlighting breaks
2020-03-02 14:46:46 +01:00
Veetaha
8c4409b3bb
vscode: migrate highlighting to rust-analyzer-api.ts
2020-02-25 00:49:54 +02:00
Veetaha
4cee7cddc8
vscode: gracefully handle cancellation errors
2020-02-23 15:49:09 +02:00
eaglgenes101
358b9d685f
Improved compatibility with themes
2020-02-20 12:40:12 -05:00
Veetaha
7379964048
vscode: press ; to respect semicolons
2020-02-17 22:09:44 +02:00
Aleksey Kladov
d24e612106
Simplify startup
2020-02-17 13:40:47 +01:00
Aleksey Kladov
dcdbbddd16
Simplify TS reload logic
...
Fixes #3164
2020-02-17 13:40:47 +01:00
bors[bot]
ea9d18ba83
Merge #3024
...
3024: vscode: eliminate floating promises and insane amount of resource handle leaks r=matklad a=Veetaha
Khm, yeah ...
Co-authored-by: Veetaha <gerzoh1@gmail.com>
2020-02-05 20:57:08 +00:00
Veetaha
8153b60e1d
vscode: eliminate floating promises and insane amount of resource handle leaks
2020-02-05 22:39:47 +02:00
Veetaha
b89b22e43e
vscode: yet another refactor commit
2020-02-05 00:13:46 +02:00
Aleksey Kladov
ad57726f91
Use simple prng instead of a dependency
...
closes #2999
2020-02-03 16:37:12 +01:00
Veetaha
420462421d
vscode extension cleanup: migrate to prefer-const tslint rule
2020-02-02 21:12:59 +02:00
bjorn3
5c39311f96
Fix seedrandom in packaged extension
...
Fixes #2971
2020-02-01 13:39:04 +01:00
Aleksey Kladov
ff0ceb30a9
Add semicolons
2019-12-31 18:55:34 +01:00
Aleksey Kladov
087af54069
Refactor server lifecycle
2019-12-31 18:32:17 +01:00
Aleksey Kladov
e4b588868f
Refactor status activation
2019-12-31 17:22:43 +01:00
Aleksey Kladov
26bd7a896b
Drop support for legacy colorization
2019-12-31 14:11:25 +01:00
Aleksey Kladov
6c1d92d6c5
Rename file
2019-12-31 14:06:40 +01:00
Aleksey Kladov
f984ef2652
Switch impure functional style to pure imperative
2019-12-31 03:33:00 +01:00
Aleksey Kladov
8346bdc04d
Rearrange code
2019-12-31 02:17:50 +01:00
Aleksey Kladov
c65e90f7b8
Use Ctx in highlighter
2019-12-30 23:46:13 +01:00
Aleksey Kladov
04f0f5077a
Reformat with tsfmt
2019-12-30 23:30:35 +01:00
Aleksey Kladov
233f1dd2a8
Privatize highlighting
2019-12-30 23:17:56 +01:00
Aleksey Kladov
08c5d157f9
Thoughtlessly copy-paste a fix to a problem I don't understand
2019-12-30 21:39:34 +01:00
Aleksey Kladov
efbbc903e6
Add config to Ctx
2019-12-30 21:32:04 +01:00
Aleksey Kladov
7646dc046e
Encapsulate highlighting activation
2019-12-30 21:32:04 +01:00
Seivan Heidari
25537d294c
Fix https://github.com/rust-analyzer/rust-analyzer/pull/2061#discussion_r348716036
...
Fix 68a5ff050f (r361019340)
2019-12-24 00:04:36 +01:00
Seivan Heidari
b21d9337d9
Merge branch 'master' into feature/themes
2019-12-23 15:35:31 +01:00
Aleksey Kladov
1c8467e20a
Fix highlighting token names
2019-12-17 14:45:46 +01:00
Omer Ben-Amram
083010f633
removed type.alias
2019-12-14 13:29:42 +02:00
Omer Ben-Amram
67641d3f5f
added decorations
2019-12-14 13:24:07 +02:00
Laurențiu Nicola
273299693b
Code: enable prettier trailing commas
2019-12-09 21:07:19 +02:00
Laurențiu Nicola
c7dc067104
Code: bump deps
2019-12-08 20:39:22 +02:00
Seivan Heidari
3886164bcc
Probably a better approach to check for values before assigning lest we replace something.
2019-11-10 22:30:53 +01:00
Seivan Heidari
83a33fbbea
Vscode wasn't running the linter automatically so ran npm run fix
- wonder if it's related to tslint
being deprecated.
2019-11-09 17:23:30 +01:00
Seivan Heidari
45533112c8
See if this satisfies the CI.
2019-11-05 14:22:09 +01:00
Seivan Heidari
6012bbfc51
Fix typo.
2019-11-05 00:26:49 +01:00
Seivan Heidari
f49781c32d
Logging fallback tag in case scopes are missing.
2019-11-05 00:11:43 +01:00
Seivan Heidari
c60f9bf4c6
* Adding scope mapping configuration manifest in package.json
...
* Loading configurable scope mappings from settings.
* Updating Readme with `rust-analyzer.scopeMappings`.
`rust-analyzer.scopeMappings` -- a scheme backed JSON object to tweak Rust Analyzer scopes to TextMate scopes.
```jsonc
{
//Will autocomplete keys to available RA scopes.
"keyword.unsafe": ["keyword", "keyword.control"],
//Values are string | TextMateScope | [string | TextMateScope]
"comments": "comment.block"
}
```
2019-11-04 23:59:11 +01:00
Seivan Heidari
1f822c8e51
Adding better debugging for testing themes missing tags and which scopes didn't map.
...
Since this file is no longer being pushed upstream, double down on monads.
2019-10-31 10:36:54 +01:00
Seivan Heidari
8c2cd28c48
Adding debugging to figure out missing scopes from theme.
2019-10-27 23:49:41 +01:00
Seivan Heidari
0ddf47a7ab
Introducing a Scopes Mapper to map from RA scopes to TextMate scopes with fallbacks.
...
Current scopes defined:
```
['keyword.unsafe', ['storage.modifier', 'keyword.other', 'keyword.control']],
['function', ['entity.name.function']],
['parameter', ['variable.parameter']],
['type', ['entity.name.type']],
['builtin', ['variable.language', 'support.type', 'support.type']],
['text', ['string', 'string.quoted', 'string.regexp']],
['attribute', ['keyword']],
['literal', ['string', 'string.quoted', 'string.regexp']],
['macro', ['support.other']],
['variable.mut', ['variable']],
['field', ['variable.object.property']],
['module', ['entity.name.section']]
```
Need to complement with further fallbacks as some themes fail.
2019-10-27 17:57:11 +01:00
Seivan Heidari
3e8616cf6d
Proof of concept theming and 'tokenColorCustomizations' support.
2019-10-24 17:25:23 +02:00
Aleksey Kladov
e418889996
underline mutable bindings
2019-07-19 15:07:18 +03:00
Ekaterina Babshukova
4abe03879b
highlight mutable variables differently
2019-07-18 18:52:50 +03:00
Pascal Hertleif
1e6ba19015
Make rainbows optional
2019-05-27 11:44:46 +02:00
Pascal Hertleif
5bf3e949e8
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?
2019-05-27 11:26:33 +02:00
Laurențiu Nicola
f1ec88cc56
Improve highlighting of name refs
2019-05-23 15:31:35 +03:00