kjeremy
77ffe137f2
Smaller inlay hints
...
This makes things a lot more readable but isn't officially supported by vscode: https://github.com/Microsoft/vscode/issues/9078
Inspired by Visual Studio, IntelliJ and Resharper.
2020-10-28 09:52:23 -04:00
Laurențiu Nicola
91b4dd63b0
Also set textDecoration: none on inlay hints
2020-10-28 13:49:38 +02:00
Laurențiu Nicola
8a5a5b2477
Set font-wieght: normal on inlay hints
2020-10-27 09:18:25 +02:00
Laurențiu Nicola
010d123f23
Insert a ZWNJ before type hints
2020-10-15 10:56:28 +03:00
Veetaha
de2324d9e6
Remove fixme from inlay_hints.ts
...
I have reevaluated the fixme and it doesn't seem necessary to pass an array of files
to the inlay hints request.
This will (a) make the request more compilcated (b), make us wait for
inlay hints for `all` active editors resolve at once before rendering and (c)
doesn't seem required because 99% of the time there is a single active editor
in the IDE
2020-08-29 02:05:42 +03:00
Veetaha
5b9a882edc
Make inlay hints colors more configurable
2020-08-26 02:53:42 +03:00
Aleksey Kladov
a30bdd9795
Cleanup lsp extensions on the client side
2020-05-25 14:56:26 +02:00
Aleksey Kladov
3bf5ef02c0
Add master config for inlayHints to make disabling easy
2020-05-08 09:28:15 +02:00
veetaha
7534266156
fix: inlay hints config desyncronization between the frontend and the backend
...
See the explanation in the issue comment:
https://github.com/rust-analyzer/rust-analyzer/issues/3924#issuecomment-612444566
2020-04-11 20:01:54 +03:00
veetaha
f778242a37
vscode: fix indent
2020-04-11 15:37:06 +03:00
Kirill Bulatov
b892a48740
Code review fixes
...
Co-Authored-By: Veetaha <veetaha2@gmail.com>
2020-03-30 13:39:14 +03:00
Kirill Bulatov
8a23bec2cd
Style fixes
2020-03-30 13:39:14 +03:00
Matt Hooper
6f239a581a
Extension types and rendering
2020-03-24 23:22:41 +01:00
Veetaha
95b5129a8a
vscode: remove unnecessary code
...
This cancel is unnecessary since we cancel the previous inlay hints requests in `fetchHints()` method itself. This is not a hard error, we just called cancel() 2 times.
2020-03-20 21:23:56 +02:00
Steffen Lyngbaek
58248e24cd
Switch from Vec<InlayKind> to object with props
...
- Instead of a single object type, use several individual nested types
to allow toggling from the settings GUI
- Remove unused struct definitions
- Install and test that the toggles work
2020-03-11 20:14:39 -07:00
Steffen Lyngbaek
e98aff109a
Parameter inlay hint separate from variable type inlay? #2876
...
Add setting to allow enabling either type inlay hints or parameter
inlay hints or both. Group the the max inlay hint length option
into the object.
- Add a new type for the inlayHint options.
- Add tests to ensure the inlays don't happen on the server side
2020-03-10 14:33:45 -07:00
Veetaha
65cecff316
vscode: post refactor HintsUpdater (simplify create() -> constructor call)
2020-03-07 14:39:42 +02:00
Veetaha
61a4ea2532
vscode: more privacy for HintsUpdater
2020-03-07 14:37:15 +02:00
Veetaha
2734ffa20c
vscode: remove logging from inlays, run fix lint issues
2020-03-07 14:34:09 +02:00
Veetaha
ef52fd543f
vscode: remove logic for caching editors as per @matklad
2020-03-07 14:08:35 +02:00
Veetaha
3d93e2108e
vscode: refresh all editors on text changes, simplify inlays api
2020-03-07 14:08:35 +02:00
Veetaha
057cd959da
vscode: add dat semicolon
2020-03-07 14:08:35 +02:00
Veetaha
fd709c0c04
vscode: simpify
2020-03-07 14:08:35 +02:00
Veetaha
6441988d84
vscode: redesign inlay hints to be capable of handling multiple editors
2020-03-07 14:08:35 +02:00
Julien Roncaglia
2f54c1d653
Centralize the check for languageId on document
...
Also move visibleRustEditors to Ctx
2020-03-02 22:54:29 +01:00
Julien Roncaglia
b95756d21b
Remove inlay in diff views
...
If the left side of a diff view that contain the old
version of the file apply inlays they are misplaced.
The detection is done by blacklisting the url schemes used
by git and subversion scm extensions.
2020-03-01 16:54:56 +01:00
Aleksey Kladov
84b009cbf7
Reset fontStyle for inlay hints
...
Otherwise, we get bold hints on `true` and `false`
2020-02-28 11:31:53 +01:00
Veetaha
c9230b88b4
vscode: migrate inlay_hints to rust-analyzer-api.ts
2020-02-25 00:57:49 +02:00
Veetaha
4cee7cddc8
vscode: gracefully handle cancellation errors
2020-02-23 15:49:09 +02:00
Aleksey Kladov
49844ab717
Extract client-side logging
2020-02-22 16:03:47 +01:00
Veetaha
d905abfb11
vscode: migrate to tripple equals
2020-02-22 13:46:11 +02:00
Veetaha
7379964048
vscode: press ; to respect semicolons
2020-02-17 22:09:44 +02:00
Aleksey Kladov
7dccfd9183
remove debug print
2020-02-17 14:20:18 +01: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
Veetaha
bd113623a0
vscode: minor refactorings
2020-02-17 02:07:11 +02:00
Veetaha
31ae646448
vscode: add comment on possible UnhandledPromise rejection error
2020-02-17 01:39:58 +02:00
Veetaha
6e22e33d7d
vscode: fix stupid mistake
2020-02-16 19:30:13 +02:00
Veetaha
8153b60e1d
vscode: eliminate floating promises and insane amount of resource handle leaks
2020-02-05 22:39:47 +02:00
Veetaha
420462421d
vscode extension cleanup: migrate to prefer-const tslint rule
2020-02-02 21:12:59 +02:00
Emil Lauridsen
70cba0fe0f
Use types from vscode-langaugeclient
2020-01-15 12:04:35 +01:00
imtsuki
c390e92fdd
Add inlay parameter name hints for function calls
...
Signed-off-by: imtsuki <me@qjx.app>
2020-01-15 01:18:52 +08:00
Aleksey Kladov
8327049fae
Allow disabling inlay hints
2020-01-01 17:04:37 +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
0eb254854d
Fix color name
2019-12-31 15:42:05 +01:00
Aleksey Kladov
8662a7dfe5
Drop obsolete color configurations
2019-12-31 14:37:23 +01:00
Aleksey Kladov
233f1dd2a8
Privatize highlighting
2019-12-30 23:17:56 +01:00
Aleksey Kladov
cdd7118cbf
Don't request inline hints repeatedly
2019-12-30 22:53:21 +01:00
Aleksey Kladov
23bac12062
Retry inlay hints on content modified error
2019-12-30 22:20:04 +01:00