1
0
forked from aniani/vim

patch 9.1.0898: runtime(compiler): pytest compiler not included

Problem:  runtime(compiler): pytest compiler not included
Solution: include pytest compiler, update the compiler completion test
          (Konfekt)

closes: #16130

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Konfekt
2024-11-30 11:32:49 +01:00
committed by Christian Brabandt
parent aa16b30552
commit 3c2596a9e9
6 changed files with 125 additions and 4 deletions

View File

@@ -3,8 +3,9 @@
" Maintainer: Tom Picton <tom@tompicton.com>
" Previous Maintainer: James Sully <sullyj3@gmail.com>
" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
" Last Change: 2024/05/13
" https://github.com/tpict/vim-ftplugin-python
" Repository: https://github.com/tpict/vim-ftplugin-python
" Last Change: 2024/05/13
" 2024 Nov 30 use pytest compiler (#16130)
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
@@ -134,6 +135,11 @@ elseif executable('python')
setlocal keywordprg=python\ -m\ pydoc
endif
if expand('%:t') =~# '\v^test_.*\.py$|_test\.py$' && executable('pytest')
compiler pytest
let &l:makeprg .= ' %:S'
endif
" Script for filetype switching to undo the local stuff we may have changed
let b:undo_ftplugin = 'setlocal cinkeys<'
\ . '|setlocal comments<'
@@ -148,6 +154,7 @@ let b:undo_ftplugin = 'setlocal cinkeys<'
\ . '|setlocal softtabstop<'
\ . '|setlocal suffixesadd<'
\ . '|setlocal tabstop<'
\ . '|setlocal makeprg<'
\ . '|silent! nunmap <buffer> [M'
\ . '|silent! nunmap <buffer> [['
\ . '|silent! nunmap <buffer> []'