To be clear, there are two categories of filetypes, built-in and custom.

Lexers and ctags parsers are pieces of code obtained from external projects 
that are compiled into Geany.

Built-in filetypes (like C and Ada) are defined in the Geany code so they can 
point to the lexer and parser code they use.  So there is no need to define 
those in the filetype file.  Built-in filetypes have filetype file names like 
`filetype.xxx` and no `lexer_filetype` or `parser_filetype` setting.

Custom filetypes (like Scala) are not built in to Geany, instead they are 
defined by the existence of a `filetypes.xxx.conf` file in one of the search 
paths.  Since they are not compiled in they can't point to a lexer, instead 
they use the `lexer_filetype` setting to indirectly select the lexer by 
specifying the name of a built-in filetype that uses the relevant lexer.  
Similarly `parser_filetype` specifys the parser.

Options such as `lexer_properties` are defined by the lexer and are therefore 
the same for any filetype that uses the lexer, whether built-in or custom.  
Lexer properties normally have default values so the filetypes file doesn't 
have to mention one that it does not want to change.  So filetypes files do not 
always contain a full list of properties, especially if a lexer added a new 
property and an existing filetype does not use it.  Unfortunately the Lexilla 
project where the lexers are from does not document properties of the lexers, 
so thats why I suggest that you need to check the code of any lexer you want to 
use to see what properties it has (and what they do).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/discussions/3713#discussioncomment-7788030
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/repo-discussions/3713/comments/[email protected]>

Reply via email to