feat(editor): colour global variables (the semantic global modifier) (#1393)

lua-language-server marks globals with the `global` token modifier, but
the editor dropped it, so a global variable looked like a local unless
rainbow highlighting was on. The modifier now sets `cm-sem-global`, drawn
in a new Language Defaults › Identifiers › Global variable colour
(`--syn-global`): library globals keep the predefined colour and calls the
function-call colour. Imported IntelliJ themes and .icls schemes take it
from DEFAULT_GLOBAL_VARIABLE. Built-in schemes default it to the local
variable colour (IntelliJ's fallback for the key), so they look as before
until a scheme sets it.

Fixes #1370
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-11-05 07:59:45 +08:00
1 джерело 8d784ac164
коміт d5c4066748
8 files changed
+33

No files matched your search

+4
Переглянути файл
@@ -116,6 +116,7 @@ html {
--syn-number: #2aacb8;
--syn-punct: #bcbec4;
--syn-variable: #bcbec4;
--syn-global: var(--syn-variable);
--syn-param: #bcbec4;
--syn-property: #c77dbb;
--syn-constant: #c77dbb;
@@ -494,6 +495,7 @@ html {
--syn-number: #1750eb;
--syn-punct: #080808;
--syn-variable: #080808;
--syn-global: var(--syn-variable);
--syn-param: #080808;
--syn-property: #871094;
--syn-constant: #871094;
@@ -748,6 +750,7 @@ html {
--syn-number: #4fd0dc;
--syn-punct: #e3e4e8;
--syn-variable: #e3e4e8;
--syn-global: var(--syn-variable);
--syn-param: #e3e4e8;
--syn-property: #e0a0d6;
--syn-constant: #e0a0d6;
@@ -1087,6 +1090,7 @@ html {
--syn-number: var(--palette-number);
--syn-punct: var(--palette-fg);
--syn-variable: var(--palette-variable);
--syn-global: var(--syn-variable);
--syn-param: var(--palette-fg);
--syn-property: var(--palette-property);
--syn-constant: var(--palette-number);