summaryrefslogtreecommitdiffstats
path: root/after/ftplugin
diff options
context:
space:
mode:
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: