about summary refs log tree commit diff
path: root/crates/ide/src
AgeCommit message (Collapse)AuthorLines
2021-10-02Fix rename trying to edit the same range multiple timesLukas Wirth-0/+45
2021-10-02internal: untangle usages of ReferenceCategory somewhatAleksey Kladov-35/+39
Not everything that can be read or write is a reference, let's try to use more precise types.
2021-10-02internal: use naming that matches intended use-caseAleksey Kladov-12/+12
2021-10-01Add whitespace b/w lifetime and mut in expansionnathan.whitaker-1/+1
2021-10-01docs: add note about `vscode-vim` in `on_enter`Cassandra McCarthy-0/+10
I found myself search for this, so building off of #3013 and #3308, I hope this note is useful.
2021-10-01Merge #10413bors[bot]-9/+13
10413: fix: Fix format highlighting with `concat!` and `unreachable!` r=jonas-schievink a=jonas-schievink Last item in https://github.com/rust-analyzer/rust-analyzer/issues/10394, closes https://github.com/rust-analyzer/rust-analyzer/issues/10394 Also documents why/how `is_format_string` even works, since I found that nontrivial. bors r+ Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-10-01Fix format highlighting with `concat!`Jonas Schievink-9/+13
2021-10-01Merge #10403bors[bot]-14/+139
10403: feat: Add semantic token modifier for crate root r=Veykril a=lhvy Resolves #9073 I managed to implement crate root highlighting for crates mentioned specifically by name (e.g. `serde` in `use serde::Serialize;`), but not for crates referred to with `crate` or `super`. How could I implement this? > P.S. I'm participating in [Hacktoberfest 2021](https://hacktoberfest.digitalocean.com/). If this PR is up to standard and merged, I'd appreciate if the `hacktoberfest-accepted` label could be added. Thanks! Co-authored-by: lhvy <me@lhvy.dev>
2021-10-01Add semantic token modifier for crate rootlhvy-14/+139
2021-10-01Expand `asm!` to `format_args!`Jonas Schievink-0/+6
2021-09-30Restructure syntax element highlightingLukas Wirth-190/+211
2021-09-30SimplifyLukas Wirth-29/+23
2021-09-30Merge #10398bors[bot]-29/+122
10398: Give defaultLibrary semantic token modifier to items from standard library r=Veykril a=lhvy Fixes #8999, fixes #2155 `builtInCrates` could be an alternate name to `defaultLibrary`, which one is better? > P.S. I'm participating in [Hacktoberfest 2021](https://hacktoberfest.digitalocean.com/). If this PR is up to standard and merged, I'd appreciate if the `hacktoberfest-accepted` label could be added. Thanks! Co-authored-by: lhvy <me@lhvy.dev> Co-authored-by: Lucas <me@lhvy.dev>
2021-10-01Fix builtin_crates return type changelhvy-2/+2
2021-10-01Add commentlhvy-0/+1
2021-09-30Work around tidy checkJonas Schievink-4/+4
2021-10-01Give defaultLibrary semantic token modifier to items from standard librarylhvy-29/+121
2021-09-30Add `const_format_args!` builtin macro, fix highlightingJonas Schievink-10/+33
2021-09-30Less hacky `assert!` expansionJonas Schievink-0/+10
2021-09-30Fix format string highlighting in `panic!`Jonas Schievink-3/+59
2021-09-29Merge #10181bors[bot]-0/+277
10181: Begining of lsif r=HKalbasi a=HKalbasi This PR adds a `lsif` command to cli, which can be used as `rust-analyzer lsif /path/to/project > dump.lsif`. It now generates a valid, but pretty useless lsif (only supports folding ranges). The propose of this PR is to discussing about the structure of lsif generator, before starting anything serious. cc `@matklad` #8696 #3098 Co-authored-by: hamidreza kalbasi <hamidrezakalbasi@protonmail.com>
2021-09-29remove glob import and cancellableshamidreza kalbasi-13/+8
2021-09-27Rename `*Owner` traits to `Has*`Lukas Wirth-19/+19
2021-09-26internal: more reasonable grammar for blocksAleksey Kladov-48/+60
Consider these expples { 92 } async { 92 } 'a: { 92 } #[a] { 92 } Previously the tree for them were BLOCK_EXPR { ... } EFFECT_EXPR async BLOCK_EXPR { ... } EFFECT_EXPR 'a: BLOCK_EXPR { ... } BLOCK_EXPR #[a] { ... } As you see, it gets progressively worse :) The last two items are especially odd. The last one even violates the balanced curleys invariant we have (#10357) The new approach is to say that the stuff in `{}` is stmt_list, and the block is stmt_list + optional modifiers BLOCK_EXPR STMT_LIST { ... } BLOCK_EXPR async STMT_LIST { ... } BLOCK_EXPR 'a: STMT_LIST { ... } BLOCK_EXPR #[a] STMT_LIST { ... }
2021-09-26Remove inherent methods from ast node that carry semantic meaningLukas Wirth-5/+7
2021-09-26add some testshamidreza kalbasi-0/+99
2021-09-26support goto definition and find referenceshamidreza kalbasi-31/+60
2021-09-26reuse hover results with resultsethamidreza kalbasi-47/+97
2021-09-26add hoverhamidreza kalbasi-13/+52
2021-09-26use utf16 instead of utf8hamidreza kalbasi-0/+3
2021-09-26Begining of lsifhamidreza kalbasi-0/+62
2021-09-23Split the hover module upLukas Wirth-4697/+4688
2021-09-23Support goto_def for intra-doc-links in macro invocationsLukas Wirth-75/+82
2021-09-23Make hover work for intra doc links in macro invocationsLukas Wirth-20/+100
2021-09-23CleanupLukas Wirth-122/+68
2021-09-22Merge #10284bors[bot]-198/+178
10284: internal: definition based hover functions r=Veykril a=HKalbasi This is part of #10181 but since it is blocked and `hover.rs` is moving quickly so will cause conflicts, I submitted this PR. This PR extract some parts of `hover` to `find_definition` (maybe this need to be moved to some other file?) and `hover_for_definition`, with those functions I will be able to calculate definition of every token, and calculate hover (and probably other queries) for each definition only once. Co-authored-by: hamidreza kalbasi <hamidrezakalbasi@protonmail.com>
2021-09-22move function to defs.rshamidreza kalbasi-120/+56
2021-09-22remove dead codehamidreza kalbasi-31/+3
2021-09-22use find_definition in go tohamidreza kalbasi-64/+64
2021-09-21fix derive hover in macrohamidreza kalbasi-14/+55
2021-09-21Add a mirror function-like proc-macro expander for testsLukas Wirth-9/+11
2021-09-19internal: definition based hover functionshamidreza kalbasi-92/+123
2021-09-18Make inlay hints work in attributed itemsLukas Wirth-14/+75
2021-09-18Add multi-token mapping test for goto_definitionLukas Wirth-10/+55
2021-09-18do comment handling on the original tokenzhoufan-25/+15
2021-09-16fix: multi-token mapping aware goto definitionzhoufan-39/+56
2021-09-16Merge #10250bors[bot]-97/+177
10250: internal: Improve call_hierarchy and incoming/outgoing_calls r=Veykril a=Veykril bors r+ Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-09-16Improve call_hierarchy and incoming/outgoing_callsLukas Wirth-97/+177
2021-09-15Merge #10233bors[bot]-21/+175
10233: fix: add multi-token mapping support to hovers r=Veykril a=spookyvision implement #10070 in [`hover`](https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/hover.rs) Co-authored-by: Anatol Ulrich <anatol.ulrich@ferrous-systems.com>
2021-09-15add multi-token mappings for hoverAnatol Ulrich-6/+2