aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/syntax_highlighting.rs
Commit message (Collapse)AuthorAgeFilesLines
* Merge #5692bors[bot]2020-08-101-0/+2
|\ | | | | | | | | | | | | | | | | | | 5692: Add support for extern crate r=jonas-schievink a=Nashenas88 This adds syntax highlighting, hover and goto def functionality for extern crate. Fixes #5690 Co-authored-by: Paul Daniel Faria <[email protected]>
| * Add support for extern cratePaul Daniel Faria2020-08-081-0/+2
| | | | | | | | | | This adds syntax highlighting, hover and goto def functionality for extern crate
* | Merge #5684bors[bot]2020-08-081-10/+56
|\ \ | |/ |/| | | | | | | | | | | | | | | 5684: Semantic highlighting for unsafe union field access r=jonas-schievink a=Nashenas88 This change adds support for unions in inference and lowering, then extends on that to add the unsafe semantic modifier on field access only. The `is_possibly_unsafe` function in `syntax_highlighting.rs` could be extended to support fns and static muts so that their definitions are not highlighted as unsafe, but only their usage. Also, each commit of this PR updates the tests. By reviewing the files by commit, it's easy to see how the changes in the code affected the tests. Co-authored-by: Paul Daniel Faria <[email protected]>
| * Apply unsafe semantic highlighting to union field accessPaul Daniel Faria2020-08-081-10/+56
| |
* | Mark static mutable names as unsafePaul Daniel Faria2020-08-071-0/+1
|/
* Update grammarAleksey Kladov2020-08-011-1/+1
|
* Rename DotDotPat -> RestPatAleksey Kladov2020-07-311-1/+1
|
* Rename BindPat -> IdentPatAleksey Kladov2020-07-311-1/+1
|
* Finalize impl GrammarAleksey Kladov2020-07-301-1/+1
|
* Finalize Trait grammarAleksey Kladov2020-07-301-1/+1
|
* Finalize const&static grammarAleksey Kladov2020-07-301-2/+2
|
* Rename EnumVariant -> VariantAleksey Kladov2020-07-301-1/+1
|
* Rename EnumDef -> EnumAleksey Kladov2020-07-301-1/+1
|
* Rename StructDef -> StructAleksey Kladov2020-07-301-1/+1
|
* Finalize union grammarAleksey Kladov2020-07-301-1/+1
|
* Rename FieldDef -> FieldAleksey Kladov2020-07-301-1/+1
|
* Rename TypeAliasDef -> TypeAliasAleksey Kladov2020-07-301-1/+1
|
* Rename FnDef -> FnAleksey Kladov2020-07-301-2/+2
|
* On second thought, we want to preserve the textMate here where all ↵GrayJack2020-07-211-1/+3
| | | | punctuation that are from a Attr be highlited as Attribute
* `#` as AttributeGrayJack2020-07-211-0/+1
| | | | - Issue #5453
* @ as operatorGrayJack2020-07-211-2/+3
|
* Assingment semantic highlightGrayJack2020-07-201-1/+7
|
* Handle semantic highlight when STAR is part of the `*{const, mut}`GrayJack2020-07-201-1/+4
|
* Highlight more cases of SyntaxKind when it is a punctuationGrayJack2020-07-201-14/+32
|
* Add new `Punctuation` highlight tagLeander Tentrup2020-07-151-1/+1
|
* Highlight punctuation as `HighlightTag::Operator`Leander Tentrup2020-07-151-0/+1
|
* Semantic Highlighting: Emit mutable modifier for 'self' when applicableLukas Wirth2020-07-131-3/+24
|
* Use dedicated semantic highlight tag for parametersAleksey Kladov2020-07-111-2/+3
| | | | closes #5106
* Improve readability be replacing hard-to-read if-else branches with a matchPaul Daniel Faria2020-06-241-16/+20
|
* Remove unrelated changePaul Daniel Faria2020-06-231-4/+2
|
* Update comment for pop_and_injectPaul Daniel Faria2020-06-231-2/+2
| | | Co-authored-by: Leander Tentrup <[email protected]>
* Update injection mechanism and stop injecting through highlight element, ↵Paul Daniel Faria2020-06-231-17/+38
| | | | switch to more general new highlight tag, generic
* Add punctuation highlighting for highlighting punctuation in doctests, fix ↵Paul Daniel Faria2020-06-231-12/+13
| | | | highlighting in doctests
* Add support for marking doctest items as distinct from normal code, add ↵Paul Daniel Faria2020-06-231-7/+11
| | | | default tag to all doctest elements
* Syntax highlighting for documentation comments on macro definitionsLeander Tentrup2020-06-191-2/+1
|
* Merge #4903bors[bot]2020-06-181-1/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | 4903: Add highlighting support for doc comments r=matklad a=Nashenas88 The language server protocol includes a semantic modifier for documentation. This change exports that modifier for doc comments so users can choose to highlight them differently compared to regular comments. Example: <img width="375" alt="Screen Shot 2020-06-16 at 10 34 14 AM" src="https://user-images.githubusercontent.com/1673130/84788271-f6599580-afbc-11ea-96e5-7a0215da620b.png"> CC @woody77 Co-authored-by: Paul Daniel Faria <[email protected]>
| * Ensure all existing doctest code highlights have documentation modifierPaul Daniel Faria2020-06-171-4/+4
| |
| * Add highlighting support for doc commentsPaul Daniel Faria2020-06-171-1/+8
| |
* | Syntax highlighting for escape sequences in stringsLeander Tentrup2020-06-171-4/+18
|/
* Syntactic highlighting of NAME_REF for injectionsLeander Tentrup2020-06-151-3/+60
| | | | | | This commit adds a function that tries to determine the syntax highlighting class of NAME_REFs based on the usage. It is used for highlighting injections (such as highlighting of doctests) as the semantic logic will most of the time result in unresolved references. It also adds a color to unresolved references in HTML encoding.
* Fix syntax highlighting of recursive macrosLeander Tentrup2020-06-151-16/+21
| | | | Add syntax highlighting for the BANG (`!`) token if the parent is `MACRO_CALL`.
* Highlight only the unsafe operator itselfAleksey Kladov2020-06-081-6/+2
|
* Merge #4775bors[bot]2020-06-081-0/+1
|\ | | | | | | | | | | | | | | 4775: Add goto def for enum variant field r=matklad a=unexge Closes #4764. I'm not familiar with ra codebase, there might be better ways to do that :smile: Co-authored-by: unexge <[email protected]>
| * Add `FieldShorthand` variant to `NameClass`unexge2020-06-081-0/+1
| |
* | Implement syntax highlighting for doctestsLeander Tentrup2020-06-081-46/+80
|/
* Add highlight support for unsafe fn calls and raw ptr derefPaul Daniel Faria2020-06-021-1/+24
|
* Merge #4664bors[bot]2020-05-311-77/+84
|\ | | | | | | | | | | | | | | 4664: Generate feature documentation from code r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * Move the rest of the features to generated docsAleksey Kladov2020-05-311-77/+84
| |
* | Add semantic highlight to QUESTION tokenRoland Ruckerbauer2020-05-291-0/+1
|/ | | | Made it an operator with controlFlow modifier.
* Add self keyword semantic token typeLaurențiu Nicola2020-05-251-0/+1
|