diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2022-10-14 17:40:10 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2022-10-14 17:40:10 +0200 |
commit | bc8a81d3592dab86334f27d1d43c080ebf680d42 (patch) | |
tree | f367857d8c196d36f2d6dec3c2f6c9d703b06b7c /after/ftplugin | |
parent | 38282d58387cff48ac203f6912c05e4c8686141b (diff) | |
download | vim-polyglot-bc8a81d3592dab86334f27d1d43c080ebf680d42.tar.gz vim-polyglot-bc8a81d3592dab86334f27d1d43c080ebf680d42.zip |
Update
Diffstat (limited to '')
-rw-r--r-- | ftplugin/requirements.vim (renamed from after/ftplugin/requirements.vim) | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/after/ftplugin/requirements.vim b/ftplugin/requirements.vim index 5097952c..b79e55e7 100644 --- a/after/ftplugin/requirements.vim +++ b/ftplugin/requirements.vim @@ -1,9 +1,9 @@ -if polyglot#init#is_disabled(expand('<sfile>:p'), 'requirements', 'after/ftplugin/requirements.vim') +if polyglot#init#is_disabled(expand('<sfile>:p'), 'requirements', 'ftplugin/requirements.vim') finish endif " the Requirements File Format syntax support for Vim -" Version: 1.6.0 +" Version: 1.7.1 " Author: raimon <raimon49@hotmail.com> " License: MIT LICENSE " The MIT License (MIT) @@ -27,16 +27,20 @@ endif " LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, " OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE " SOFTWARE. -if executable('pip-compile') - let s:filename = expand("%:p") - if fnamemodify(s:filename, ":t") ==# 'requirements.in' - " this is the default filename for pip-compile - setlocal makeprg=pip-compile - elseif fnamemodify(s:filename, ":e") ==# 'in' - \ && Requirements_matched_filename(s:filename) - setlocal makeprg=pip-compile\ % - endif +if exists("b:did_ftplugin") + finish endif +let b:did_ftplugin = 1 + +let s:save_cpoptions = &cpoptions +set cpoptions&vim +let b:undo_ftplugin = "setl iskeyword< commentstring<" +" pip options contain "-" +setlocal iskeyword+=- setlocal commentstring=#\ %s +compiler pip_compile + +let &cpoptions = s:save_cpoptions +unlet s:save_cpoptions " vim: et sw=4 ts=4 sts=4: |