Skip to content

Commit

Permalink
vim-patch:8.2.0141: no swift filetype detection (#11747)
Browse files Browse the repository at this point in the history
Problem:    No swift filetype detection.
Solution:   Add swift, swiftgyb and sil. (Emir Sarı, closes vim/vim#5517)
vim/vim@0d76683
  • Loading branch information
janlazo authored and blueyed committed Jan 23, 2020
1 parent 91bd1dd commit 71ee46a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions runtime/filetype.vim
Expand Up @@ -1623,6 +1623,13 @@ au BufNewFile,BufRead *.sml setf sml
" Sratus VOS command macro
au BufNewFile,BufRead *.cm setf voscm

" Swift
au BufNewFile,BufRead *.swift setf swift
au BufNewFile,BufRead *.swift.gyb setf swiftgyb

" Swift Intermediate Language
au BufNewFile,BufRead *.sil setf sil

" Sysctl
au BufNewFile,BufRead */etc/sysctl.conf,*/etc/sysctl.d/*.conf setf sysctl

Expand Down
3 changes: 3 additions & 0 deletions src/nvim/testdir/test_filetype.vim
Expand Up @@ -431,6 +431,9 @@ let s:filename_checks = {
\ 'sudoers': ['any/etc/sudoers', 'sudoers.tmp'],
\ 'svg': ['file.svg'],
\ 'svn': ['svn-commitfile.tmp'],
\ 'swift': ['file.swift'],
\ 'swiftgyb': ['file.swift.gyb'],
\ 'sil': ['file.sil'],
\ 'sysctl': ['/etc/sysctl.conf', '/etc/sysctl.d/file.conf'],
\ 'systemd': ['any/systemd/file.automount', 'any/systemd/file.mount', 'any/systemd/file.path', 'any/systemd/file.service', 'any/systemd/file.socket', 'any/systemd/file.swap', 'any/systemd/file.target', 'any/systemd/file.timer', '/etc/systemd/system/some.d/file.conf', '/etc/systemd/system/some.d/.#file'],
\ 'systemverilog': ['file.sv', 'file.svh'],
Expand Down

0 comments on commit 71ee46a

Please sign in to comment.