Add support for highlight properties that track local variables
This commit is contained in:
parent
d78ac581f3
commit
a7d02e7276
4 changed files with 117 additions and 5 deletions
|
|
@ -138,7 +138,8 @@ impl Default for Theme {
|
|||
"tag": 18,
|
||||
"type": 23,
|
||||
"type.builtin": {"color": 23, "bold": true},
|
||||
"variable.builtin": {"bold": true}
|
||||
"variable.builtin": {"bold": true},
|
||||
"variable.parameter": {"underline": true}
|
||||
}
|
||||
"#,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ use tree_sitter::{self, PropertyStateJSON, PropertyTransitionJSON};
|
|||
#[serde(untagged)]
|
||||
enum PropertyValue {
|
||||
Number(isize),
|
||||
Boolean(bool),
|
||||
String(String),
|
||||
Object(PropertySet),
|
||||
Array(Vec<PropertyValue>),
|
||||
|
|
@ -737,8 +738,8 @@ fn parse_sass_value(value: &Value) -> Result<PropertyValue> {
|
|||
}
|
||||
Value::Color(_, Some(name)) => Ok(PropertyValue::String(name.clone())),
|
||||
Value::Numeric(n, _) => Ok(PropertyValue::Number(n.to_integer())),
|
||||
Value::True => Ok(PropertyValue::String("true".to_string())),
|
||||
Value::False => Ok(PropertyValue::String("false".to_string())),
|
||||
Value::True => Ok(PropertyValue::Boolean(true)),
|
||||
Value::False => Ok(PropertyValue::Boolean(false)),
|
||||
_ => Err(Error(format!(
|
||||
"Property values must be strings or function calls. Got {:?}",
|
||||
value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue