[Geany-Users] filetype, lexer, config file: using a new language
John Gabriele
jgabriele at fastmail.fm
Sun May 22 01:21:23 UTC 2022
On Sat, May 21, 2022, at 9:11 PM, John Gabriele wrote:
> On Sat, May 21, 2022, at 7:21 PM, Lex Trotman wrote:
>>
>> You also need to specify the filetype in `filetype_extensions.conf`
>
> Ok. I opened that file (under Tools --> Configuration Files...). The file is
> in my ~/.config/geany/ dir, and *every* line is commented out.
> I uncommented line containing "[Extensions]", and then added one of
> my own:
>
> ~~~
> Hare=*.ha;
> ~~~
>
>> and note the filetype name you use there and the filetype name used in
>> the `filetype.XXX.conf` filename are case sensitive and must match
>> exactly.
>
> I'm not sure what you mean. I did this:
>
> cp /usr/share/geany/filedefs/filetypes.c
> ~/.config/geany/filedefs/filetypes.Hare.conf
>
> I didn't edit anything in this file, but I see that it contains these
> lines:
>
> ~~~
> [settings]
> # default extension used when saving files
> extension=c
> ~~~
>
> Is that something I need to change?
I see [the docs](https://www.geany.org/manual/current/index.html#creating-a-custom-filetype-from-an-existing-filetype) say:
~~~
cp filetypes.foo filetypes.Bar.conf
Then add the lexer_filetype=Foo setting (if not already present) and add/adjust other settings.
~~~
Add that into which section of the config file?
More information about the Users
mailing list