Lukas Wirth
f610e2c2ed
Simplify completion import insertion
2022-04-02 01:42:21 +02:00
Lukas Wirth
75689f2ad8
internal: Enforce Resolver to always have a module scope
2022-03-31 11:12:08 +02:00
Lukas Wirth
ef92453dfe
internal: Refactor FamousDefs builtin crate search
2022-03-30 22:23:54 +02:00
bors[bot]
7315d97347
Merge #11755
...
11755: feat: Implement lifetime elision hints r=Veykril a=Veykril
With names on:
![Code_erl26zKvuf](https://user-images.githubusercontent.com/3757771/159134856-e2c75d2d-f17c-45c7-9a78-3da5ee8b1acd.png )
With names off:
![Code_MRP1Pbfe9d](https://user-images.githubusercontent.com/3757771/159134857-30fac3a1-825e-4f49-ba9b-9fa0bb215694.png )
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-03-19 19:15:06 +00:00
Lukas Wirth
7ab0aaa82a
Add option to skip trivial cases
2022-03-19 19:01:19 +01:00
Jonas Schievink
55d2a25123
Rename call info to "signature help"
...
It is no longer limited to just calls
2022-03-18 20:19:35 +01:00
bors[bot]
5b51cb835a
Merge #11664
...
11664: fix: Properly handle proc-macro crate types for nameres r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-03-09 21:45:42 +00:00
Lukas Wirth
3edc5dcea8
fix: Properly handle proc-macro crate types for nameres
2022-03-09 14:33:39 +01:00
Kirill Bulatov
b1d8dae930
Load hints for part of the file only
2022-03-04 07:45:51 +02:00
Jake Heinz
f83c0166be
cleanup + detect num cpus
2022-01-14 09:48:59 +00:00
Jake Heinz
3168148cc6
ide: parallel prime caches
2022-01-14 09:16:35 +00:00
Jonas Schievink
09219e10f1
Mostly restore hir
API boundary
2022-01-12 19:56:47 +01:00
Benjamin Coenen
df6fa50f92
feat(diagnostics): add new config to fill default expression
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2021-12-31 16:29:08 +01:00
bors[bot]
4f04d8477a
Merge #10965
...
10965: minor: Remove dead assists-related function r=Veykril a=lnicola
Unless I'm missing something, `assists_with_fixes` seems to be always used and ends up in the same code path.
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-12-11 15:06:52 +00:00
Laurențiu Nicola
f5968cfc84
Remove dead assists-related function
2021-12-08 16:55:25 +02:00
Jonas Schievink
deb5c1426d
internal: add "Shuffle Crate Graph" command
2021-12-07 16:37:19 +01:00
bors[bot]
2d0db312b5
Merge #10872
...
10872: ide_db: build symbol index from crate def map r=Veykril a=jhgg
fixes #4842 , #10764
Is this looking correct? 👀
- [x] build the symbol index based upon the CrateDefMap for the given crate in `crate_symbols`
- [x] make it multi threaded again, and figure out how to cache each moduleid's symbol index in salsa.
- [x] NavigationTarget for names in macros is wrong, need to figure out how to compute a text range in the original file id?
- [x] cleanup some duped code
- [x] collect macros from `ItemScope.declared_macros()` into symbol index.
- [x] store declared macros in `ItemScope` so we can figure out where macros were defined for the index.
- [x] do something about `SymbolIndex::for_files` - ideally it should use the new module symbol index stuff.
- [x] delete `source_file_to_file_symbols` & co...
- [x] figure out what to do about `library_symbols`
- [x] maybe... speed up the new `library_symbols` - the new impl is probably much slower, and definitely much less parallel. **deciding to do nothing here, we can optimize later if necerssary.**
- [x] fix failing test: `navigation_target::tests::test_nav_for_symbol` - notably the crate def map doesn't seem to find declarations inside function.
- [x] now a bunch of other tests are failing around auto_import & qualify_path handlers. :(
- [x] need to assoc items in traits and impls
Co-authored-by: Jake Heinz <jh@discordapp.com>
2021-11-30 14:07:39 +00:00
Jake Heinz
8307d38dc1
cleanups
2021-11-28 00:42:42 +00:00
hkalbasi
30ed7fac27
Emit moniker in lsif
2021-11-22 21:29:05 +03:30
Lukas Wirth
77f08d0fc3
Split parts of ide_db::call_info
off into ide
2021-11-22 13:23:34 +01:00
Lukas Wirth
54b2de45e1
Unnest ide::display::navigation_target module
2021-11-22 13:04:28 +01:00
Lukas Wirth
52f5af7165
Expose version string of crates fom HIR
2021-11-03 15:40:06 +01:00
Milo
35e5daacc3
more clippy fixes
2021-10-16 12:32:55 +01:00
bors[bot]
f30b62b751
Merge #10479
...
10479: fix: fix "index out of bounds" panic in name resolution r=jonas-schievink a=jonas-schievink
Closes https://github.com/rust-analyzer/rust-analyzer/issues/10084
Closes https://github.com/rust-analyzer/rust-analyzer/issues/9163
This is really just a salsa update to a version that removes the problematic code (see https://github.com/rust-analyzer/rust-analyzer/issues/10084#issuecomment-934445711 )
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-10-06 20:54:27 +00:00
Jonas Schievink
cda9668289
Update salsa
2021-10-06 22:42:54 +02:00
Lukas Wirth
77cbf4adbc
Bring the implementation closer to VSCode snippet definitions
2021-10-05 17:18:40 +02:00
Lukas Wirth
454ecd167c
Make multiple import edits work for completions
2021-10-04 21:44:33 +02:00
Lukas Wirth
046c85ef0c
Add custom non-postfix snippets
2021-10-04 19:22:41 +02:00
Lukas Wirth
88f213eadd
Initial implementation of custom postfix snippets
2021-10-04 17:49:21 +02:00
Aleksey Kladov
46eb03d99a
internal: use naming that matches intended use-case
2021-10-02 12:18:18 +03:00
hamidreza kalbasi
48bebeaa32
support goto definition and find references
2021-09-26 10:04:02 +03:30
hamidreza kalbasi
f2775ac2e9
reuse hover results with resultset
2021-09-26 10:04:02 +03:30
hamidreza kalbasi
e803bd25c4
add hover
2021-09-26 10:04:02 +03:30
hamidreza kalbasi
557210a688
Begining of lsif
2021-09-26 10:04:02 +03:30
Jonas Schievink
bdba35cc93
fix: multi-token mapping aware find references
2021-09-01 19:19:16 +02:00
Alexander Gonzalez
41943f2328
refactor: Apply PR suggestions
2021-07-27 18:31:21 -04:00
Alexander Gonzalez
1a0a5da1a4
refactor: Make handle_hover handle ranges too
2021-07-27 18:29:22 -04:00
Alexander Gonzalez
20c64cc0e6
feat: Extend the server with the hover_range capability
2021-07-27 18:29:22 -04:00
Kevin DeLorey
b75e0e7bb1
Initial commit of highlight related configuration w/ implementation.
2021-07-22 19:35:47 -06:00
Aleksey Kladov
8f3335f5fb
internal: make it clearer where IO happens
2021-07-17 23:56:50 +03:00
Aleksey Kladov
0db4f3f6a4
internal: ensure consistent passing for config params
...
We pass "context" parametes first, so configs should be on the left.
"Bigger" context wins, so configs goes after db.
2021-07-06 00:00:39 +03:00
Aleksey Kladov
b8a6ea5ab5
feat: make join lines behavior configurable
...
closes #9492
2021-07-05 23:47:20 +03:00
Aleksey Kladov
6e9780c005
internal: make CompletionItem and SourceChange consistent
...
Before this PR, SourceChange used a bool and CompletionItem used an enum
to signify if edit is a snippet. It makes sense to use the same pattern
in both cases. `bool` feels simpler, as there's only one consumer of
this API, and all producers are encapsulated anyway (we check the
capability at the production site).
2021-07-04 15:44:03 +03:00
Jonas Schievink
5f13fb9db9
Add "View Crate Graph (Full)"
2021-07-02 00:10:33 +02:00
bors[bot]
264716e827
Merge #9375
...
9375: feat: Highlight exit and yield points r=Veykril a=Veykril
![Code_YBHOCF3DbU](https://user-images.githubusercontent.com/3757771/123128986-e1270a80-d44b-11eb-9854-065459a2dd50.png )
![Code_YyMhqES0LX](https://user-images.githubusercontent.com/3757771/123128988-e1bfa100-d44b-11eb-9c81-6a6031aad740.png )
Fixes #4691
Fixes #9365
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-24 15:23:25 +00:00
Lukas Wirth
066bc4f3a4
Simplify
2021-06-24 01:32:56 +02:00
Lukas Wirth
9a53f1033e
Implement yield point highlighting
2021-06-23 16:16:32 +02:00
Lukas Wirth
14b66bb458
Rename 'document_highlight' to 'highlight_related'
2021-06-23 15:13:48 +02:00
Lukas Wirth
b26a8ecca1
Move document highlighting computation from rust-analyzer to ide
2021-06-23 15:02:49 +02:00
Lukas Wirth
5a74e93c33
Implement goto_declaration support
2021-06-22 20:49:07 +02:00