mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 10:45:16 -07:00
vim-patch:9.1.0735: filetype: salt files are not recognized
Problem: filetype: salt files are not recognized
Solution: Detect '*.sls' files as filetype salt,
include a syntax script (Gregory Anders)
closes: vim/vim#15689
89b9bb4ac8
Co-authored-by: Gregory Anders <greg@gpanders.com>
This commit is contained in:
parent
13d6f6cbb2
commit
9a3f74c4c7
@ -1024,6 +1024,7 @@ local extension = {
|
||||
rake = 'ruby',
|
||||
rs = 'rust',
|
||||
sage = 'sage',
|
||||
sls = 'salt',
|
||||
sas = 'sas',
|
||||
sass = 'sass',
|
||||
sa = 'sather',
|
||||
|
16
runtime/syntax/salt.vim
Normal file
16
runtime/syntax/salt.vim
Normal file
@ -0,0 +1,16 @@
|
||||
" Vim syntax file
|
||||
" Maintainer: Gregory Anders
|
||||
" Last Changed: 2024-09-16
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
" Salt state files are just YAML with embedded Jinja
|
||||
runtime! syntax/yaml.vim
|
||||
unlet! b:current_syntax
|
||||
|
||||
runtime! syntax/jinja.vim
|
||||
unlet! b:current_syntax
|
||||
|
||||
let b:current_syntax = 'salt'
|
@ -633,6 +633,7 @@ func s:GetFilenameChecks() abort
|
||||
\ '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'],
|
||||
\ 'rust': ['file.rs'],
|
||||
\ 'salt': ['file.sls'],
|
||||
\ 'samba': ['smb.conf'],
|
||||
\ 'sas': ['file.sas'],
|
||||
\ 'sass': ['file.sass'],
|
||||
|
Loading…
Reference in New Issue
Block a user