> > a normal plugin would use document_set_filetype() but I don't know if its 
> > available in the restricted Geanylua API.
> "normal" plugin? :)

By a "normal" plugin I mean one that uses the standard Geany plugin API, C, 
C++, Cython, anything else that accesses C and compiles to a `.so` for eg Rust, 
and Python via Geanypy that mapped almost all of the Geany API to Python and 
@kugel-s Peasy that uses GI to make all the Geany API available to Python and 
some other languages I believe.  

But IIRC Geanylua provided only a customised and limited subset of that API.  
If the functionality is not available then I don't think you will be able to do 
whatever you are trying to do.

To explain further, there are several reasons to use the Geany filetype, not 
set the lexer directly:

1. Geany expects its in control of the lexer, it will set it or reset it at any 
time it feels the need to, overwriting your selection.

2. To make highlighting work you need more than the lexer, you need to map the 
style results to the styles set by the filetype/colour scheme, and thats hard 
coded in Geany based on what Geany expects the lexer to be from the filetype, 
not whats set in Scintilla.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/issues/646#issuecomment-345483522

Reply via email to