Extract syntax highlighting properties from tree-sitter highlight queries (#2797)
This should be a purely internal change. Let me know if any visual changes are observed from this! ### Syntax theme - Update the theme to allow any syntax highlighting property used in any `highlight.scm` to be styled - Only define syntax styles that are baked into the default theme & don't use the default text style - Adds the `generate-syntax` command - Removes a few unused properties that we were styling for some reason, like `enum` and `variant`, neither of which exist in any `highlight.scm` - Moves `@constructor` symbols to `@method.constructor` to prevent issues with `constructor` being a reserved property in ts/js. Syntax is now build as the theme is created rather than as part of the styleTree. This means it no longer requires a compiled `Theme`, which makes things a bit more straightforward if we need to access it in other components that should be built before the styleTrees. ### Scheme Also updates all uses of `#match` in our `highlights.scm` files, as these break the scheme tree-sitter query. This fixes _most_ instances of our scheme highlighting breaking. For some reason something in here breaks the `highlights.scm` for PHP: ```scheme ((name) @constant.builtin (.match? @constant.builtin "^__[A-Z][A-Z\d_]+__$")) ((name) @method.constructor (.match? @method.constructor "^[A-Z]")) ((name) @variable.builtin (.eq? @variable.builtin "this")) ``` Release Notes: - No public facing changes
This commit is contained in:
commit
45c635872b
57 changed files with 631 additions and 554 deletions
|
@ -34,10 +34,14 @@ export default function status_bar(): any {
|
|||
...text(layer, "mono", "variant", { size: "xs" }),
|
||||
},
|
||||
active_language: text_button({
|
||||
color: "variant"
|
||||
color: "variant",
|
||||
}),
|
||||
auto_update_progress_message: text(layer, "sans", "variant", {
|
||||
size: "xs",
|
||||
}),
|
||||
auto_update_done_message: text(layer, "sans", "variant", {
|
||||
size: "xs",
|
||||
}),
|
||||
auto_update_progress_message: text(layer, "sans", "variant", { size: "xs" }),
|
||||
auto_update_done_message: text(layer, "sans", "variant", { size: "xs" }),
|
||||
lsp_status: interactive({
|
||||
base: {
|
||||
...diagnostic_status_container,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue