godotengine / godotengine/godot

Syntax highlighting doesn't work in Script Editor if script is named lowercase.

Open
#90,285 4 comments 0 reactions 0 assignees View on GitHub
bug topic:dotnet topic:editor
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

- Reproducible in 4.2.1.stable.mono.official

### System information

Godot v4.2.1.stable.mono - Windows 10.0.19045 - GLES3 (Compatibility) - NVIDIA GeForce RTX 3080 Ti (NVIDIA; 31.0.15.3758) - AMD Ryzen 7 5800X 8-Core Processor (16 Threads)

### Issue description

C# scripts named in lowercase will not be syntax highlighted correctly.
![image](https://github.com/godotengine/godot/assets/5192273/54c2c8a7-4c88-4d01-9231-75dbe0b410d6)
![image](https://github.com/godotengine/godot/assets/5192273/03079add-0706-4116-9bc0-2d29e707e6e1)

### Steps to reproduce

Create a C# script named in lower camelCase, using Script Editor. Note that syntax highlighting does not work. Rename it to upper CamelCase, note that highlighting is fixed.

### Minimal reproduction project (MRP)

n/a

Contributor guide

Open the contributing guide

Research direction

Start in Godot's Script Editor by reproducing the issue with a C# script named in lower camelCase, then rename it to upper CamelCase for comparison. Trace how the editor identifies C# scripts and syntax highlighting; done means lowercase-named C# scripts receive the same highlighting as uppercase-named scripts.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, godot
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.