Closed paaguti closed 1 year ago
I have
lexer.detect_patterns['^#!.+[/ ]tcc'] = 'ansi_c'
in my .textadept/init.lua and a file that starts with
.textadept/init.lua
#!/usr/bin/env tcc -run
is not detected as ANSI C
More information.. I have added a couple of prints to see what is happening: in my .textadept/init.lua:
lexer.detect_patterns is table: 0x55c06c074e30 ^#[ ]*cloud%-config -> yaml ^#!.+ JavaScript -> javascript ^.+ P4_16 -> p4_16 ^#!.+[/ ]tcc -> ansi_c ^#!.+[/ ]make -> makefile lexer.detect_extensions is table: 0x55c06c074df0 fs -> forth p4 -> p4_16 changelog -> changelog bash_profile -> bash zshenv -> bash bash_aliases -> bash zshrc -> bash yang -> yang
And then in lexers/lexer.lua I see that the module has its tables and their size is 0, because they aren't the same as in .textadept/init.lua
lexers/lexer.lua
Trying the shebang with table: 0x55e7e549a310 0 Trying the extensions with table: 0x55e7e549a2d0 0
Thanks for the report. Fixed via https://github.com/orbitalquark/scintillua/commit/b87f598024446a47752ad551cf6f922fb772fa4f and https://github.com/orbitalquark/textadept/commit/119c788e5bc241d6ffb9f665219a2cb207dbd232.
I have
in my
.textadept/init.lua
and a file that starts withis not detected as ANSI C
More information.. I have added a couple of prints to see what is happening: in my
.textadept/init.lua
:And then in
lexers/lexer.lua
I see that the module has its tables and their size is 0, because they aren't the same as in.textadept/init.lua