mirror of
https://github.com/vim/vim.git
synced 2025-11-14 23:04:02 -05:00
patch 9.1.1906: filetype: not all Ruby files are recognized
Problem: filetype: not all Ruby files are recognized
Solution: Detect *.rbi and Brewfile as ruby filetype
(botantony).
- `rbi` is a file extension used by Sorbet, typechecker for Ruby:
https://sorbet.org/docs/rbi
- `Brewfile` is a bundler file for Homebrew package manager:
https://docs.brew.sh/Brew-Bundle-and-Brewfile
closes: #18697
Signed-off-by: botantony <antonsm21@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
1ff3e701e4
commit
efc3be77bb
6
runtime/autoload/dist/ft.vim
vendored
6
runtime/autoload/dist/ft.vim
vendored
@@ -3,7 +3,7 @@ vim9script
|
|||||||
# Vim functions for file type detection
|
# Vim functions for file type detection
|
||||||
#
|
#
|
||||||
# Maintainer: The Vim Project <https://github.com/vim/vim>
|
# Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||||
# Last Change: 2025 Oct 31
|
# Last Change: 2025 Nov 11
|
||||||
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
|
|
||||||
# These functions are moved here from runtime/filetype.vim to make startup
|
# These functions are moved here from runtime/filetype.vim to make startup
|
||||||
@@ -2571,6 +2571,8 @@ const ft_from_ext = {
|
|||||||
"builder": "ruby",
|
"builder": "ruby",
|
||||||
"rxml": "ruby",
|
"rxml": "ruby",
|
||||||
"rjs": "ruby",
|
"rjs": "ruby",
|
||||||
|
# Sorbet (Ruby typechecker)
|
||||||
|
"rbi": "ruby",
|
||||||
# Rust
|
# Rust
|
||||||
"rs": "rust",
|
"rs": "rust",
|
||||||
# S-lang
|
# S-lang
|
||||||
@@ -2999,6 +3001,8 @@ const ft_from_name = {
|
|||||||
"apt.conf": "aptconf",
|
"apt.conf": "aptconf",
|
||||||
# BIND zone
|
# BIND zone
|
||||||
"named.root": "bindzone",
|
"named.root": "bindzone",
|
||||||
|
# Brewfile (uses Ruby syntax)
|
||||||
|
"Brewfile": "ruby",
|
||||||
# Busted (Lua unit testing framework - configuration files)
|
# Busted (Lua unit testing framework - configuration files)
|
||||||
".busted": "lua",
|
".busted": "lua",
|
||||||
# Bun history
|
# Bun history
|
||||||
|
|||||||
@@ -695,7 +695,9 @@ def s:GetFilenameChecks(): dict<list<string>>
|
|||||||
rrst: ['file.rrst', 'file.srst'],
|
rrst: ['file.rrst', 'file.srst'],
|
||||||
rst: ['file.rst'],
|
rst: ['file.rst'],
|
||||||
rtf: ['file.rtf'],
|
rtf: ['file.rtf'],
|
||||||
ruby: ['.irbrc', 'irbrc', '.irb_history', 'irb_history', 'file.rb', 'file.rbw', 'file.gemspec', 'file.ru', 'Gemfile', 'file.builder', 'file.rxml', 'file.rjs', 'file.rant', 'file.rake', 'rakefile', 'Rakefile', 'rantfile', 'Rantfile', 'rakefile-file', 'Rakefile-file', 'Puppetfile', 'Vagrantfile'],
|
ruby: ['.irbrc', 'irbrc', '.irb_history', 'irb_history', 'file.rb', 'file.rbi', 'file.rbw', 'file.gemspec', 'file.ru', 'Gemfile', 'file.builder',
|
||||||
|
'file.rxml', 'file.rjs', 'file.rant', 'file.rake', 'rakefile', 'Rakefile', 'rantfile', 'Rantfile', 'rakefile-file', 'Rakefile-file',
|
||||||
|
'Puppetfile', 'Vagrantfile', 'Brewfile'],
|
||||||
rust: ['file.rs'],
|
rust: ['file.rs'],
|
||||||
sage: ['file.sage'],
|
sage: ['file.sage'],
|
||||||
salt: ['file.sls'],
|
salt: ['file.sls'],
|
||||||
|
|||||||
@@ -729,6 +729,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1906,
|
||||||
/**/
|
/**/
|
||||||
1905,
|
1905,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user