Compare commits

...

2 Commits

Author SHA1 Message Date
Adam Stankiewicz
25db54573a Mention vim-polyglot is more secure than using individual packs 2020-08-24 10:32:03 +02:00
Adam Stankiewicz
d1bfe50419 Ignore compiler for javascript, fixes #521 2020-08-24 10:29:39 +02:00
4 changed files with 16 additions and 27 deletions

View File

@@ -8,6 +8,7 @@ A collection of language packs for Vim.
- It **won't affect your startup time**, as scripts are loaded only on demand\*.
- It **installs and updates 120+ times faster** than the <!--Package Count-->156<!--/Package Count--> packages it consists of.
- It is more secure because scripts loaded for all extensions are generated by vim-polyglot (ftdetect).
- Solid syntax and indentation support (other features skipped). Only the best language packs.
- All unnecessary files are ignored (like enormous documentation from php support).
- No support for esoteric languages, only most popular ones (modern too, like `slim`).
@@ -100,7 +101,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)

View File

@@ -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

View File

@@ -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

View File

@@ -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")