about summary refs log tree commit diff
path: root/crates/ide/src/syntax_highlighting
AgeCommit message (Collapse)AuthorLines
2022-07-18Auto merge of #12549 - bitgaoshu:goto_where_trait_m_impl, r=Veykrilbors-1/+5
feat: Go to implementation of trait methods try goto where the trait method implies, #4558
2022-07-16Auto merge of #12689 - Veykril:macro-rec, r=Veykrilbors-0/+14
internal: Record all macro definitions in ItemScope Fixes https://github.com/rust-lang/rust-analyzer/issues/12100 Doesn't resolve the shadowing issues though, fixing those is gonna be really tricky I believe unless we can come up with a nice scheme to "order" item tree items (using syntax ranges and file ids would be a pain and also a bad idea since that'll require us to potentially reparse files in collection).
2022-07-15fix: Don't show qualified path completions for private itemsLukas Wirth-12/+12
2022-07-05internal: Record all macro definitions in ItemScopeLukas Wirth-0/+14
2022-06-24highlight: trait pathbitgaoshu-2/+6
2022-06-24fix some test due to resolve to where trait m implbitgaoshu-1/+1
2022-06-10internal: Bump DependenciesLukas Wirth-1/+1
2022-05-22feat: escape format specifier(close: #12258)bvanjoi-3/+24
2022-05-20minor: SimplifyLukas Wirth-4/+1
2022-05-13Revert "Auto merge of #12149 - jonas-schievink:literally-just-a-literal, ↵Jonas Schievink-16/+8
r=jonas-schievink" This reverts commit cc9ae2b89e01a30e441371b9fd3376c3d03a475f, reversing changes made to 7dfd1cb572d8d4fd951237361e43ecddd9c9a852.
2022-05-05Maybe everything else *should* have to deal with itJonas Schievink-2/+7
2022-05-05Wrap floats in token trees in `FLOAT_LITERAL` nodeJonas Schievink-7/+10
2022-05-05Split float literal tokens at the `.`Jonas Schievink-8/+8
2022-04-25Re-export `FxHashMap` and `FxHashSet` from `ide_db`Lukas Wirth-2/+1
2022-04-15fix: Tag `macro_rules` macro bang with `MacroBang` tagLukas Wirth-18/+18
2022-04-07Determine function unsafety semanticallyJonas Schievink-2/+2
2022-04-06fix: Attempt to resolve paths in const arguments heuristicallyLukas Wirth-0/+2
While we don't support const args in type inference yet, we can at least make use of the fallback path resolution to resolve paths in const args in the IDE layer to enable some features for them.
2022-04-06fix: Fix path qualifiers not resolving generic type params when shadowed by ↵Lukas Wirth-0/+9
trait
2022-04-01Merge #11869bors[bot]-3/+14
11869: fix: code blocks with tilde also works like code block r=Veykril a=moreal The `rustdoc` uses the `pulldown_cmark` package to parse *doc_comment* and the package also treat triple `~` characters also as code block fences. So when we run `cargo doc`, they will be placed also. <img width="965" alt="image" src="https://user-images.githubusercontent.com/26626194/161208072-5a09a209-57fc-4a52-b190-b0a9be9ffcd6.png"> But `rust-analyzer` doesn't support it so it doesn't have any injected code highlights and any `Run doctest` hint. This pull request tries to allow also them. 🙇🏻‍♂️ Before: <img width="224" alt="image" src="https://user-images.githubusercontent.com/26626194/161207405-b1d6cfda-82b1-4f60-8e42-c51d0ed98f38.png"> After: <img width="161" alt="image" src="https://user-images.githubusercontent.com/26626194/161207693-8e39997c-9ca6-4e69-8c65-e9b70899f7db.png"> Co-authored-by: Lee Dogeon <dev.moreal@gmail.com>
2022-04-01Code blocks with tilde also works like code blockLee Dogeon-3/+14
2022-03-31internal: Enforce Resolver to always have a module scopeLukas Wirth-13/+9
2022-03-30internal: Refactor FamousDefs builtin crate searchLukas Wirth-7/+3
2022-03-23Adjust value in syntax highlighting benchmarkFlorian Diebold-1/+1
2022-03-21Replace write! with direct callsLaurențiu Nicola-3/+7
2022-03-20internal: Treat {global_}asm macros as unsafeLukas Wirth-3/+3
2022-03-20feat: Tag macro calls as unsafe if they expand to unsafe expressionsLukas Wirth-1/+63
2022-03-12more clippy fixes:Matthias Krüger-1/+1
clippy::search_is_some clippy::redundant_static_lifetimes clippy::match_single_binding clippy::match_ref_pats clippy::map_entry clippy::manual_map clippy::iter_overeager_cloned clippy::into_iter_on_ref clippy::extra_unused_lifetimes
2022-03-12fix clippy::single_char_patternMatthias Krüger-1/+1
2022-03-12Fixed code style issuesyipinliu-61/+6
2022-03-12Fixed tidy testyipinliu-1/+1
2022-03-12Highlight escape sequences in byte stringsyipinliu-0/+86
2022-03-09Merge #11663bors[bot]-1/+1
11663: Internal: Add hir_def::MacroId, add Macro{Id} to ModuleDef{Id} r=Veykril a=Veykril With this we can now handle macros like we handle ModuleDefs making them work more like other definitions and allowing us to remove a bunch of special cases. This also enables us to track the modules these macros are defined in, instead of only recording the crate they come from. Introduces a new class of `MacroId`s (for each of the 3 macro kinds) into `hir_def`. We can't reuse `MacroDefId` as that is defined in `hir_expand` which doesn't know of modules, so now we have two different macro ids, this unfortunately requires some back and forth mapping between the two via database accesses which I hope won't be too expensive. Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-03-08Move ide crates to new hir::MacroLukas Wirth-1/+1
2022-03-07Emit more detailed highlighting for `%`, `>>`, `<<`Luna Razzaghipour-4/+85
2022-03-06internal: Re-arrange ide_db modulesLukas Wirth-4/+3
2022-03-06internal: Simplify and optimize syntax_highlightingLukas Wirth-114/+102
2022-03-06Add a macro case for the keyword highlighting test fixtureLukas Wirth-6/+14
2022-03-06Fix extern crate self having self unresolvedLukas Wirth-1/+1
2022-03-06Highlight `Self` as a keyword by defaultLukas Wirth-9/+84
2022-03-05Fix highlighting of `Self`Lukas Wirth-3/+5
2022-03-05fix: Recognize `Self` as a proper keywordLukas Wirth-3/+3
2022-03-04Preserve order of generic argshkalbasi-1/+15
2022-03-03slightly improve highlighting performance for derive annotated itemsLukas Wirth-7/+2
2022-03-03fix: Fix semantic highlighting breaking for lifetimes in macrosLukas Wirth-0/+81
2022-02-26Make hir::Local::name infallibleLukas Wirth-9/+7
2022-02-26Rename test highlighting output filesLukas Wirth-85/+176
2022-02-26Split up highlighting tests a bit moreLukas Wirth-139/+91
2022-02-26Re-order and cleanup highlighting testsLukas Wirth-208/+199
2022-02-22internal: Expand the derive attribute into a pseudo expansionLukas Wirth-14/+3
2022-01-31fix: Fix proc-macro server not using the supplied span in Ident::newLukas Wirth-20/+0