aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/snapshots
Commit message (Collapse)AuthorAgeFilesLines
* Merge #4903bors[bot]2020-06-181-38/+38
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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]>
| * Remove logic to mark all doctest code asPaul Daniel Faria2020-06-181-13/+13
| |
| * Ensure all existing doctest code highlights have documentation modifierPaul Daniel Faria2020-06-171-13/+13
| |
| * Add highlighting support for doc commentsPaul Daniel Faria2020-06-171-38/+38
| |
* | Syntax highlighting for escape sequences in stringsLeander Tentrup2020-06-176-1/+11
|/
* Inspect markdown code fences to determine whether to apply syntax highlightingLeander Tentrup2020-06-161-1/+5
|
* Syntactic highlighting of NAME_REF for injectionsLeander Tentrup2020-06-156-6/+22
| | | | | | 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-0/+8
| | | | Add syntax highlighting for the BANG (`!`) token if the parent is `MACRO_CALL`.
* In field patterns, don't highlight local binding as a fieldAleksey Kladov2020-06-101-1/+3
|
* Better unsafe highlihgting testsAleksey Kladov2020-06-086-7/+13
|
* Implement syntax highlighting for doctestsLeander Tentrup2020-06-081-0/+70
|
* Fix bug in lexer for format specifier where the `type` and `width` were not ↵Leander Tentrup2020-06-071-1/+1
| | | | correctly distinguished
* Add highlight support for unsafe fn calls and raw ptr derefPaul Daniel Faria2020-06-025-0/+52
|
* Test case for format string highlighting of closing curlybraceRoland Ruckerbauer2020-05-301-0/+1
|
* Add self keyword semantic token typeLaurențiu Nicola2020-05-251-4/+4
|
* Highlight `true` and `false` as literalsMatthew Jasper2020-05-244-1/+5
|
* Color attribute functionsGeorge Fraser2020-05-191-1/+1
|
* Color `for` as a regular keyword when it's part of impl _ for _George Fraser2020-05-101-0/+10
|
* Color `in` as a control keywordGeorge Fraser2020-05-101-0/+4
|
* Highlight the name in macro declarationsMatthew Jasper2020-05-102-3/+5
|
* Highlight mutable statics as mutableMatthew Jasper2020-05-101-1/+4
|
* Introduce new semantic highlight token for format specifierLeander Tentrup2020-04-284-35/+39
|
* Merge #3998 #4006bors[bot]2020-04-241-0/+82
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3998: Make add_function generate functions in other modules via qualified path r=matklad a=TimoFreiberg Additional feature for #3639 - [x] Add tests for paths with more segments - [x] Make generating the function in another file work - [x] Add `pub` or `pub(crate)` to the generated function if it's generated in a different module - [x] Make the assist jump to the edited file - [x] Enable file support in the `check_assist` helper 4006: Syntax highlighting for format strings r=matklad a=ltentrup I have an implementation for syntax highlighting for format string modifiers `{}`. The first commit refactors the changes in #3826 into a separate struct. The second commit implements the highlighting: first we check in a macro call whether the macro is a format macro from `std`. In this case, we remember the format string node. If we encounter this node during syntax highlighting, we check for the format modifiers `{}` using regular expressions. There are a few places which I am not quite sure: - Is the way I extract the macro names correct? - Is the `HighlightTag::Attribute` suitable for highlighting the `{}`? Let me know what you think, any feedback is welcome! Co-authored-by: Timo Freiberg <[email protected]> Co-authored-by: Leander Tentrup <[email protected]> Co-authored-by: Leander Tentrup <[email protected]>
| * Adapt format specifier highlighting to support escaped squences and unicode ↵Leander Tentrup2020-04-221-0/+5
| | | | | | | | identifiers
| * Implement syntax highlighting for format stringsLeander Tentrup2020-04-201-0/+77
| | | | | | | | | | | | | | Detailed changes: 1) Implement a lexer for string literals that divides the string in format specifier `{}` including the format specifier modifier. 2) Adapt syntax highlighting to add ranges for the detected sequences. 3) Add a test case for the format string syntax highlighting.
* | Add semantic tag for unresolved referencesAleksey Kladov2020-04-182-6/+6
|/ | | | | | | | | | | This is a quick way to implement unresolved reference diagnostics. For example, adding to VS Code config "editor.tokenColorCustomizationsExperimental": { "unresolvedReference": "#FF0000" }, will highlight all unresolved refs in red.
* Simplify HTML highlighter and add test case for highlight_injection logicLeander Tentrup2020-04-062-5/+44
|
* Correctly flag 'lifetime definitions as definitionsAleksey Kladov2020-02-282-30/+29
|
* Fix highlighting of const patternsAleksey Kladov2020-02-281-4/+11
|
* Fix highlighting testAleksey Kladov2020-02-282-38/+42
|
* Fix html testsAleksey Kladov2020-02-272-33/+33
|
* Refactor primary IDE APIAleksey Kladov2020-02-261-6/+6
| | | | | | | | | | This introduces the new type -- Semantics. Semantics maps SyntaxNodes to various semantic info, such as type, name resolution or macro expansions. To do so, Semantics maintains a HashMap which maps every node it saw to the file from which the node originated. This is enough to get all the necessary hir bits just from syntax.
* Add module colors to cssAleksey Kladov2020-02-162-0/+2
|
* Implement Syntax Highlight inside MacroEdwin Cheng2020-01-202-6/+16
|
* Drop support for legacy colorizationAleksey Kladov2019-12-312-6/+6
|
* Fix highlighting for field init shorthandAleksey Kladov2019-12-201-1/+1
|
* Improve highlighting testAleksey Kladov2019-12-202-1/+4
|
* Fix highlighting token namesAleksey Kladov2019-12-172-2/+2
|
* fixed rainbow-highlighting testOmer Ben-Amram2019-12-151-0/+2
|
* removed `type.alias`Omer Ben-Amram2019-12-141-12/+14
|
* Rename GenericParam -> TypeParamAleksey Kladov2019-12-071-0/+1
| | | | We don't have LifetimeParam yet, but they are planned!
* Get the right analyzer for implsAleksey Kladov2019-12-071-0/+9
|
* rename ra_ide_api -> ra_ideAleksey Kladov2019-11-272-0/+81