From 2ce7e4e8a7cba701685ab8413153157510d18da3 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 23 Jan 2021 11:18:30 -0500 Subject: [PATCH 1/3] vim-patch:8.2.2392: fennel filetype not recognized Problem: Fennel filetype not recognized. Solution: Detect with pattern and hashbang. (Chinmay Dalal, closes vim/vim#7729) https://github.com/vim/vim/commit/402115f1c2b4d0704a822206f2e6e931e721c129 --- runtime/filetype.vim | 3 +++ runtime/scripts.vim | 4 ++++ src/nvim/testdir/test_filetype.vim | 2 ++ 3 files changed, 9 insertions(+) diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 1343a1fd0b..250eea4ea6 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -585,6 +585,9 @@ au BufNewFile,BufRead *.fan,*.fwt setf fan " Factor au BufNewFile,BufRead *.factor setf factor +" Fennel +autocmd BufRead,BufNewFile *.fnl setf fennel + " Fetchmail RC file au BufNewFile,BufRead .fetchmailrc setf fetchmail diff --git a/runtime/scripts.vim b/runtime/scripts.vim index 536993d485..3b3409bf4b 100644 --- a/runtime/scripts.vim +++ b/runtime/scripts.vim @@ -186,6 +186,10 @@ if s:line1 =~# "^#!" elseif s:name =~# 'instantfpc\>' set ft=pascal + " Fennel + elseif s:name =~# 'fennel\>' + set ft=fennel + endif unlet s:name diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index 815827e224..74437b050e 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -171,6 +171,7 @@ let s:filename_checks = { \ 'factor': ['file.factor'], \ 'falcon': ['file.fal'], \ 'fan': ['file.fan', 'file.fwt'], + \ 'fennel': ['file.fnl'], \ 'fetchmail': ['.fetchmailrc'], \ 'fgl': ['file.4gl', 'file.4gh', 'file.m4gl'], \ 'focexec': ['file.fex', 'file.focexec'], @@ -622,6 +623,7 @@ let s:script_checks = { \ ['// -*- C++ -*-']], \ 'yaml': [['%YAML 1.2']], \ 'pascal': [['#!/path/instantfpc']], + \ 'fennel': [['#!/path/fennel']], \ } " Various forms of "env" optional arguments. From 69d1094271fdeddc7267c4bf85f02c613cf51a22 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 24 Jan 2021 14:15:28 -0500 Subject: [PATCH 2/3] vim-patch:8.2.2399: fold test fails in wide terminal Problem: Fold test fails in wide terminal. Solution: Adjust the test. (Dominique Pelle, closes vim/vim#7731, closes vim/vim#7739) https://github.com/vim/vim/commit/7cf0c114d690c91ac88c92a1a6f1b1935cb6410f --- src/nvim/testdir/test_fold.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvim/testdir/test_fold.vim b/src/nvim/testdir/test_fold.vim index 18f328acf4..2d058e8e32 100644 --- a/src/nvim/testdir/test_fold.vim +++ b/src/nvim/testdir/test_fold.vim @@ -827,7 +827,7 @@ func Test_fold_relative_move() set fdm=indent sw=2 wrap tw=80 let content = [ ' foo', ' bar', ' baz', - \ repeat('x', 100), + \ repeat('x', &columns + 1), \ ' foo', ' bar', ' baz' \ ] call append(0, content) From 687ff6566aa83ecb65af2ebe4f83161faa6e9bb6 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 24 Jan 2021 14:20:32 -0500 Subject: [PATCH 3/3] vim-patch:8.2.2402: some filetypes not detected Problem: Some filetypes not detected. Solution: Detect Ruby Signature and Puppet related files. (Doug Kearns) https://github.com/vim/vim/commit/8323cab31c3120a7f80cf3271a506a30ec04d99e --- runtime/filetype.vim | 22 ++++++++++++++++------ src/nvim/testdir/test_filetype.vim | 4 +++- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 250eea4ea6..53fd66c4df 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1172,9 +1172,10 @@ au BufNewFile,BufRead *.papp,*.pxml,*.pxsl setf papp " Password file au BufNewFile,BufRead */etc/passwd,*/etc/passwd-,*/etc/passwd.edit,*/etc/shadow,*/etc/shadow-,*/etc/shadow.edit,*/var/backups/passwd.bak,*/var/backups/shadow.bak setf passwd -" Pascal (also *.p) +" Pascal (also *.p, *.pp, *.inc) au BufNewFile,BufRead *.pas setf pascal +" Pascal or Puppet manifest au BufNewFile,BufRead *.pp call dist#ft#FTpp() " Delphi or Lazarus program file @@ -1265,7 +1266,7 @@ au BufNewFile,BufRead *.pov setf pov " Povray configuration au BufNewFile,BufRead .povrayrc setf povini -" Povray, PHP or assembly +" Povray, Pascal, PHP or assembly au BufNewFile,BufRead *.inc call dist#ft#FTinc() " Printcap and Termcap @@ -1274,13 +1275,19 @@ au BufNewFile,BufRead *printcap au BufNewFile,BufRead *termcap \ let b:ptcap_type = "term" | setf ptcap -" PCCTS / ANTRL -"au BufNewFile,BufRead *.g setf antrl +" PCCTS / ANTLR +"au BufNewFile,BufRead *.g setf antlr au BufNewFile,BufRead *.g setf pccts " PPWizard au BufNewFile,BufRead *.it,*.ih setf ppwiz +" Puppet +au BufNewFile,BufRead Puppetfile setf ruby + +" Embedded Puppet +au BufNewFile,BufRead *.epp setf epuppet + " Obj 3D file format " TODO: is there a way to avoid MS-Windows Object files? au BufNewFile,BufRead *.obj setf obj @@ -1430,8 +1437,8 @@ au BufNewFile,BufRead *.rb,*.rbw setf ruby " RubyGems au BufNewFile,BufRead *.gemspec setf ruby -" Rust -au BufNewFile,BufRead *.rs setf rust +" RBS (Ruby Signature) +au BufNewFile,BufRead *.rbs setf rbs " Rackup au BufNewFile,BufRead *.ru setf ruby @@ -1445,6 +1452,9 @@ au BufNewFile,BufRead *.builder,*.rxml,*.rjs setf ruby " Rantfile and Rakefile is like Ruby au BufNewFile,BufRead [rR]antfile,*.rant,[rR]akefile,*.rake setf ruby +" Rust +au BufNewFile,BufRead *.rs setf rust + " S-lang (or shader language, or SmallLisp) au BufNewFile,BufRead *.sl setf slang diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index 74437b050e..f9f0ade1f6 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -159,6 +159,7 @@ let s:filename_checks = { \ 'elinks': ['elinks.conf'], \ 'elm': ['file.elm'], \ 'elmfilt': ['filter-rules'], + \ 'epuppet': ['file.epp'], \ 'erlang': ['file.erl', 'file.hrl', 'file.yaws'], \ 'eruby': ['file.erb', 'file.rhtml'], \ 'esmtprc': ['anyesmtprc'], @@ -375,6 +376,7 @@ let s:filename_checks = { \ 'quake': ['anybaseq2/file.cfg', 'anyid1/file.cfg', 'quake3/file.cfg'], \ 'radiance': ['file.rad', 'file.mat'], \ 'ratpoison': ['.ratpoisonrc', 'ratpoisonrc'], + \ 'rbs': ['file.rbs'], \ 'rc': ['file.rc', 'file.rch'], \ 'rcs': ['file,v'], \ 'readline': ['.inputrc', 'inputrc'], @@ -391,7 +393,7 @@ let s:filename_checks = { \ 'rpl': ['file.rpl'], \ 'rst': ['file.rst'], \ 'rtf': ['file.rtf'], - \ 'ruby': ['.irbrc', 'irbrc', 'file.rb', 'file.rbw', 'file.gemspec', 'file.ru', 'Gemfile', 'file.builder', 'file.rxml', 'file.rjs', 'file.rant', 'file.rake'], + \ 'ruby': ['.irbrc', 'irbrc', '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'], \ 'rust': ['file.rs'], \ 'samba': ['smb.conf'], \ 'sas': ['file.sas'],