mirror of
https://github.com/neovim/neovim.git
synced 2026-03-31 04:42:03 +00:00
vim-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: vim/vim#18835
2b2580e61a
Co-authored-by: Jon Parise <jon@indelible.org>
This commit is contained in:
@@ -1605,6 +1605,7 @@ local filename = {
|
||||
Earthfile = 'earthfile',
|
||||
['.editorconfig'] = 'editorconfig',
|
||||
['elinks.conf'] = 'elinks',
|
||||
['rebar.config'] = 'erlang',
|
||||
['mix.lock'] = 'elixir',
|
||||
['filter-rules'] = 'elmfilt',
|
||||
['exim.conf'] = 'exim',
|
||||
@@ -2631,6 +2632,7 @@ local pattern = {
|
||||
['^www%.conf'] = starsetf('dosini'),
|
||||
['^drac%.'] = starsetf('dracula'),
|
||||
['/dtrace/.*%.d$'] = 'dtrace',
|
||||
['%.app%.src$'] = 'erlang',
|
||||
['esmtprc$'] = 'esmtprc',
|
||||
['/0%.orig/'] = starsetf(detect.foam),
|
||||
['/0/'] = starsetf(detect.foam),
|
||||
|
||||
@@ -275,7 +275,7 @@ func s:GetFilenameChecks() abort
|
||||
\ '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'],
|
||||
|
||||
Reference in New Issue
Block a user