mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
fix: Migrate build script to ruby
This commit is contained in:
10
README.md
10
README.md
@@ -38,7 +38,7 @@ mkdir -p ~/.vim/pack/default/start
|
|||||||
git clone https://github.com/sheerun/vim-polyglot ~/.vim/pack/default/start/vim-polyglot
|
git clone https://github.com/sheerun/vim-polyglot ~/.vim/pack/default/start/vim-polyglot
|
||||||
```
|
```
|
||||||
|
|
||||||
NOTE: Not all features of listed language packs are available. We strip them from functionality slowing vim startup in general (for example we ignore `plugins` folder that is loaded regardless of file type, use `ftplugin` instead).
|
NOTE: Not all features of individual language packs are available. We strip them from functionality slowing vim startup (for example we ignore `plugins` folder that is loaded regardless of file type, instead we prefer `ftplugin` which is loaded lazily).
|
||||||
|
|
||||||
If you need full functionality of any plugin, please use it directly with your plugin manager.
|
If you need full functionality of any plugin, please use it directly with your plugin manager.
|
||||||
|
|
||||||
@@ -205,7 +205,7 @@ If you need full functionality of any plugin, please use it directly with your p
|
|||||||
|
|
||||||
## Updating
|
## Updating
|
||||||
|
|
||||||
You can either wait for new patch release with updates or run the `./build` script by yourself.
|
You can either wait for new patch release with updates or run the `scripts/build` script by yourself.
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
@@ -218,13 +218,13 @@ Individual language packs can be disabled by setting `g:polyglot_disabled` as fo
|
|||||||
let g:polyglot_disabled = ['css']
|
let g:polyglot_disabled = ['css']
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that disabling languages won't make in general your vim startup any faster / slower (only for specific file type). Vim-polyglot is selection of language plugins that are loaded only on demand.
|
Please note that disabling a language won't make in your vim startup any faster / slower (only for specific this specific filetype). All plugins are loaded lazily, on demand.
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
Language packs are periodically updated using automated `build` script.
|
Language packs are periodically updated using automated `scripts/build` script.
|
||||||
|
|
||||||
Feel free to add your language to `packages.yaml`, and send pull-request. Please don't run `./build` and include that in your PR, send just changes to `packages.yaml` and `build` script if really necessary.
|
Feel free to add your language to `packages.yaml`, and send pull-request. Please don't run `scripts/build` and include that in your PR, send just changes to `packages.yaml` and `build` script if really necessary. You can run `scripts/test` to run rough tests.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ require 'open3'
|
|||||||
require 'yaml'
|
require 'yaml'
|
||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
|
|
||||||
Dir.chdir(__dir__)
|
Dir.chdir(File.dirname(__dir__))
|
||||||
|
|
||||||
PACKAGES = YAML.load_stream(File.read('packages.yaml'))
|
PACKAGES = YAML.load_stream(File.read('packages.yaml'))
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ def each_hash(data, &block)
|
|||||||
end
|
end
|
||||||
|
|
||||||
def patterns_to_vim_patterns(patterns)
|
def patterns_to_vim_patterns(patterns)
|
||||||
stdin, stdout, stderr = Open3.popen3('vim', '-V', '--clean', '/dev/stdin', '-es', '-c', "echo expand('%:p:h') | source #{__dir__}/eregex.vim", '-c', "for line in range(0, line('$')) | call setline(line, ExtendedRegex2VimRegex(getline(line))) | endfor", '-c', ':wq! /dev/stdout', chdir: __dir__)
|
stdin, stdout, stderr = Open3.popen3('vim', '-V', '--clean', '/dev/stdin', '-es', '-c', "echo expand('%:p:h') | source #{__dir__}/scripts/eregex.vim", '-c', "for line in range(0, line('$')) | call setline(line, ExtendedRegex2VimRegex(getline(line))) | endfor", '-c', ':wq! /dev/stdout', chdir: __dir__)
|
||||||
stdin.write(patterns.join("\n"))
|
stdin.write(patterns.join("\n"))
|
||||||
stdin.close
|
stdin.close
|
||||||
stdout.readlines
|
stdout.readlines
|
||||||
1102
scripts/eregex.vim
Normal file
1102
scripts/eregex.vim
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user