GDScript3 detected over F# (FSharp) #1308
gandarez
started this conversation in
^ Lexer Requests and Bugs
Replies: 2 comments
|
@gandarez #848 introduced an analysis regex which matches to pretty common keywords across languages, such as var or const, which is in my opinion at least annoying and at most problematic. The diff for registry.go : diff --git a/registry.go b/registry.go
index a309af9..effc96a 100644
--- a/registry.go
+++ b/registry.go
@@ -183,6 +183,9 @@ func (l *LexerRegistry) Analyse(text string) Lexer {
for _, lexer := range l.Lexers {
if analyser, ok := lexer.(Analyser); ok {
weight := analyser.AnalyseText(text)
+ if weight != 0 {
+ println(lexer.Config().Name, weight)
+ }
if weight > highest {
picked = lexer
highest = weight |
0 replies
|
MMmm, this seems like a bit of a chicken and egg problem. 0.2 is very low confidence, but because most other languages don't have |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Is there an existing issue for this?
Describe the bug
Current Chroma version is detecting this sample file which is a F# demo code as GDScript3.
To Reproduce
All reactions