From 399c866fb4f8f04e29ea22c9b8097b473c5c238a Mon Sep 17 00:00:00 2001 From: Tobiasz Laskowski Date: Mon, 12 Aug 2024 17:41:35 +0100 Subject: [PATCH 1/9] Highlight all statements as keywords --- estilo/syntax/base.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/estilo/syntax/base.yml b/estilo/syntax/base.yml index 3a40a1d..5736d4f 100644 --- a/estilo/syntax/base.yml +++ b/estilo/syntax/base.yml @@ -54,8 +54,8 @@ Number: "" # Constant Float: "" # Constant Identifier: "keywords" Function: "keywords" # Identifier -Statement: "" -Conditional: "keywords" # Statement +Statement: "keywords" +Conditional: "" # Statement Repeat: "" # Statement Label: "" # Statement Operator: "keywords ." # Statement From b1b91f7b919c1d1777094ef4ab168dafba670cac Mon Sep 17 00:00:00 2001 From: Tobiasz Laskowski Date: Mon, 12 Aug 2024 17:43:12 +0100 Subject: [PATCH 2/9] Fix highlight of identifiers and function names According to vim docs: ``` Identifier any variable name Function function name (also: methods for classes) ``` https://vimdoc.sourceforge.net/htmldoc/syntax.html --- estilo/syntax/base.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/estilo/syntax/base.yml b/estilo/syntax/base.yml index 5736d4f..3ad07f7 100644 --- a/estilo/syntax/base.yml +++ b/estilo/syntax/base.yml @@ -52,8 +52,8 @@ Character: "" # Constant Boolean: "" # Constant Number: "" # Constant Float: "" # Constant -Identifier: "keywords" -Function: "keywords" # Identifier +Identifier: "white" +Function: "contrast" # Identifier Statement: "keywords" Conditional: "" # Statement Repeat: "" # Statement From 9c6854d04ff33a5cba284d3ec28b81f7844bc289 Mon Sep 17 00:00:00 2001 From: Tobiasz Laskowski Date: Tue, 20 Aug 2024 23:01:29 +0100 Subject: [PATCH 3/9] Fix highlight for import keywords --- estilo/syntax/base.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/estilo/syntax/base.yml b/estilo/syntax/base.yml index 3ad07f7..62976d6 100644 --- a/estilo/syntax/base.yml +++ b/estilo/syntax/base.yml @@ -62,7 +62,7 @@ Operator: "keywords ." # Statement Keyword: "" # Statement Exception: "" # Statement PreProc: "" -Include: "" # PreProc +Include: "keywords" # PreProc Define: "" # PreProc Macro: "" # PreProc PreCondit: "" # PreProc From 63b21fe7b6195691345a02273a0dca0fb9767a37 Mon Sep 17 00:00:00 2001 From: Tobiasz Laskowski Date: Tue, 20 Aug 2024 23:02:20 +0100 Subject: [PATCH 4/9] Fix highlight of structure keywords --- estilo/syntax/base.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/estilo/syntax/base.yml b/estilo/syntax/base.yml index 62976d6..5852119 100644 --- a/estilo/syntax/base.yml +++ b/estilo/syntax/base.yml @@ -68,7 +68,7 @@ Macro: "" # PreProc PreCondit: "" # PreProc Type: "objectKeys ." StorageClass: "keywords ." # Type -Structure: "contrastLite" # Type +Structure: "keywords" # Type Typedef: "" # Type Special: "other" SpecialChar: "" # Special From ccd4a840b7f039912d51561515b1a789cad3c533 Mon Sep 17 00:00:00 2001 From: Tobiasz Laskowski Date: Tue, 20 Aug 2024 23:02:55 +0100 Subject: [PATCH 5/9] Highlight types with contrast by default --- estilo/syntax/base.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/estilo/syntax/base.yml b/estilo/syntax/base.yml index 5852119..6828252 100644 --- a/estilo/syntax/base.yml +++ b/estilo/syntax/base.yml @@ -66,7 +66,7 @@ Include: "keywords" # PreProc Define: "" # PreProc Macro: "" # PreProc PreCondit: "" # PreProc -Type: "objectKeys ." +Type: "contrast" StorageClass: "keywords ." # Type Structure: "keywords" # Type Typedef: "" # Type From 6a219080a00f690b46d294b6aa1888b899e37e45 Mon Sep 17 00:00:00 2001 From: Tobiasz Laskowski Date: Tue, 20 Aug 2024 23:08:55 +0100 Subject: [PATCH 6/9] Clean up typescript.yml Add comments about the plugins where the highlight groups originate --- estilo/syntax/typescript.yml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/estilo/syntax/typescript.yml b/estilo/syntax/typescript.yml index 95c48a3..47e9e4e 100644 --- a/estilo/syntax/typescript.yml +++ b/estilo/syntax/typescript.yml @@ -1,19 +1,24 @@ +# Typescript: amadeus/vim-typescript tsExportDefault: 'contrast' tsFuncArgs: 'other - i' -typescriptParameters: 'other - i' tsThis: 'keywords - i' -tsxAttrib: 'contrast - i' -tsxComment: 'comment - i' -typescriptLineComment: 'comment - i' -tsxTagName: 'other' -tsxTag: 'white' -tsxCloseTag: 'white' -tsxCloseString: 'other' -typescriptReserved: '' + +# leafgarland/typescript-vim +typescriptParameters: 'other - i' typescriptStorageClass: 'contrast' + +# Builtin styles +typescriptReserved: '' typescriptIdentifier: 'other' typescriptInterfaceName: 'contrast' typescriptAliasDeclaration: 'contrast' typescriptInterfaceKeyword: 'contrastLiteII - i' typescriptAliasKeyword: 'contrastLiteII - i' typescriptExport: 'keywords - i' + +# tsx +tsxAttrib: 'contrast - i' +tsxTagName: 'other' +tsxTag: 'white' +tsxCloseTag: 'white' +tsxCloseString: 'other' From 4c54cd82f445ca1673dcc6bba2f81771fb9e0fc2 Mon Sep 17 00:00:00 2001 From: Tobiasz Laskowski Date: Sun, 25 Aug 2024 20:33:58 +0100 Subject: [PATCH 7/9] Fix highlight for interface and type keywords In the vscode theme, typescriptInterfaceKeyword and typescriptAliasKeyword are both regular keywords so they have been reverted to default (Keyword). --- estilo/syntax/typescript.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/estilo/syntax/typescript.yml b/estilo/syntax/typescript.yml index 47e9e4e..7d842ad 100644 --- a/estilo/syntax/typescript.yml +++ b/estilo/syntax/typescript.yml @@ -12,8 +12,6 @@ typescriptReserved: '' typescriptIdentifier: 'other' typescriptInterfaceName: 'contrast' typescriptAliasDeclaration: 'contrast' -typescriptInterfaceKeyword: 'contrastLiteII - i' -typescriptAliasKeyword: 'contrastLiteII - i' typescriptExport: 'keywords - i' # tsx From 37dbe5ef6c13681ad26c20b120fedc23ea7d9b03 Mon Sep 17 00:00:00 2001 From: Tobiasz Laskowski Date: Mon, 12 Aug 2024 17:23:06 +0100 Subject: [PATCH 8/9] Fix color for typescript template strings --- estilo/palettes/shades_of_purple.yml | 3 +-- estilo/syntax/typescript.yml | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/estilo/palettes/shades_of_purple.yml b/estilo/palettes/shades_of_purple.yml index 18b550e..94b2d78 100644 --- a/estilo/palettes/shades_of_purple.yml +++ b/estilo/palettes/shades_of_purple.yml @@ -18,7 +18,7 @@ strings: "#A5FF90" stringsLite: "#d2ffc7" jsonString: "#92FC79" darkerStrings: "#73b264" -templates: "#75e44c" +templates: "#3AD900" definitions: "#FB94FF" invalid: "#EC3A37" diffAdded: "#00FF00" @@ -31,4 +31,3 @@ currentSearch: "#ff7300" objectKeys: "#80FFBB" # This should be similar to `comment` selectionBackground: "#7d44b2" -cssEntity: "#3AD900" diff --git a/estilo/syntax/typescript.yml b/estilo/syntax/typescript.yml index 7d842ad..4089b9e 100644 --- a/estilo/syntax/typescript.yml +++ b/estilo/syntax/typescript.yml @@ -13,6 +13,7 @@ typescriptIdentifier: 'other' typescriptInterfaceName: 'contrast' typescriptAliasDeclaration: 'contrast' typescriptExport: 'keywords - i' +typescriptTemplate: 'templates' # String # tsx tsxAttrib: 'contrast - i' From ec4195d2a90c9315f068e25f3f50679ab9664971 Mon Sep 17 00:00:00 2001 From: Tobiasz Laskowski Date: Tue, 20 Aug 2024 23:11:33 +0100 Subject: [PATCH 9/9] Improve compatibility with builtin typescript syntax --- estilo/syntax/typescript.yml | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/estilo/syntax/typescript.yml b/estilo/syntax/typescript.yml index 4089b9e..3e3cd1c 100644 --- a/estilo/syntax/typescript.yml +++ b/estilo/syntax/typescript.yml @@ -8,12 +8,31 @@ typescriptParameters: 'other - i' typescriptStorageClass: 'contrast' # Builtin styles -typescriptReserved: '' -typescriptIdentifier: 'other' -typescriptInterfaceName: 'contrast' -typescriptAliasDeclaration: 'contrast' +typescriptIdentifier: 'definitions' # Structure typescriptExport: 'keywords - i' +typescriptAmbientDeclaration: 'keywords - i' typescriptTemplate: 'templates' # String +typescriptPredefinedType: 'objectKeys' # Type +typescriptPrototype: 'objectKeys' # Type + +typescriptVariable: '@Keyword' +typescriptOperator: '@Keyword' +typescriptImport: '@Keyword' +typescriptTry: '@Exception' +typescriptExceptions: '@Exception' + +typescriptImportType: '@Keyword' +typescriptExportType: '@Keyword' +typescriptModule: '@Keyword' +typescriptInterfaceName: '@Type' # Function +typescriptAliasDeclaration: '@Type' # Identifier +typescriptTypeReference: '@Type' # Identifier +typescriptClassName: '@Type' # Identifier +typescriptClassHeritage: '@Type' # Identifier +typescriptCall: 'other' # PreProc +typescriptArrowFuncArg: 'other' # PreProc +typescriptObjectLabel: 'contrastLite' # Label +typescriptTupleLable: 'contrastLite' # Label # tsx tsxAttrib: 'contrast - i'