Closed snoopy closed 1 year ago
It is a possibility to do both, but one thing I'd like to have is
consistency in highlighting. For example, the "foo" and "bar" namespace
definitions (and optionally in "using namespace
This may require more a accurate syntactic analysis, which may not be possible/feasible.
This may require more a accurate syntactic analysis, which may not be possible/feasible.
I figured as much. Doing this with just the lpeg lexer sounds a bit tricky. It would probably need something like https://github.com/tree-sitter/tree-sitter and I assume that is out of scope.
Tree Sitter is out of scope for Scintillua, but I have been experimenting with it in another project: https://github.com/orbitalquark/tslexia. I'm not sure if anything will come of it though. The shared object for just one parser is larger than all of Scintillua's Lua lexers...
Thanks, very interesting.
I'll go ahead and close this since the suggestions are not really feasible IMO.
I'd like to know your thoughts on some possible additional highlighting options.
Currently the lexer will highlight namespaces if they are part of an STL type (e.g.
std::vector
). Other editors seem to highlight all namespaces regardless. So infoo::bar::foobar()
foo
andbar
would be highlighted in a to-be-defined namespace color andfoobar
would be a normal function highlight. Would this be a possibility for TA as well?Should values in angle brackets always be highlighted as type? Consider
std::vector<Foo>
, hereFoo
is a custom type and could be highlighted as such.