summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-08-24 10:29:39 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2020-08-24 10:29:39 +0200
commitd1bfe50419e0e12aaf77b68de0a75bfb3ef9c299 (patch)
tree88addc18a84c49480327b81a142f50067d40973a
parent22e8e01c1e7bba0e1aa54255dad21dbb8496dd7a (diff)
downloadvim-polyglot-d1bfe50419e0e12aaf77b68de0a75bfb3ef9c299.tar.gz
vim-polyglot-d1bfe50419e0e12aaf77b68de0a75bfb3ef9c299.zip
Ignore compiler for javascript, fixes #521
-rw-r--r--README.md2
-rw-r--r--compiler/eslint.vim20
-rw-r--r--packages.yaml7
-rwxr-xr-xscripts/build13
4 files changed, 15 insertions, 27 deletions
diff --git a/README.md b/README.md
index cd8acb1c..3e025b1b 100644
--- a/README.md
+++ b/README.md
@@ -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)
- [idris](https://github.com/idris-hackers/idris-vim) (syntax, indent, 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)
- [jinja](https://github.com/lepture/vim-jinja) (syntax, indent)
- [jq](https://github.com/vito-c/jq.vim) (syntax, ftplugin)
diff --git a/compiler/eslint.vim b/compiler/eslint.vim
deleted file mode 100644
index 1e5e6de5..00000000
--- a/compiler/eslint.vim
+++ /dev/null
@@ -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
diff --git a/packages.yaml b/packages.yaml
index 69025591..cc857195 100644
--- a/packages.yaml
+++ b/packages.yaml
@@ -447,7 +447,12 @@ filetypes:
---
name: 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:
- name: javascript
linguist: JavaScript
diff --git a/scripts/build b/scripts/build
index e8cafd51..a3aeb604 100755
--- a/scripts/build
+++ b/scripts/build
@@ -158,7 +158,10 @@ def extract
repo, branch, path = parse_remote(package["remote"])
dir = "tmp/" + repo.split('/')[1]
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 + "/" : ""}"
subpath = "#{subtree}#{subdir}"
if FileTest.directory?(subpath)
@@ -307,8 +310,8 @@ def generate_ftdetect
File.write('ftdetect/polyglot.vim', output)
end
-# download
-# extract
+download
+extract
generate_ftdetect
-# puts(" Bye! Have a wonderful time!")
-# FileUtils.rm_rf("tmp")
+puts(" Bye! Have a wonderful time!")
+FileUtils.rm_rf("tmp")