-- Leo's gemini proxy
-- Connecting to perso.pw:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini;
Author: Solène
Date: 30 May 2021
Tags: kakoune editor
I will explain how to configure Kakoune to automatically use a filetype (for completion/highlighting..) depending on the filename or its extension.
The file we want to change is ~/.config/kak/kakrc , in case of issue you can use ":buffer *debug*" in kakoune to display the debug output.
I had a case in which the file doesn't have any extension. This snippet will assign the filetype Perl to files named Rexfile.
hook global BufCreate (.*/)?Rexfile %{ set buffer filetype perl }
While this is pretty similar to the previous example, we will only match any file ending by ".gmi" to assign it a type markdown (I know it's not but the syntax is quite similar).
hook global BufCreate .*\.gmi %{ set buffer filetype markdown }
-- Response ended
-- Page fetched on Fri Mar 29 00:26:00 2024