0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 9.1.0326: filetype: some requirements files are not recognized

Problem:  filetype: some requirements files are not recognized
Solution: Detect '*-requirements.txt', 'constraints.txt',
          'requirements.in', 'requirements/*.txt' and 'requires/*.txt'
          as requirements filetype, include pip compiler, include
          requirements filetype and syntax plugin
          (Wu, Zhenyu, @raimon49)

closes: #14379

Co-authored-by: raimon <raimon49@hotmail.com>
Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Wu, Zhenyu
2024-04-14 20:38:24 +02:00
committed by Christian Brabandt
parent 62c09e032c
commit f9f5424d3e
7 changed files with 163 additions and 3 deletions

View File

@@ -71,10 +71,10 @@ func Test_compiler_completion()
call assert_match('^"compiler ' .. clist .. '$', @:)
call feedkeys(":compiler p\<C-A>\<C-B>\"\<CR>", 'tx')
call assert_match('"compiler pandoc pbx perl\( p[a-z]\+\)\+ pylint pyunit', @:)
call assert_match('"compiler pandoc pbx perl\( p[a-z_]\+\)\+ pylint pyunit', @:)
call feedkeys(":compiler! p\<C-A>\<C-B>\"\<CR>", 'tx')
call assert_match('"compiler! pandoc pbx perl\( p[a-z]\+\)\+ pylint pyunit', @:)
call assert_match('"compiler! pandoc pbx perl\( p[a-z_]\+\)\+ pylint pyunit', @:)
endfunc
func Test_compiler_error()

View File

@@ -594,7 +594,7 @@ def s:GetFilenameChecks(): dict<list<string>>
readline: ['.inputrc', 'inputrc'],
rego: ['file.rego'],
remind: ['.reminders', 'file.remind', 'file.rem', '.reminders-file'],
requirements: ['file.pip', 'requirements.txt'],
requirements: ['file.pip', 'requirements.txt', 'dev-requirements.txt', 'constraints.txt', 'requirements.in', 'requirements/dev.txt', 'requires/dev.txt'],
rescript: ['file.res', 'file.resi'],
resolv: ['resolv.conf'],
reva: ['file.frt'],

View File

@@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
326,
/**/
325,
/**/