From 0e5933ce0945bb0123db69ccb5b52d7083c5c785 Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Tue, 3 Nov 2026 16:18:10 +0800 Subject: [PATCH] feat(lsp): color `None` like a constructor `None` is a value singleton, not a control keyword, so it now uses the same token type as `Some` instead of the `case`/`own` keyword color. --- App/lib/lsp/LspSemantic.vp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/App/lib/lsp/LspSemantic.vp b/App/lib/lsp/LspSemantic.vp index abaf45f..4ffc784 100644 --- a/App/lib/lsp/LspSemantic.vp +++ b/App/lib/lsp/LspSemantic.vp @@ -536,7 +536,7 @@ def _LexStream(pool: memhub.MemManager*, elif tok.type == ast.TokenType.Name and tok.str_val is not None and string.strcmp(tok.str_val, "own") == 0: typ = ST_KEYWORD elif tok.type == ast.TokenType.Name and tok.str_val is not None and string.strcmp(tok.str_val, "None") == 0: - typ = ST_KEYWORD + typ = ST_CLASS elif tok.type == ast.TokenType.Name and tok.str_val is not None and string.strcmp(tok.str_val, "Some") == 0: typ = ST_CLASS elif tok.type == ast.TokenType.Name and _IsBuiltinFunctionName(tok.str_val) != 0: