mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Ignore compiler for javascript, fixes #521
This commit is contained in:
@@ -100,7 +100,7 @@ If you need full functionality of any plugin, please use it directly with your p
|
|||||||
- [icalendar](https://github.com/chutzpah/icalendar.vim) (syntax)
|
- [icalendar](https://github.com/chutzpah/icalendar.vim) (syntax)
|
||||||
- [idris](https://github.com/idris-hackers/idris-vim) (syntax, indent, ftplugin)
|
- [idris](https://github.com/idris-hackers/idris-vim) (syntax, indent, ftplugin)
|
||||||
- [ion](https://github.com/vmchale/ion-vim) (syntax, ftplugin)
|
- [ion](https://github.com/vmchale/ion-vim) (syntax, ftplugin)
|
||||||
- [javascript](https://github.com/pangloss/vim-javascript) (syntax, indent, compiler, ftplugin, extras)
|
- [javascript](https://github.com/pangloss/vim-javascript) (syntax, indent, ftplugin, extras)
|
||||||
- [jenkins](https://github.com/martinda/Jenkinsfile-vim-syntax) (syntax, indent)
|
- [jenkins](https://github.com/martinda/Jenkinsfile-vim-syntax) (syntax, indent)
|
||||||
- [jinja](https://github.com/lepture/vim-jinja) (syntax, indent)
|
- [jinja](https://github.com/lepture/vim-jinja) (syntax, indent)
|
||||||
- [jq](https://github.com/vito-c/jq.vim) (syntax, ftplugin)
|
- [jq](https://github.com/vito-c/jq.vim) (syntax, ftplugin)
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript') == -1
|
|
||||||
|
|
||||||
" Vim compiler plugin
|
|
||||||
" Language: JavaScript
|
|
||||||
" Maintainer: vim-javascript community
|
|
||||||
" URL: https://github.com/pangloss/vim-javascript
|
|
||||||
|
|
||||||
if exists("current_compiler")
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
let current_compiler = "eslint"
|
|
||||||
|
|
||||||
if exists(":CompilerSet") != 2
|
|
||||||
command! -nargs=* CompilerSet setlocal <args>
|
|
||||||
endif
|
|
||||||
|
|
||||||
CompilerSet makeprg=eslint\ -f\ compact\ %
|
|
||||||
CompilerSet errorformat=%f:\ line\ %l\\,\ col\ %c\\,\ %m
|
|
||||||
|
|
||||||
endif
|
|
||||||
@@ -447,7 +447,12 @@ filetypes:
|
|||||||
---
|
---
|
||||||
name: javascript
|
name: javascript
|
||||||
remote: pangloss/vim-javascript
|
remote: pangloss/vim-javascript
|
||||||
dirs: :javascript
|
ignored_dirs:
|
||||||
|
# we don't want eslint compiler, see #521
|
||||||
|
- compiler
|
||||||
|
extra_dirs:
|
||||||
|
# Used by ftplugins there
|
||||||
|
- extras
|
||||||
filetypes:
|
filetypes:
|
||||||
- name: javascript
|
- name: javascript
|
||||||
linguist: JavaScript
|
linguist: JavaScript
|
||||||
|
|||||||
@@ -158,7 +158,10 @@ def extract
|
|||||||
repo, branch, path = parse_remote(package["remote"])
|
repo, branch, path = parse_remote(package["remote"])
|
||||||
dir = "tmp/" + repo.split('/')[1]
|
dir = "tmp/" + repo.split('/')[1]
|
||||||
subdirs = []
|
subdirs = []
|
||||||
for subdir in DIRS.fetch(package.fetch("dirs", "default").to_sym)
|
dirs = DIRS.fetch(package.fetch("dirs", "default").to_sym)
|
||||||
|
dirs -= package.fetch("ignored_dirs", [])
|
||||||
|
dirs |= package.fetch("extra_dirs", [])
|
||||||
|
for subdir in dirs
|
||||||
subtree = "#{dir}/#{path ? path + "/" : ""}"
|
subtree = "#{dir}/#{path ? path + "/" : ""}"
|
||||||
subpath = "#{subtree}#{subdir}"
|
subpath = "#{subtree}#{subdir}"
|
||||||
if FileTest.directory?(subpath)
|
if FileTest.directory?(subpath)
|
||||||
@@ -307,8 +310,8 @@ def generate_ftdetect
|
|||||||
File.write('ftdetect/polyglot.vim', output)
|
File.write('ftdetect/polyglot.vim', output)
|
||||||
end
|
end
|
||||||
|
|
||||||
# download
|
download
|
||||||
# extract
|
extract
|
||||||
generate_ftdetect
|
generate_ftdetect
|
||||||
# puts(" Bye! Have a wonderful time!")
|
puts(" Bye! Have a wonderful time!")
|
||||||
# FileUtils.rm_rf("tmp")
|
FileUtils.rm_rf("tmp")
|
||||||
|
|||||||
Reference in New Issue
Block a user