aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/syntax_highlighting
Commit message (Collapse)AuthorAgeFilesLines
* Add test showing unresolved module renamePaul Daniel Faria2020-08-041-0/+3
|
* Replace rand with oorandomAleksey Kladov2020-07-291-5/+5
|
* Add new `Punctuation` highlight tagLeander Tentrup2020-07-151-0/+2
|
* Semantic Highlighting: Emit mutable modifier for 'self' when applicableLukas Wirth2020-07-131-0/+10
|
* Use dedicated semantic highlight tag for parametersAleksey Kladov2020-07-112-2/+5
| | | | closes #5106
* Don't mess with cursor position when adding hashesAleksey Kladov2020-07-091-1/+1
|
* Move test data to test_data directoryAleksey Kladov2020-07-011-6/+6
|
* Add file support to expectAleksey Kladov2020-07-011-12/+10
|
* Remove unneeded code, filename from tests, fix rebasing issuesPaul Daniel Faria2020-06-272-4/+4
|
* Revert ide highlighting changes (addressing on another branch)Paul Daniel Faria2020-06-273-36/+5
|
* Add HighlightTag::Operator, use it for unsafe deref. Move unsafe validation ↵Paul Daniel Faria2020-06-271-1/+1
| | | | to its own file
* Account for deref token in syntax highlighting of unsafe, add test for that casePaul Daniel Faria2020-06-271-0/+1
|
* Fix typo in testPaul Daniel Faria2020-06-271-1/+1
|
* Move diagnostics back into expr, add tests for diagnostics, fix logic to ↵Paul Daniel Faria2020-06-271-0/+2
| | | | account for derefs of raw ptrs
* Add unsafe diagnostics and unsafe highlightingPaul Daniel Faria2020-06-271-0/+28
|
* SimplifyAleksey Kladov2020-06-241-8/+3
|
* Use fixtures moreAleksey Kladov2020-06-241-6/+7
|
* Update injection mechanism and stop injecting through highlight element, ↵Paul Daniel Faria2020-06-233-9/+9
| | | | switch to more general new highlight tag, generic
* Add punctuation highlighting for highlighting punctuation in doctests, fix ↵Paul Daniel Faria2020-06-233-5/+5
| | | | highlighting in doctests
* Add default color and opacity for documentation and injected, respectively, ↵Paul Daniel Faria2020-06-231-0/+2
| | | | in the html generator
* Add support for marking doctest items as distinct from normal code, add ↵Paul Daniel Faria2020-06-233-2/+9
| | | | default tag to all doctest elements
* Fix underflow panic when doctests are at top of filePaul Daniel Faria2020-06-232-4/+11
|
* Syntax highlighting for documentation comments on macro definitionsLeander Tentrup2020-06-191-0/+9
|
* Merge #4903bors[bot]2020-06-182-2/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+0
| |
| * Ensure all existing doctest code highlights have documentation modifierPaul Daniel Faria2020-06-171-4/+5
| |
| * Add highlighting support for doc commentsPaul Daniel Faria2020-06-172-2/+9
| |
* | Syntax highlighting for escape sequences in stringsLeander Tentrup2020-06-173-0/+7
|/
* Inspect markdown code fences to determine whether to apply syntax highlightingLeander Tentrup2020-06-162-3/+17
|
* Syntactic highlighting of NAME_REF for injectionsLeander Tentrup2020-06-153-4/+15
| | | | | | 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-12/+14
|
* Better unsafe highlihgting testsAleksey Kladov2020-06-082-2/+3
|
* Implement syntax highlighting for doctestsLeander Tentrup2020-06-082-0/+218
|
* Remove redundancy in syntax highlighting testsLeander Tentrup2020-06-071-32/+27
|
* Add highlight support for unsafe fn calls and raw ptr derefPaul Daniel Faria2020-06-023-4/+36
|
* Test case for format string highlighting of closing curlybraceRoland Ruckerbauer2020-05-301-0/+1
|
* Add semantic highlight to QUESTION tokenRoland Ruckerbauer2020-05-291-0/+2
| | | | Made it an operator with controlFlow modifier.
* Add self keyword semantic token typeLaurențiu Nicola2020-05-251-0/+2
|
* Highlight `true` and `false` as literalsMatthew Jasper2020-05-242-0/+3
|
* Color attribute functionsGeorge Fraser2020-05-191-1/+5
|
* 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 mutable statics as mutableMatthew Jasper2020-05-101-1/+6
|
* Introduce new semantic highlight token for format specifierLeander Tentrup2020-04-282-0/+3
|
* CleanupsAleksey Kladov2020-04-251-8/+5
|
* Convert tests to text-sizeAleksey Kladov2020-04-251-1/+1
|
* Convert code to text-sizeAleksey Kladov2020-04-251-5/+6
|
* Merge #3998 #4006bors[bot]2020-04-241-0/+70
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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