aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/syntax_highlighting
Commit message (Collapse)AuthorAgeFilesLines
* Move SymbolKind to ide_dbLukas Wirth2021-01-203-4/+5
|
* Wrap remaining self/super/crate in Name{Ref}Lukas Wirth2021-01-151-13/+9
|
* Handle self/super/crate in PathSegment as NameRefLukas Wirth2021-01-155-44/+27
|
* Use upstream TextSize APIAleksey Kladov2021-01-132-15/+3
|
* Merge #7239bors[bot]2021-01-101-1/+1
|\ | | | | | | | | | | | | | | 7239: Replace SyntaxKind usage with T! macro where applicable r=lnicola a=Veykril https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/dev/style.md#token-names Co-authored-by: Lukas Wirth <[email protected]>
| * Replace SyntaxKind usage with T! macro where applicableLukas Wirth2021-01-101-1/+1
| |
* | Fix typo, parentheses is pluralLaurențiu Nicola2021-01-109-133/+133
|/
* Merge #6238bors[bot]2021-01-1011-302/+345
|\ | | | | | | | | | | | | | | | | | | 6238: Split punctuation semantic highlighting up into more tags r=matklad a=Veykril Open question would be the name of the delimiter modifiers. I chose them this was as I see them this way but from what I remember people tend to mix the names however they like. So maybe using `delimSquare`, `delimCurly`, `delimRound` would be better. That would also go well with `angle` becoming `delimAngle`? Closes #6152 Co-authored-by: Lukas Wirth <[email protected]>
| * Split punctuation semantic highlighting up into more tagsLukas Wirth2021-01-1011-302/+345
| |
| |
| \
*-. \ Merge #7206 #7231bors[bot]2021-01-103-10/+13
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7206: Use hir::GenericParam in ide_db::Definition instead of relisting all 3 r=Veykril a=Veykril Basically just this: ```diff pub enum Definition { Macro(MacroDef), Field(Field), ModuleDef(ModuleDef), SelfType(Impl), Local(Local), - TypeParam(TypeParam), - LifetimeParam(LifetimeParam), - ConstParam(ConstParam), + GenericParam(GenericParam), Label(Label), } ``` 7231: Cleaner API r=matklad a=matklad bors r+ 🤖 Co-authored-by: Lukas Wirth <[email protected]> Co-authored-by: Aleksey Kladov <[email protected]>
| | * Cleaner APIAleksey Kladov2021-01-102-7/+8
| |/ |/|
| * Use hir::GenericParam in ide_db::Definition instead of relisting all 3Lukas Wirth2021-01-101-3/+5
|/
* Replace state with functionAleksey Kladov2021-01-101-46/+36
|
* Refactor highlightingAleksey Kladov2021-01-092-1/+518
|
* SimplifyAleksey Kladov2021-01-091-81/+49
|
* Better highlight for fixturesAleksey Kladov2021-01-092-2/+6
|
* SimplifyAleksey Kladov2021-01-091-51/+27
|
* Better namesAleksey Kladov2021-01-092-15/+16
|
* Reduce duplicationAleksey Kladov2021-01-091-7/+5
|
* Shorten namesAleksey Kladov2021-01-094-55/+38
|
* Shorten frequent namesAleksey Kladov2021-01-095-81/+81
|
* Rename dummy -> noneAleksey Kladov2021-01-093-15/+15
|
* Simplify highlighting infraAleksey Kladov2021-01-088-88/+260
| | | | This also fixes the killer whale bug
* Better fixture highlightAleksey Kladov2021-01-073-4/+119
|
* Formatting.Mara Bos2021-01-011-2/+11
|
* Add support for Rust 2021.Mara Bos2021-01-011-1/+1
|
* Add ConstParams to the ide layerLukas Wirth2021-01-013-0/+9
|
* Support labels in reference searchLukas Wirth2020-12-2411-0/+20
|
* Make sure that HighlightModifier::ALL is synchronized with enumAleksey Kladov2020-12-196-36/+39
|
* Clarify the meaning of no-op highlight tagAleksey Kladov2020-12-193-14/+13
|
* Use more Rustic highlighting specifiersAleksey Kladov2020-12-196-35/+40
| | | | | *Method* works for OO languages, but in rust we can also have associated constants & types, so let's move this to a modifier.
* Deduplicate highlight tags and symbol kindsAleksey Kladov2020-12-182-45/+37
| | | | | | | 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
* Make macro def krate mandatoryJonas Schievink2020-12-152-1/+7
| | | | Refactors builtin derive support to go through proper name resolution
* Move to upstream `macro_rules!` modelJonas Schievink2020-12-153-7/+7
|
* Use METHOD semantic token typeLaurențiu Nicola2020-12-046-32/+34
|
* Add attribute highlight modifier to all tokens inside attributesLukas Wirth2020-11-213-7/+7
|
* format string highlighting: handle hex + debug type specifierRoland Ruckerbauer2020-11-152-0/+4
|
* Merge #6472bors[bot]2020-11-095-2/+90
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6472: Add `static` modifier for associated functions r=matklad a=p3achyjr Adds static semantic token modifier to associated functions, resolves #6194 ## Info - Associated functions are more-or-less equivalent to static methods in other languages. This PR checks, for each function, whether that function has a self_param, and whether it's enclosed in a trait/impl. ## Changes - Added method ```is_associated``` to code_model::Function. This basically gets the source from the ast, and checks whether the enclosing scope is an impl or trait. - Added `static` to HighlightModifiers - Added unit test ## Tests - Ran ```cargo test``` Co-authored-by: Anatol Liu <[email protected]>
| * Add static semantic token modifier for associated functions with no &selfAnatol Liu2020-11-055-2/+90
| |
* | . is an operatorAleksey Kladov2020-11-094-27/+27
| | | | | | | | closes #6498
* | SimplifyAleksey Kladov2020-11-061-1/+0
| |
* | Kill RAW_ literalsAleksey Kladov2020-11-062-4/+2
|/ | | | | Syntactically, they are indistinguishable from non-raw versions, so it doesn't make sense to separate then *at the syntax* level.
* Merge #6379bors[bot]2020-10-272-0/+12
|\ | | | | | | | | | | | | | | 6379: Highlight never type as BuiltinType r=matklad a=Veykril Fixes #6374 Co-authored-by: Lukas Wirth <[email protected]>
| * Highlight never type as BuiltinTypeLukas Wirth2020-10-262-0/+12
| |
* | Fix testGrayJack2020-10-261-158/+158
| |
* | Add test to avoid regressionGrayJack2020-10-262-153/+165
|/
* Fix unary minus highlightingLukas Wirth2020-10-252-0/+6
|
* Re-export base_db from ide_dbIgor Aleksanov2020-10-241-1/+1
|
* Make call_info a part of ide_dbIgor Aleksanov2020-10-241-1/+1
|
* Merge #6251 #6310bors[bot]2020-10-233-0/+41
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Co-authored-by: Lukas Wirth <[email protected]>