Commit graph

1456 commits

Author SHA1 Message Date
Lukas Wirth
963568b46f feat: IDE features for primitive tuple fields 2024-01-06 15:04:58 +01:00
Lukas Wirth
3c8dd9e89e Expose whether a channel has been dropped in lsp-server errors 2024-01-01 14:10:46 +01:00
Lukas Wirth
2a5b60b186 internal: Update world symbols request definiton, prefer focus range for macros 2023-12-22 11:42:08 +01:00
Lukas Wirth
ca957f4f82 Fix proc-macro-test-impl building without any proc-macros 2023-12-21 17:24:00 +01:00
Lukas Wirth
a892237ed4 Add rust-analyzer-span server feature equivalent to the ID server 2023-12-21 17:22:59 +01:00
Lukas Wirth
f48ecb6e09 Try to support pre and post-change metavars 2023-12-19 20:45:12 +01:00
Lukas Wirth
f49a2fed3f internal: Move out WithFixture into dev-dep only crate 2023-12-18 15:24:08 +01:00
Lukas Wirth
ec6162308e Move the SpanMap definition into the span crate 2023-12-18 14:50:48 +01:00
Lukas Wirth
66e29be1bd internal: Split out a span crate 2023-12-18 14:08:33 +01:00
Lukas Wirth
35620306a6 internal: Move proc-macro knowledge out of base-db 2023-12-18 12:37:18 +01:00
hkalbasi
7b9595a5ab Run rust-analyzer on rustc tests in metrics 2023-12-15 02:10:25 +03:30
Laurențiu Nicola
3b23e9aacc Bump line-index 2023-12-12 17:18:08 +02:00
Laurențiu Nicola
c30fd42685 Publish line-index 2023-12-12 16:57:44 +02:00
Lukas Wirth
b1a8f83a0c fix: Smaller spans for unresolved field and method diagnostics 2023-12-08 18:46:36 +01:00
bors
07d3128de2 Auto merge of #16043 - Veykril:dep-bump, r=Veykril
Bump and unlock some dependencies
2023-12-07 10:52:52 +00:00
Lukas Wirth
5544f4fa3d Bump and unlock some dependencies 2023-12-07 11:48:58 +01:00
bors
c4f0da96b3 Auto merge of #16042 - Veykril:salsa-bump, r=Veykril
internal: Bump salsa

Might f ix https://github.com/rust-lang/rust-analyzer/issues/15008, haven't tested
2023-12-07 09:59:50 +00:00
Lukas Wirth
45d81048c9 internal: Bump salsa 2023-12-07 10:57:51 +01:00
Lukas Wirth
a84685a58d Publish lsp-server 0.7.5 2023-12-06 22:00:01 +01:00
Lukas Wirth
9cb13b6efb Allow navigation targets to be duplicated when the focus range lies in the macro definition site 2023-12-06 12:38:19 +01:00
Laurențiu Nicola
73b9f885f6 Bump ra-ap-rustc_index and ra-ap-rustc_abi 2023-12-05 13:40:29 +02:00
Laurențiu Nicola
a9b037f510 Bump ra-ap-rustc_parse_format 2023-12-05 13:39:17 +02:00
Laurențiu Nicola
1834b38dbe Bump ra-ap-rustc_lexer 2023-12-05 13:38:35 +02:00
bors
e91fdf7860 Auto merge of #15959 - Veykril:macro-shower3, r=lnicola
TokenMap -> SpanMap rewrite

Opening early so I can have an overview over the full diff more easily, still very unfinished and lots of work to be done.

The gist of what this PR does is move away from assigning IDs to tokens in arguments and expansions and instead gives the subtrees the text ranges they are sourced from (made relative to some item for incrementality). This means we now only have a single map per expension, opposed to map for expansion and arguments.

A few of the things that are not done yet (in arbitrary order):
- [x] generally clean up the current mess
- [x] proc-macros, have been completely ignored so far
- [x] syntax fixups, has been commented out for the time being needs to be rewritten on top of some marker SyntaxContextId
- [x] macro invocation syntax contexts are not properly passed around yet, so $crate hygiene does not work in all cases (but most)
  - [x] builtin macros do not set spans properly, $crate basically does not work with them rn (which we use)
~~- [ ] remove all uses of dummy spans (or if that does not work, change the dummy entries for dummy spans so that tests will not silently pass due to havin a file id for the dummy file)~~
  - [x] de-queryfy `macro_expand`, the sole caller of it is `parse_macro_expansion`, and both of these are lru-cached with the same limit so having it be a query is pointless
- [x] docs and more docs
- [x] fix eager macro spans and other stuff
  - [x] simplify include! handling
- [x] Figure out how to undo the sudden `()` expression wrapping in expansions / alternatively prioritize getting invisible delimiters working again
- [x] Simplify InFile stuff and HirFIleId extensions
~~- [ ] span crate containing all the file ids, span stuff, ast ids. Then remove the dependency injection generics from tt and mbe~~

Fixes https://github.com/rust-lang/rust-analyzer/issues/10300
Fixes https://github.com/rust-lang/rust-analyzer/issues/15685
2023-12-04 19:59:53 +00:00
Lukas Wirth
b98597f06d Re-enable proc-macros 2023-11-28 16:28:56 +01:00
David Barsky
914a1570e2 internal: bump triomphe to 0.1.10 2023-11-28 10:27:17 -05:00
Lukas Wirth
98cfdde8ba Thinner TokenMap 2023-11-28 10:56:25 +01:00
Lukas Wirth
30093a6d81 spans always come from real file 2023-11-28 10:55:39 +01:00
Lukas Wirth
890eb17b4e Replace ID based TokenMap with proper relative text-ranges / spans 2023-11-28 10:55:39 +01:00
Laurențiu Nicola
3ccde009cb Switch to our own salsa fork 2023-11-26 13:06:36 +02:00
Laurențiu Nicola
fc880be491 Bump chalk 2023-11-25 20:38:11 +02:00
Laurențiu Nicola
aadeb66d03 Bump ra-ap-rustc_index and ra-ap-rustc_abi 2023-11-25 20:36:45 +02:00
Laurențiu Nicola
c01679eb7b Bump ra-ap-rustc_lexer 2023-11-25 20:36:06 +02:00
Laurențiu Nicola
fa74ac8457 Bump ra-ap-rustc_parse_format 2023-11-25 20:35:26 +02:00
Marc Schreiber
81c2d3552e Cancelable Initialization
This commit provides additional initialization methods to Connection in
order to support CTRL + C sigterm handling.
2023-11-21 21:29:33 +01:00
Laurențiu Nicola
480cb60be3 Bump libc 2023-11-16 21:48:49 +02:00
Laurențiu Nicola
da24b6fb12 Bump memchr 2023-11-15 21:24:20 +02:00
Laurențiu Nicola
8ea06c8ec8 Bump arbitrary and derive-arbitrary 2023-11-15 21:22:34 +02:00
Laurențiu Nicola
c6fad55c98 Bump bitflags 2023-11-15 21:20:47 +02:00
Laurențiu Nicola
3ed27d21f2 Bump cargo_metadata 2023-11-15 21:18:49 +02:00
Laurențiu Nicola
2814d646cb Bump rayon 2023-11-15 21:14:56 +02:00
Laurențiu Nicola
b18ce4f8ea Bump xshell 2023-11-15 21:12:18 +02:00
Laurențiu Nicola
83e6d7938c Bump tracing-tree again 2023-11-15 21:08:35 +02:00
Laurențiu Nicola
c66084b9c6 Bump ra-ap-rustc_index and ra-ap-rustc_abi 2023-11-15 13:42:13 +02:00
Laurențiu Nicola
b267f6b071 Bump ra-ap-rustc_lexer 2023-11-15 13:40:43 +02:00
Laurențiu Nicola
829cf8db4c Bump dissimilar 2023-11-15 13:34:56 +02:00
Laurențiu Nicola
572583262c Bump text-size 2023-11-15 13:33:03 +02:00
Laurențiu Nicola
a1f81a7e75 Bump chalk 2023-11-15 13:31:45 +02:00
Laurențiu Nicola
c4dfa06b9d Bump tracing-log 2023-11-15 13:25:19 +02:00
Laurențiu Nicola
1fc056ec93 Bump indexmap 2023-11-15 13:21:34 +02:00