patch 9.1.1936: filetype: Erlang lexical files are not recognized

Problem:  filetype: Erlang lexical files are not recognized
Solution: Detect *.xrl files as leex filetype, include syntax and
          filetype plugins (Jon Parise).

leex is the lexical analyzer generator for Erlang. Its input file format
follows a section-based structure and uses the `.xrl` file extension.

This initial work includes file detection, an ftplugin (which inherits
the Erlang configuration), and a syntax definition.

Reference:
-  https://www.erlang.org/doc/apps/parsetools/leex.html

related: #18819
closes: #18832

Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Csaba Hoch <csaba.hoch@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Jon Parise
2025-11-30 14:45:48 +00:00
committed by Christian Brabandt
parent 2b2580e61a
commit b087c5452b
9 changed files with 152 additions and 0 deletions

14
runtime/ftplugin/leex.vim Normal file
View File

@ -0,0 +1,14 @@
" Vim ftplugin file
" Language: Leex (Erlang Lexical Analyzer Generator)
" Maintainer: Jon Parise <jon@indelible.org>
" Last Change: 2025 Nov 29
" Filenames: *.xrl
"
" References:
" - https://www.erlang.org/doc/apps/parsetools/leex.html
if exists('b:did_ftplugin')
finish
endif
runtime! ftplugin/erlang.vim