Aleksey Kladov
9818108798
Rename BindPat -> IdentPat
2020-07-31 20:12:10 +02:00
Aleksey Kladov
c5798c4d75
Finalize impl Grammar
2020-07-30 18:28:28 +02:00
Aleksey Kladov
c83467796b
Finalize Trait grammar
2020-07-30 18:17:28 +02:00
Aleksey Kladov
3cd4112bdc
Finalize const&static grammar
2020-07-30 18:02:20 +02:00
Aleksey Kladov
1766aae145
Rename EnumVariant -> Variant
2020-07-30 17:56:53 +02:00
Aleksey Kladov
609680ef97
Rename EnumDef -> Enum
2020-07-30 17:52:53 +02:00
Aleksey Kladov
216a5344c8
Rename StructDef -> Struct
2020-07-30 17:50:40 +02:00
Aleksey Kladov
1ae4721c9c
Finalize union grammar
2020-07-30 17:38:52 +02:00
Aleksey Kladov
0a9e3ccc26
Rename FieldDef -> Field
2020-07-30 16:49:13 +02:00
Aleksey Kladov
eb2f806344
Rename TypeAliasDef -> TypeAlias
2020-07-30 15:25:46 +02:00
Aleksey Kladov
1142112c70
Rename FnDef -> Fn
2020-07-30 15:16:05 +02:00
GrayJack
5ca3855c06
On second thought, we want to preserve the textMate here where all punctuation that are from a Attr be highlited as Attribute
2020-07-20 23:37:31 -03:00
GrayJack
04d8dc4a10
#
as Attribute
...
- Issue #5453
2020-07-20 23:19:29 -03:00
GrayJack
462e0158da
@ as operator
2020-07-20 23:00:13 -03:00
GrayJack
a662228de4
Assingment semantic highlight
2020-07-20 12:36:23 -03:00
GrayJack
54ebb2ce30
Handle semantic highlight when STAR is part of the *{const, mut}
2020-07-20 11:21:40 -03:00
GrayJack
73bab32aef
Highlight more cases of SyntaxKind when it is a punctuation
2020-07-20 09:46:50 -03:00
Leander Tentrup
119e71d9ea
Add new Punctuation
highlight tag
2020-07-15 16:42:47 +02:00
Leander Tentrup
33832d43fc
Highlight punctuation as HighlightTag::Operator
2020-07-15 16:40:38 +02:00
Lukas Wirth
91b35d8827
Semantic Highlighting: Emit mutable modifier for 'self' when applicable
2020-07-13 21:39:01 +02:00
Aleksey Kladov
e1d6b7f7c4
Use dedicated semantic highlight tag for parameters
...
closes #5106
2020-07-11 14:51:41 +02:00
Paul Daniel Faria
0d87eee3a9
Improve readability be replacing hard-to-read if-else branches with a match
2020-06-23 19:35:09 -04:00
Paul Daniel Faria
a8a606cdc4
Remove unrelated change
2020-06-23 12:40:55 -04:00
Paul Daniel Faria
1e9095ae8c
Update comment for pop_and_inject
...
Co-authored-by: Leander Tentrup <ltentrup@users.noreply.github.com>
2020-06-23 12:15:45 -04:00
Paul Daniel Faria
2a56323537
Update injection mechanism and stop injecting through highlight element, switch to more general new highlight tag, generic
2020-06-23 12:13:50 -04:00
Paul Daniel Faria
d8230acd84
Add punctuation highlighting for highlighting punctuation in doctests, fix highlighting in doctests
2020-06-23 12:11:33 -04:00
Paul Daniel Faria
351bba9bee
Add support for marking doctest items as distinct from normal code, add default tag to all doctest elements
2020-06-23 12:08:04 -04:00
Leander Tentrup
df5b37cb61
Syntax highlighting for documentation comments on macro definitions
2020-06-20 00:02:42 +02:00
bors[bot]
f7f627d342
Merge #4903
...
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 <Nashenas88@users.noreply.github.com>
2020-06-18 13:23:14 +00:00
Paul Daniel Faria
a951108173
Ensure all existing doctest code highlights have documentation modifier
2020-06-17 09:33:21 -04:00
Leander Tentrup
2145e2d878
Syntax highlighting for escape sequences in strings
2020-06-17 15:27:13 +02:00
Paul Daniel Faria
aae26bc5b8
Add highlighting support for doc comments
2020-06-17 08:29:13 -04:00
Leander Tentrup
c4b3db0c2f
Syntactic highlighting of NAME_REF for injections
...
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.
2020-06-15 22:13:53 +02:00
Leander Tentrup
06f89e5f3a
Fix syntax highlighting of recursive macros
...
Add syntax highlighting for the BANG (`!`) token if the parent is `MACRO_CALL`.
2020-06-15 15:03:13 +02:00
Aleksey Kladov
c476f71bdf
Highlight only the unsafe operator itself
2020-06-08 15:03:14 +02:00
bors[bot]
83fd0fb355
Merge #4775
...
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 😄
Co-authored-by: unexge <unexge@gmail.com>
2020-06-08 12:46:12 +00:00
Leander Tentrup
4a2efb2f42
Implement syntax highlighting for doctests
2020-06-08 14:18:16 +02:00
unexge
c5d5d21858
Add FieldShorthand
variant to NameClass
2020-06-08 14:46:58 +03:00
Paul Daniel Faria
a9cb2933fb
Add highlight support for unsafe fn calls and raw ptr deref
2020-06-02 18:54:00 -04:00
bors[bot]
09df51dab8
Merge #4664
...
4664: Generate feature documentation from code r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-05-31 10:50:11 +00:00
Aleksey Kladov
1c6a2eb14a
Move the rest of the features to generated docs
2020-05-31 11:29:19 +02:00
Roland Ruckerbauer
18aa4bcb03
Add semantic highlight to QUESTION token
...
Made it an operator with controlFlow modifier.
2020-05-29 21:17:14 +02:00
Laurențiu Nicola
c2358365ad
Add self keyword semantic token type
2020-05-25 12:08:58 +03:00
Matthew Jasper
1895888aec
Handle more cases in highlight_name_by_syntax
2020-05-24 15:12:17 +01:00
Matthew Jasper
e2d36cb692
Highlight true
and false
as literals
2020-05-24 15:12:17 +01:00
George Fraser
47ce5ea581
Color attribute functions
2020-05-18 22:55:46 -07:00
George Fraser
63b75a40c8
Color for
as a regular keyword when it's part of impl _ for _
2020-05-10 13:11:14 -07:00
George Fraser
3f1c73633e
Color in
as a control keyword
2020-05-10 13:07:28 -07:00
Matthew Jasper
22b75c4cea
Highlight the name in macro declarations
2020-05-10 16:25:51 +01:00
Matthew Jasper
11c0a5bb60
Highlight mutable statics as mutable
2020-05-10 16:25:51 +01:00