mirror of
https://github.com/vim/vim.git
synced 2025-12-10 18:46:57 -05:00
patch 9.1.1935: filetype: not all Erlang files are recognized
Problem: filetype: not all Erlang files are recognized
Solution: Detect *.app.src and rebar.config files as erlang filetype
(John Parise).
*.app.src files contain Erlang application definitions. (There are also
*.app files, which are similar but more often build artifacts, and that
file extension is too ambiguous to be recognized by default.)
Reference:
- https://www.erlang.org/doc/system/applications.html
Rebar is the Erlang build tool. rebar.config uses Erlang syntax.
Reference:
- https://rebar3.org/docs/configuration/configuration/
closes: #18835
Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
8b9b422111
commit
2b2580e61a
4
runtime/autoload/dist/ft.vim
vendored
4
runtime/autoload/dist/ft.vim
vendored
@ -3,7 +3,7 @@ vim9script
|
||||
# Vim functions for file type detection
|
||||
#
|
||||
# Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
# Last Change: 2025 Nov 28
|
||||
# Last Change: 2025 Nov 30
|
||||
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
# These functions are moved here from runtime/filetype.vim to make startup
|
||||
@ -3072,6 +3072,8 @@ const ft_from_name = {
|
||||
".editorconfig": "editorconfig",
|
||||
# Elinks configuration
|
||||
"elinks.conf": "elinks",
|
||||
# Erlang
|
||||
"rebar.config": "erlang",
|
||||
# Exim
|
||||
"exim.conf": "exim",
|
||||
# Exports
|
||||
|
||||
@ -427,6 +427,9 @@ au BufNewFile,BufRead *.e,*.E call dist#ft#FTe()
|
||||
" Elm Filter Rules file
|
||||
au BufNewFile,BufRead filter-rules setf elmfilt
|
||||
|
||||
" Erlang
|
||||
au BufNewFile,BufRead *.app.src setf erlang
|
||||
|
||||
" ESMTP rc file
|
||||
au BufNewFile,BufRead *esmtprc setf esmtprc
|
||||
|
||||
|
||||
@ -275,7 +275,7 @@ def s:GetFilenameChecks(): dict<list<string>>
|
||||
elsa: ['file.lc'],
|
||||
elvish: ['file.elv'],
|
||||
epuppet: ['file.epp'],
|
||||
erlang: ['file.erl', 'file.hrl', 'file.yaws'],
|
||||
erlang: ['file.erl', 'file.hrl', 'file.yaws', 'file.app.src', 'rebar.config'],
|
||||
eruby: ['file.erb', 'file.rhtml'],
|
||||
esdl: ['file.esdl'],
|
||||
esmtprc: ['anyesmtprc', 'esmtprc', 'some-esmtprc'],
|
||||
|
||||
@ -729,6 +729,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1935,
|
||||
/**/
|
||||
1934,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user