Lukas Wirth
78fe6133c4
Split punctuation semantic highlighting up into more tags
2021-01-10 13:33:03 +01:00
Aleksey Kladov
3dfa2768ac
Shorten names
2021-01-09 14:48:15 +03:00
Aleksey Kladov
64a6ee4535
Shorten frequent names
2021-01-09 14:44:01 +03:00
Aleksey Kladov
6fb52af521
Rename dummy -> none
2021-01-09 14:41:31 +03:00
Aleksey Kladov
e30c1c3fbf
Simplify highlighting infra
...
This also fixes the killer whale bug
2021-01-08 23:47:35 +03:00
Kevaundray Wedderburn
72b9a4fbd3
Change <|> to $0 - Rebase
2021-01-07 12:09:23 +00:00
Aleksey Kladov
f8a0561178
Align config's API with usage
...
The config now is mostly immutable, optimize for that.
2021-01-06 21:22:24 +03:00
Aleksey Kladov
f7a15b5cd1
More maintainable config
...
Rather than eagerly converting JSON, we losslessly keep it as is, and
change the shape of user-submitted data at the last moment.
This also allows us to remove a bunch of wrong Defaults
2021-01-06 15:39:28 +03:00
Aleksey Kladov
624eb1ee54
More maintainable caps config
...
The idea here is that we preserve client's config as is, without
changes. This gets rid of state!
2021-01-05 17:46:57 +03:00
Lukas Wirth
18bf2e5af5
Add ConstParams to the ide layer
2021-01-01 14:43:16 +01:00
Aleksey Kladov
2f22675537
Simplify assists resolution API
...
Assist vs UnresolvedAssist split doesn't really pull its weight. This
is especially bad if we want to include `Assist` as a field of
diagnostics, where we'd have to make the thing generic.
2020-12-26 14:11:42 +03:00
Lukas Wirth
42e3f97c30
Support labels in reference search
2020-12-24 15:40:18 +01:00
Daiki Ihara
7a2eebde22
Add initial_contents field for CreateFile
2020-12-21 15:55:40 +09:00
Aleksey Kladov
113688cef0
Clarify the meaning of no-op highlight tag
2020-12-19 17:16:05 +03:00
Aleksey Kladov
a13947abe6
Use more Rustic highlighting specifiers
...
*Method* works for OO languages, but in rust we can also have
associated constants & types, so let's move this to a modifier.
2020-12-19 17:10:47 +03:00
Aleksey Kladov
c45221907a
Deduplicate highlight tags and symbol kinds
...
Curiously, LSP uses different enums for those, and unsurprising and
annoyingly, there are things which exist in one but not in the other.
Let's not repeat the mistake and unify the two things
2020-12-18 23:04:26 +03:00
Aleksey Kladov
0e3581e823
NavTarget doesn't assume that it points to a symbol
2020-12-18 21:15:48 +03:00
Aleksey Kladov
55ba353b39
Don't expose SyntaxKind from IDE API
...
SyntaxKind is somewhat of an internal type, but IDE is using it to
basically specify an icon. Let's have a dedicated entity for this
instead.
2020-12-18 19:28:48 +03:00
Aleksey Kladov
2465fa02b7
Cleaup imports
...
ide should re-export everything it needs.
2020-12-18 18:02:11 +03:00
kjeremy
d828bd794b
LSP 3.16 - Released
2020-12-17 11:33:35 -05:00
Aleksey Kladov
6e24321e45
Introduce anchored_path
...
They allow to represent paths like `#[path = "C:\path.rs"] mod foo;`
in a lossless cross-platform & network-transparent way.
2020-12-09 19:07:05 +03:00
Laurențiu Nicola
72f013b3b9
Use METHOD semantic token type
2020-12-04 18:27:10 +02:00
kjeremy
e981485b76
New lsp-types to fix versioning
...
Fixes #6603
2020-11-24 08:52:24 -05:00
kjeremy
233fdb12ce
Latest LSP 3.16 protocol
...
Pulls in https://github.com/gluon-lang/lsp-types/pull/186
2020-11-16 15:10:13 -05:00
Aleksey Kladov
7d2eb000b0
Switch to upstream protocol for resolving code action
...
Note that we have to maintain custom implementation on the client
side: I don't see how to marry bulitin resolve support with groups and
snippets.
2020-11-10 18:48:46 +01:00
Anatol Liu
3baa526fb0
Add static semantic token modifier for associated functions with no &self
2020-11-04 20:08:46 -08:00
kjeremy
5cb6fafd36
Latest proposed LSP 3.16.0
...
Needs: https://github.com/gluon-lang/lsp-types/pull/183
2020-10-26 09:23:34 -04:00
Igor Aleksanov
19cce08662
Re-export base_db from ide_db
2020-10-24 11:39:57 +03:00
bors[bot]
2fa942ad30
Merge #6251 #6310
...
6251: Semantic Highlight: Add Callable modifier for variables r=matklad a=GrayJack
This PR added the `HighlightModifier::Callable` variant and assigned it to variables and parameters that are fn pointers, closures and implements FnOnce trait.
This allows to colorize these variables/parameters when used in call expression.
6310: Rewrite algo::diff to support insertion and deletion r=matklad a=Veykril
This in turn also makes `algo::diff` generate finer diffs(maybe even minimal diffs?) as insertions and deletions aren't always represented as as replacements of parent nodes now.
Required for #6287 to go on.
Co-authored-by: GrayJack <gr41.j4ck@gmail.com >
Co-authored-by: Lukas Wirth <lukastw97@gmail.com >
2020-10-23 22:12:15 +00:00
bors[bot]
81609960fa
Merge #6324
...
6324: Improve #[cfg] diagnostics r=jonas-schievink a=jonas-schievink
Unfortunately I ran into https://github.com/rust-analyzer/rust-analyzer/issues/4058 while testing this on https://github.com/nrf-rs/nrf-hal/ , so I didn't see much of it in action yet, but it does seem to work.
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com >
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com >
2020-10-23 10:38:30 +00:00
adamrk
3dbbcfca67
Insert ref for completions
2020-10-22 22:45:14 +02:00
Jonas Schievink
3421b645e6
Emit better #[cfg] diagnostics
2020-10-22 19:19:18 +02:00
GrayJack
83d6bc7113
Add HighlightModifier::Callable and add it for locals
2020-10-16 06:38:32 -03:00
Igor Aleksanov
4a1b4b23bb
Replace 'cargo_prefix' option with 'override_cargo'
2020-10-02 12:34:27 +03:00
Igor Aleksanov
2c125f3c63
Add support of runnables arguments in Rust Analyzer
2020-10-02 12:34:27 +03:00
kjeremy
c7243e4a59
Support active parameters at the per-signature level
...
Update crates
2020-09-18 11:39:25 -04:00
kjeremy
36692bdffa
Switch to upstream ENUM_MEMBER
2020-09-02 09:40:59 -04:00
kjeremy
b527257330
Move to vscode-languageclient 7.0.0-next.9
...
Stabilizes call hierarchy and semantic tokens features.
2020-09-02 09:40:59 -04:00
Kirill Bulatov
3ac9732ca3
Fix some typos
2020-08-28 21:55:24 +03:00
bors[bot]
529ca7e5e0
Merge #5643
...
5643: Add new consuming modifier, apply consuming and mutable to methods r=matklad a=Nashenas88
This adds a new `consuming` semantic modifier for syntax highlighters.
This also emits `mutable` and `consuming` in two cases:
- When a method takes `&mut self`, then it now has `function.mutable` emitted.
- When a method takes `self`, and the type of `Self` is not `Copy`, then `function.consuming` is emitted.
CC @flodiebold
Co-authored-by: Paul Daniel Faria <Nashenas88@users.noreply.github.com >
2020-08-19 11:27:02 +00:00
Aleksey Kladov
aa1a7a5414
Introduce Label
2020-08-18 16:50:07 +02:00
Aleksey Kladov
6a4c9fc9fd
Don't make fields private unless you have to
2020-08-17 16:11:29 +02:00
Paul Daniel Faria
7009d5ee2b
Add new HighlightModifier variant, Consuming
2020-08-16 10:22:51 -04:00
Aleksey Kladov
1b0c7701cc
Rename ra_ide -> ide
2020-08-13 17:58:27 +02:00
Aleksey Kladov
ed20a857f4
Rename ra_db -> base_db
2020-08-13 16:29:33 +02:00
Aleksey Kladov
a1c187eef3
Rename ra_syntax -> syntax
2020-08-12 18:30:53 +02:00
JmPotato
dc6e1e0dac
Address some FIXMEs
...
Signed-off-by: JmPotato <ghzpotato@gmail.com >
2020-08-11 10:55:26 +08:00
JmPotato
3f2bc813d3
format in to_proto::markup_content
...
Signed-off-by: JmPotato <ghzpotato@gmail.com >
2020-08-09 21:33:14 +08:00
Jeremy Kolb
195111d769
Address PR comments
2020-08-05 21:35:35 -04:00
kjeremy
fcfd7cb1e3
Handle semantic token deltas
2020-07-31 20:57:53 -04:00