-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Open
Labels
C-bugCategory: This is a bugCategory: This is a bug
Description
Summary
Reproduction Steps
I tried this:
- Changing the theme doesn't work. STill the same highlight behaviour.
I expected this to happen: Syntax highlight should be the same as both.
z
Instead, this happened: It's different
Here's the code for copy pasting:
correct version:
macro_rules! typst_func {
(
$( #[$attr:meta] )*
$vis:vis struct $struct_name:ident {
$( $pos_arg:ident: $pos_type:ty, )*
$(
#[named]
$( $named_arg:ident: $named_type:ty, )*
)?
}
) => {
$( #[$attr] )*
$vis struct $struct_name {
$($pos_arg: $pos_type,)*
$($($named_arg: Option<$named_type>,)*)?
}
};
}
typst_func! {
#[derive(Resource, Reflect, Default)]
#[reflect(Resource)]
pub struct MainFunc {
pos_arg0: f64,
pos_arg1: u32,
// Anything below the this will be a named argument.
#[named]
named_arg0: bool,
named_arg1: i32,
named_arg2: String,
}
}
fn test() {
let main = MainFunc::default();
}Not working correctly version:
macro_rules! typst_func {
(
$( #[$attr:meta] )*
$vis:vis struct $struct_name:ident {
$( $pos_arg:ident: $pos_type:ty, )*
$(
#[named]
$( $named_arg:ident: $named_type:ty, )*
)?
}
) => {
$( #[$attr] )*
$vis struct $struct_name {
$($pos_arg: $pos_type,)*
$($($named_arg: Option<$named_type>,)*)?
}
};
}
typst_func! (
#[derive(Resource, Reflect, Default)]
#[reflect(Resource)]
pub struct MainFunc {
pos_arg0: f64,
pos_arg1: u32,
// Anything below the this will be a named argument.
#[named]
named_arg0: bool,
named_arg1: i32,
named_arg2: String,
}
);
fn test() {
let main = MainFunc::default();
}Helix log
N/A
Platform
Windows
Terminal Emulator
Windows terminal
Installation Method
cargo
Helix Version
main (388a3b7)
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bugCategory: This is a bug

