mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-09 12:03:53 -05:00
Compare commits
83 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0626cc90a2 | ||
|
|
8af4f8e6c0 | ||
|
|
e5668602cc | ||
|
|
6783bd0df9 | ||
|
|
dc786b7641 | ||
|
|
3f9ce1c6cf | ||
|
|
44e79fc935 | ||
|
|
2fcb15afa0 | ||
|
|
1150adc4db | ||
|
|
47dcae9131 | ||
|
|
4b54ae9cd9 | ||
|
|
c5625ffedd | ||
|
|
45f2f94975 | ||
|
|
cec808bc19 | ||
|
|
95d82fdb66 | ||
|
|
73c5187177 | ||
|
|
ab0ff253f6 | ||
|
|
c228e993ad | ||
|
|
da18fe6851 | ||
|
|
4af1321588 | ||
|
|
cd76812402 | ||
|
|
ff35c02445 | ||
|
|
32f5e90737 | ||
|
|
d96f11bcd8 | ||
|
|
0738ad654d | ||
|
|
05e21a9e25 | ||
|
|
683286b3d7 | ||
|
|
740a60811c | ||
|
|
2838800832 | ||
|
|
ba3fe9e1ae | ||
|
|
45a7512dea | ||
|
|
81ada1101e | ||
|
|
48d0bc7556 | ||
|
|
cbde2571d4 | ||
|
|
d73c4d1562 | ||
|
|
20b31f5337 | ||
|
|
8e61708b45 | ||
|
|
3c148e9ef5 | ||
|
|
739102e06d | ||
|
|
f52f6b9519 | ||
|
|
b6654c85b2 | ||
|
|
e3609fed6b | ||
|
|
7324528984 | ||
|
|
0a2f2cc04d | ||
|
|
6422a5a479 | ||
|
|
113f9b8949 | ||
|
|
f828912a7f | ||
|
|
2522ad2029 | ||
|
|
50a9a7345f | ||
|
|
29ec69ffa0 | ||
|
|
6636144497 | ||
|
|
2a205569eb | ||
|
|
114f731483 | ||
|
|
4b8687ebca | ||
|
|
78f6c8f318 | ||
|
|
86bf33aa3b | ||
|
|
b64fcedd82 | ||
|
|
903793ac04 | ||
|
|
71a21a1044 | ||
|
|
1d7f0e4a7e | ||
|
|
ad2df97a64 | ||
|
|
fbeca0ed90 | ||
|
|
8c1ec94a3c | ||
|
|
5297baf285 | ||
|
|
5e2607d93f | ||
|
|
3d80a66e7b | ||
|
|
0980839568 | ||
|
|
4ab0bdd326 | ||
|
|
dbfcb6dca4 | ||
|
|
6208384bd4 | ||
|
|
225c408b02 | ||
|
|
71d9a2db9f | ||
|
|
233a817f05 | ||
|
|
c3e825027d | ||
|
|
3618414fad | ||
|
|
88cae16fca | ||
|
|
6d7f437b84 | ||
|
|
bb27d0efbf | ||
|
|
8a790ac7bf | ||
|
|
c9f2aa9ae0 | ||
|
|
1fc249bafd | ||
|
|
518d733369 | ||
|
|
0021384259 |
2
Makefile
2
Makefile
@@ -7,4 +7,4 @@ test:
|
|||||||
@ scripts/test
|
@ scripts/test
|
||||||
|
|
||||||
dev:
|
dev:
|
||||||
@ find scripts autoload/polyglot ftdetect tests . -type f -depth 1 | DEV=1 entr bash -c 'make && make test'
|
@ find scripts autoload/polyglot ftdetect tests . -type f -maxdepth 1 | DEV=1 entr bash -c 'make'
|
||||||
|
|||||||
55
README.md
55
README.md
@@ -1,18 +1,16 @@
|
|||||||

|

|
||||||
|
|
||||||
 []()
|
[](https://github.com/sheerun/vim-polyglot/actions) []()
|
||||||
|
|
||||||
A collection of language packs for Vim.
|
A collection of language packs for Vim.
|
||||||
|
|
||||||
> One to rule them all, one to find them, one to bring them all and in the darkness bind them.
|
> One to rule them all, one to find them, one to bring them all and in the darkness bind them.
|
||||||
|
|
||||||
- It **won't affect your startup time**, as scripts are loaded only on demand\*.
|
- 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-->598<!--/Package Count--> packages it consists of.
|
- It **installs and updates 120+ times faster** than the <!--Package Count-->601<!--/Package Count--> packages it consists of.
|
||||||
- It is more secure because scripts loaded for all extensions are generated by vim-polyglot (ftdetect).
|
- It is also more secure (scripts loaded for every filetype are generated by vim-polyglot)
|
||||||
- Solid syntax and indentation support (other features skipped). Only the best language packs.
|
- Best syntax and indentation support (no other features). Hand-selected language packs.
|
||||||
- All unnecessary files are ignored (like enormous documentation from php support).
|
- Automatically detects indentation (includes performance-optimized version of [vim-sleuth](https://github.com/tpope/vim-sleuth), can be disabled)
|
||||||
- Automatically detect indentation (includes performance-optimized version of [vim-sleuth](https://github.com/tpope/vim-sleuth))
|
|
||||||
- Each build is tested by automated vimrunner script on CI. See `spec` directory.
|
|
||||||
|
|
||||||
\*To be completely honest, optimized `ftdetect` script takes around `10ms` to load.
|
\*To be completely honest, optimized `ftdetect` script takes around `10ms` to load.
|
||||||
|
|
||||||
@@ -21,10 +19,16 @@ A collection of language packs for Vim.
|
|||||||
1. Install [Pathogen](https://github.com/tpope/vim-pathogen), [Vundle](https://github.com/VundleVim/Vundle.vim), [NeoBundle](https://github.com/Shougo/neobundle.vim), or [Plug](https://github.com/junegunn/vim-plug) package manager for Vim.
|
1. Install [Pathogen](https://github.com/tpope/vim-pathogen), [Vundle](https://github.com/VundleVim/Vundle.vim), [NeoBundle](https://github.com/Shougo/neobundle.vim), or [Plug](https://github.com/junegunn/vim-plug) package manager for Vim.
|
||||||
2. Use this repository as submodule or package.
|
2. Use this repository as submodule or package.
|
||||||
|
|
||||||
For example when using [Plug](https://github.com/junegunn/vim-plug):
|
For example when using [Plug](https://github.com/junegunn/vim-plug) (which I recommend):
|
||||||
|
|
||||||
|
```vim
|
||||||
|
set nocompatible
|
||||||
|
|
||||||
|
call plug#begin()
|
||||||
|
|
||||||
```
|
|
||||||
Plug 'sheerun/vim-polyglot'
|
Plug 'sheerun/vim-polyglot'
|
||||||
|
|
||||||
|
call plug#end()
|
||||||
```
|
```
|
||||||
|
|
||||||
Optionally download one of the [releases](https://github.com/sheerun/vim-polyglot/releases) and unpack it directly under `~/.vim` directory.
|
Optionally download one of the [releases](https://github.com/sheerun/vim-polyglot/releases) and unpack it directly under `~/.vim` directory.
|
||||||
@@ -35,13 +39,9 @@ You can also use Vim 8 built-in package manager:
|
|||||||
git clone --depth 1 https://github.com/sheerun/vim-polyglot ~/.vim/pack/plugins/start/vim-polyglot
|
git clone --depth 1 https://github.com/sheerun/vim-polyglot ~/.vim/pack/plugins/start/vim-polyglot
|
||||||
```
|
```
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
## Language packs
|
## Language packs
|
||||||
|
|
||||||
On top of all language packs from [vim repository](https://github.com/vim/vim/tree/master/runtime), vim-polyglot includes:
|
On top of all language packs from [vim repository](https://github.com/vim/vim/tree/master/runtime/syntax), vim-polyglot includes:
|
||||||
|
|
||||||
<!--Language Packs-->
|
<!--Language Packs-->
|
||||||
- [acpiasl](https://github.com/martinlroth/vim-acpi-asl) (Syntax highlighting for asl and dsl files)
|
- [acpiasl](https://github.com/martinlroth/vim-acpi-asl) (Syntax highlighting for asl and dsl files)
|
||||||
@@ -71,14 +71,14 @@ On top of all language packs from [vim repository](https://github.com/vim/vim/tr
|
|||||||
- [dhall](https://github.com/vmchale/dhall-vim) (Dhall syntax highlighting for dhall files)
|
- [dhall](https://github.com/vmchale/dhall-vim) (Dhall syntax highlighting for dhall files)
|
||||||
- [dlang](https://github.com/JesseKPhillips/d.vim) (D syntax highlighting for d, di, lst, dd, ddoc and sdl files)
|
- [dlang](https://github.com/JesseKPhillips/d.vim) (D syntax highlighting for d, di, lst, dd, ddoc and sdl files)
|
||||||
- [docker-compose](https://github.com/ekalinin/Dockerfile.vim)
|
- [docker-compose](https://github.com/ekalinin/Dockerfile.vim)
|
||||||
- [elixir](https://github.com/elixir-lang/vim-elixir) (Elixir and HTML+EEX syntax highlighting for ex, exs, eex and leex files)
|
- [elixir](https://github.com/elixir-lang/vim-elixir) (Elixir and HTML+EEX syntax highlighting for ex, exs, eex, html.leex and leex files)
|
||||||
- [elm](https://github.com/andys8/vim-elm-syntax) (Elm syntax highlighting for elm files)
|
- [elm](https://github.com/andys8/vim-elm-syntax) (Elm syntax highlighting for elm files)
|
||||||
- [emberscript](https://github.com/yalesov/vim-ember-script) (EmberScript syntax highlighting for em and emberscript files)
|
- [emberscript](https://github.com/yalesov/vim-ember-script) (EmberScript syntax highlighting for em and emberscript files)
|
||||||
- [emblem](https://github.com/yalesov/vim-emblem) (Syntax highlighting for emblem and em files)
|
- [emblem](https://github.com/yalesov/vim-emblem) (Syntax highlighting for emblem and em files)
|
||||||
- [erlang](https://github.com/vim-erlang/vim-erlang-runtime) (Erlang syntax highlighting for erl, app.src, es, escript, hrl, xrl, yrl, app and yaws files)
|
- [erlang](https://github.com/vim-erlang/vim-erlang-runtime) (Erlang syntax highlighting for erl, app.src, es, escript, hrl, xrl, yrl, app and yaws files)
|
||||||
- [fennel](https://github.com/bakpakin/fennel.vim) (Syntax highlighting for fnl files)
|
- [fennel](https://github.com/bakpakin/fennel.vim) (Syntax highlighting for fnl files)
|
||||||
- [ferm](https://github.com/vim-scripts/ferm.vim) (Syntax highlighting for ferm files)
|
- [ferm](https://github.com/vim-scripts/ferm.vim) (Syntax highlighting for ferm files)
|
||||||
- [fish](https://github.com/georgewitteman/vim-fish) (fish syntax highlighting for fish files)
|
- [fish](https://github.com/blankname/vim-fish) (fish syntax highlighting for fish files)
|
||||||
- [flatbuffers](https://github.com/dcharbon/vim-flatbuffers) (Syntax highlighting for fbs files)
|
- [flatbuffers](https://github.com/dcharbon/vim-flatbuffers) (Syntax highlighting for fbs files)
|
||||||
- [fsharp](https://github.com/ionide/Ionide-vim) (F# syntax highlighting for fs, fsi and fsx files)
|
- [fsharp](https://github.com/ionide/Ionide-vim) (F# syntax highlighting for fs, fsi and fsx files)
|
||||||
- [gdscript](https://github.com/calviken/vim-gdscript3) (GDScript syntax highlighting for gd files)
|
- [gdscript](https://github.com/calviken/vim-gdscript3) (GDScript syntax highlighting for gd files)
|
||||||
@@ -111,6 +111,7 @@ On top of all language packs from [vim repository](https://github.com/vim/vim/tr
|
|||||||
- [jq](https://github.com/vito-c/jq.vim) (JSONiq syntax highlighting for jq files)
|
- [jq](https://github.com/vito-c/jq.vim) (JSONiq syntax highlighting for jq files)
|
||||||
- [json5](https://github.com/GutenYe/json5.vim) (JSON5 syntax highlighting for json5 files)
|
- [json5](https://github.com/GutenYe/json5.vim) (JSON5 syntax highlighting for json5 files)
|
||||||
- [json](https://github.com/elzr/vim-json) (JSON syntax highlighting for json, avsc, geojson, gltf, har and 13 more files)
|
- [json](https://github.com/elzr/vim-json) (JSON syntax highlighting for json, avsc, geojson, gltf, har and 13 more files)
|
||||||
|
- [jsonc](https://github.com/neoclide/jsonc.vim) (Syntax highlighting for cjson and jsonc files)
|
||||||
- [jsonnet](https://github.com/google/vim-jsonnet) (Jsonnet syntax highlighting for jsonnet and libsonnet files)
|
- [jsonnet](https://github.com/google/vim-jsonnet) (Jsonnet syntax highlighting for jsonnet and libsonnet files)
|
||||||
- [jst](https://github.com/briancollins/vim-jst) (EJS syntax highlighting for ejs, ect and jst files)
|
- [jst](https://github.com/briancollins/vim-jst) (EJS syntax highlighting for ejs, ect and jst files)
|
||||||
- [jsx](https://github.com/MaxMEllon/vim-jsx-pretty) (JSX syntax highlighting for jsx files)
|
- [jsx](https://github.com/MaxMEllon/vim-jsx-pretty) (JSX syntax highlighting for jsx files)
|
||||||
@@ -127,6 +128,7 @@ On top of all language packs from [vim repository](https://github.com/vim/vim/tr
|
|||||||
- [mathematica](https://github.com/voldikss/vim-mma) (Mathematica syntax highlighting for mathematica, cdf, m, ma, mt and 6 more files)
|
- [mathematica](https://github.com/voldikss/vim-mma) (Mathematica syntax highlighting for mathematica, cdf, m, ma, mt and 6 more files)
|
||||||
- [mdx](https://github.com/jxnblk/vim-mdx-js) (Syntax highlighting for mdx files)
|
- [mdx](https://github.com/jxnblk/vim-mdx-js) (Syntax highlighting for mdx files)
|
||||||
- [meson](https://github.com/mesonbuild/meson/tree/master/data/syntax-highlighting/vim) (Meson syntax highlighting for wrap files)
|
- [meson](https://github.com/mesonbuild/meson/tree/master/data/syntax-highlighting/vim) (Meson syntax highlighting for wrap files)
|
||||||
|
- [mint](https://github.com/IrenejMarc/vim-mint) (Syntax highlighting for mint files)
|
||||||
- [moonscript](https://github.com/leafo/moonscript-vim) (MoonScript syntax highlighting for moon files)
|
- [moonscript](https://github.com/leafo/moonscript-vim) (MoonScript syntax highlighting for moon files)
|
||||||
- [nginx](https://github.com/chr4/nginx.vim) (Nginx syntax highlighting for nginx, nginxconf and vhost files)
|
- [nginx](https://github.com/chr4/nginx.vim) (Nginx syntax highlighting for nginx, nginxconf and vhost files)
|
||||||
- [nim](https://github.com/zah/nim.vim) (Nim syntax highlighting for nim, nim.cfg, nimble, nimrod and nims files)
|
- [nim](https://github.com/zah/nim.vim) (Nim syntax highlighting for nim, nim.cfg, nimble, nimrod and nims files)
|
||||||
@@ -137,6 +139,7 @@ On top of all language packs from [vim repository](https://github.com/vim/vim/tr
|
|||||||
- [odin](https://github.com/Tetralux/odin.vim) (Odin syntax highlighting for odin files)
|
- [odin](https://github.com/Tetralux/odin.vim) (Odin syntax highlighting for odin files)
|
||||||
- [opencl](https://github.com/petRUShka/vim-opencl) (OpenCL syntax highlighting for cl and opencl files)
|
- [opencl](https://github.com/petRUShka/vim-opencl) (OpenCL syntax highlighting for cl and opencl files)
|
||||||
- [perl](https://github.com/vim-perl/vim-perl) (Perl syntax highlighting for pl, al, cgi, fcgi, perl and 12 more files)
|
- [perl](https://github.com/vim-perl/vim-perl) (Perl syntax highlighting for pl, al, cgi, fcgi, perl and 12 more files)
|
||||||
|
- [pest](https://github.com/pest-parser/pest.vim) (Syntax highlighting for pest files)
|
||||||
- [pgsql](https://github.com/lifepillar/pgsql.vim) (PLpgSQL syntax highlighting for pgsql files)
|
- [pgsql](https://github.com/lifepillar/pgsql.vim) (PLpgSQL syntax highlighting for pgsql files)
|
||||||
- [php](https://github.com/StanAngeloff/php.vim) (PHP syntax highlighting for php, aw, ctp, fcgi, inc and 7 more files)
|
- [php](https://github.com/StanAngeloff/php.vim) (PHP syntax highlighting for php, aw, ctp, fcgi, inc and 7 more files)
|
||||||
- [plantuml](https://github.com/aklt/plantuml-syntax) (PlantUML syntax highlighting for puml, iuml, plantuml, uml and pu files)
|
- [plantuml](https://github.com/aklt/plantuml-syntax) (PlantUML syntax highlighting for puml, iuml, plantuml, uml and pu files)
|
||||||
@@ -177,6 +180,7 @@ On top of all language packs from [vim repository](https://github.com/vim/vim/tr
|
|||||||
- [swift](https://github.com/keith/swift.vim) (Swift syntax highlighting for swift files)
|
- [swift](https://github.com/keith/swift.vim) (Swift syntax highlighting for swift files)
|
||||||
- [sxhkd](https://github.com/baskerville/vim-sxhkdrc) (Syntax highlighting for sxhkdrc files)
|
- [sxhkd](https://github.com/baskerville/vim-sxhkdrc) (Syntax highlighting for sxhkdrc files)
|
||||||
- [systemd](https://github.com/wgwoods/vim-systemd-syntax) (Syntax highlighting for automount, dnssd, link, mount, netdev and 9 more files)
|
- [systemd](https://github.com/wgwoods/vim-systemd-syntax) (Syntax highlighting for automount, dnssd, link, mount, netdev and 9 more files)
|
||||||
|
- [terraform](https://github.com/hashivim/vim-terraform) (Syntax highlighting for tf and tfvars files)
|
||||||
- [textile](https://github.com/timcharper/textile.vim) (Textile syntax highlighting for textile files)
|
- [textile](https://github.com/timcharper/textile.vim) (Textile syntax highlighting for textile files)
|
||||||
- [thrift](https://github.com/solarnz/thrift.vim) (Thrift syntax highlighting for thrift files)
|
- [thrift](https://github.com/solarnz/thrift.vim) (Thrift syntax highlighting for thrift files)
|
||||||
- [tmux](https://github.com/ericpruitt/tmux.vim/tree/master/vim)
|
- [tmux](https://github.com/ericpruitt/tmux.vim/tree/master/vim)
|
||||||
@@ -192,7 +196,7 @@ On top of all language packs from [vim repository](https://github.com/vim/vim/tr
|
|||||||
- [velocity](https://github.com/lepture/vim-velocity) (Syntax highlighting for vm files)
|
- [velocity](https://github.com/lepture/vim-velocity) (Syntax highlighting for vm files)
|
||||||
- [vue](https://github.com/posva/vim-vue) (Vue syntax highlighting for vue and wpy files)
|
- [vue](https://github.com/posva/vim-vue) (Vue syntax highlighting for vue and wpy files)
|
||||||
- [xdc](https://github.com/amal-khailtash/vim-xdc-syntax) (Syntax highlighting for xdc files)
|
- [xdc](https://github.com/amal-khailtash/vim-xdc-syntax) (Syntax highlighting for xdc files)
|
||||||
- [xml](https://github.com/amadeus/vim-xml) (XML syntax highlighting for xml, adml, admx, ant, axml and 93 more files)
|
- [xml](https://github.com/amadeus/vim-xml) (XML syntax highlighting for xml, adml, admx, ant, axml and 94 more files)
|
||||||
- [xsl](https://github.com/vim-scripts/XSLT-syntax) (XSLT syntax highlighting for xslt and xsl files)
|
- [xsl](https://github.com/vim-scripts/XSLT-syntax) (XSLT syntax highlighting for xslt and xsl files)
|
||||||
- [yard](https://github.com/noprompt/vim-yardoc)
|
- [yard](https://github.com/noprompt/vim-yardoc)
|
||||||
- [zephir](https://github.com/xwsoul/vim-zephir) (Zephir syntax highlighting for zep files)
|
- [zephir](https://github.com/xwsoul/vim-zephir) (Zephir syntax highlighting for zep files)
|
||||||
@@ -206,18 +210,18 @@ You can either wait for new patch release with updates or run `make` by yourself
|
|||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
Please make sure you have `syntax on` in your `.vimrc` (or use something like [sheerun/vimrc](https://github.com/sheerun/vimrc))
|
Please make sure you have `set nocompatible` in your `.vimrc` (or use something like [sheerun/vimrc](https://github.com/sheerun/vimrc))
|
||||||
|
|
||||||
Individual language packs can be disabled by setting `g:polyglot_disabled` as follows:
|
Individual language packs can be disabled by setting `g:polyglot_disabled` as follows:
|
||||||
|
|
||||||
|
**Please declare this variable before polyglot is loaded (at the top of .vimrc)**
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
let g:polyglot_disabled = ['markdown']
|
let g:polyglot_disabled = ['markdown']
|
||||||
```
|
```
|
||||||
|
|
||||||
The list of available languages to disable is shown above.
|
The list of available languages to disable is shown above.
|
||||||
|
|
||||||
*Please declare this variable before polyglot is loaded (at the top of .vimrc)*
|
|
||||||
|
|
||||||
If you wish to use filetype detection by Vim Polyglot but you'd like to use your own syntax-highlighting plugin, you can append `.plugin` to disabled entry, like below. Disabling Vim Polyglot filetype plugin won't disable native Vim filetype plugin.
|
If you wish to use filetype detection by Vim Polyglot but you'd like to use your own syntax-highlighting plugin, you can append `.plugin` to disabled entry, like below. Disabling Vim Polyglot filetype plugin won't disable native Vim filetype plugin.
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
@@ -226,12 +230,23 @@ let g:polyglot_disabled = ['markdown.plugin']
|
|||||||
|
|
||||||
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 lazily loaded only when they are really needed.
|
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 lazily loaded only when they are really needed.
|
||||||
|
|
||||||
|
## Autoindent
|
||||||
|
|
||||||
Vim Polyglot tries to automatically detect indentation settings (just like vim-sleuth). If this feature is not working for you for some reason, please file an issue and disable it temporarily with:
|
Vim Polyglot tries to automatically detect indentation settings (just like vim-sleuth). If this feature is not working for you for some reason, please file an issue and disable it temporarily with:
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
let g:polyglot_disabled = ['autoindent']
|
let g:polyglot_disabled = ['autoindent']
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Default settings
|
||||||
|
|
||||||
|
Vim Polyglot includes vim-sensible plugin, which is usually necessary for editing any language. This can be disabled with:
|
||||||
|
|
||||||
|
|
||||||
|
```vim
|
||||||
|
let g:polyglot_disabled = ['sensible']
|
||||||
|
```
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
Language packs are periodically updated using automated `scripts/build` script.
|
Language packs are periodically updated using automated `scripts/build` script.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1
|
if has_key(g:polyglot_is_disabled, 'haskell')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
setlocal comments=s1fl:{-,mb:-,ex:-},:--
|
setlocal comments=s1fl:{-,mb:-,ex:-},:--
|
||||||
setlocal iskeyword+=-,.,*
|
setlocal iskeyword+=-,.,*
|
||||||
setlocal commentstring=--\ %s
|
setlocal commentstring=--\ %s
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cjsx') == -1
|
if has_key(g:polyglot_is_disabled, 'cjsx')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
if exists("loaded_matchit")
|
if exists("loaded_matchit")
|
||||||
let b:match_ignorecase = 0
|
let b:match_ignorecase = 0
|
||||||
let b:match_words = '(:),\[:\],{:},<:>,' .
|
let b:match_words = '(:),\[:\],{:},<:>,' .
|
||||||
\ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>'
|
\ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1
|
if has_key(g:polyglot_is_disabled, 'haskell')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
setlocal comments=s1fl:{-,mb:\ \ ,ex:-},:--
|
setlocal comments=s1fl:{-,mb:\ \ ,ex:-},:--
|
||||||
setlocal iskeyword+='
|
setlocal iskeyword+='
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
|
if has_key(g:polyglot_is_disabled, 'html5')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Maintainer: othree <othree@gmail.com>
|
" Maintainer: othree <othree@gmail.com>
|
||||||
" URL: http://github.com/othree/html5.vim
|
" URL: http://github.com/othree/html5.vim
|
||||||
@@ -9,5 +11,3 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
|
|||||||
" setlocal iskeyword+=-
|
" setlocal iskeyword+=-
|
||||||
|
|
||||||
setlocal commentstring=<!--%s-->
|
setlocal commentstring=<!--%s-->
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris') == -1
|
if has_key(g:polyglot_is_disabled, 'idris')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
setlocal iskeyword+='
|
setlocal iskeyword+='
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris2') == -1
|
if has_key(g:polyglot_is_disabled, 'idris2')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
setlocal iskeyword+='
|
setlocal iskeyword+='
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript') == -1
|
if has_key(g:polyglot_is_disabled, 'javascript')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Vim filetype plugin file
|
" Vim filetype plugin file
|
||||||
" Language: JavaScript
|
" Language: JavaScript
|
||||||
@@ -12,5 +14,3 @@ if exists('b:undo_ftplugin')
|
|||||||
else
|
else
|
||||||
let b:undo_ftplugin = 'setlocal iskeyword< suffixesadd<'
|
let b:undo_ftplugin = 'setlocal iskeyword< suffixesadd<'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
if has_key(g:polyglot_is_disabled, 'jsx')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
if get(g:, 'vim_jsx_pretty_disable_js', 0)
|
if get(g:, 'vim_jsx_pretty_disable_js', 0)
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
source <sfile>:h/jsx.vim
|
source <sfile>:h/jsx.vim
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
if has_key(g:polyglot_is_disabled, 'jsx')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
source <sfile>:h/jsx.vim
|
source <sfile>:h/jsx.vim
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
if has_key(g:polyglot_is_disabled, 'jsx')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
" Vim ftplugin file
|
" Vim ftplugin file
|
||||||
@@ -31,5 +33,3 @@ augroup jsx_comment
|
|||||||
augroup end
|
augroup end
|
||||||
|
|
||||||
setlocal suffixesadd+=.jsx
|
setlocal suffixesadd+=.jsx
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1
|
if has_key(g:polyglot_is_disabled, 'llvm')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Copyright (c) 2018 rhysd
|
" Copyright (c) 2018 rhysd
|
||||||
"
|
"
|
||||||
@@ -483,5 +485,3 @@ endfunction
|
|||||||
if !exists(':LLI')
|
if !exists(':LLI')
|
||||||
command! -buffer -nargs=? -bar -complete=file LLI call <SID>run_lli(<f-args>)
|
command! -buffer -nargs=? -bar -complete=file LLI call <SID>run_lli(<f-args>)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1
|
if has_key(g:polyglot_is_disabled, 'puppet')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
if !exists('g:puppet_align_hashes')
|
if !exists('g:puppet_align_hashes')
|
||||||
let g:puppet_align_hashes = 1
|
let g:puppet_align_hashes = 1
|
||||||
@@ -7,5 +9,3 @@ endif
|
|||||||
if g:puppet_align_hashes
|
if g:puppet_align_hashes
|
||||||
inoremap <buffer> <silent> => =><Esc>:call puppet#align#AlignHashrockets()<CR>$a
|
inoremap <buffer> <silent> => =><Esc>:call puppet#align#AlignHashrockets()<CR>$a
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
if has_key(g:polyglot_is_disabled, 'jsx')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" modified from html.vim
|
" modified from html.vim
|
||||||
" For matchit plugin
|
" For matchit plugin
|
||||||
@@ -28,5 +30,3 @@ augroup jsx_comment
|
|||||||
augroup end
|
augroup end
|
||||||
|
|
||||||
setlocal suffixesadd+=.tsx
|
setlocal suffixesadd+=.tsx
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
if has_key(g:polyglot_is_disabled, 'jsx')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
source <sfile>:h/tsx.vim
|
source <sfile>:h/tsx.vim
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
|
if has_key(g:polyglot_is_disabled, 'html5')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Vim indent script for HTML
|
" Vim indent script for HTML
|
||||||
" Header: "{{{
|
" Header: "{{{
|
||||||
@@ -1060,5 +1062,3 @@ let &cpo = s:cpo_save
|
|||||||
unlet s:cpo_save
|
unlet s:cpo_save
|
||||||
|
|
||||||
" vim: fdm=marker ts=8 sw=2 tw=78
|
" vim: fdm=marker ts=8 sw=2 tw=78
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
if has_key(g:polyglot_is_disabled, 'jsx')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
if get(g:, 'vim_jsx_pretty_disable_js', 0)
|
if get(g:, 'vim_jsx_pretty_disable_js', 0)
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
source <sfile>:h/jsx.vim
|
source <sfile>:h/jsx.vim
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
if has_key(g:polyglot_is_disabled, 'graphql')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
|
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
|
||||||
"
|
"
|
||||||
@@ -36,11 +38,9 @@ setlocal indentexpr=GetJavascriptGraphQLIndent()
|
|||||||
|
|
||||||
function GetJavascriptGraphQLIndent()
|
function GetJavascriptGraphQLIndent()
|
||||||
let l:stack = map(synstack(v:lnum, 1), "synIDattr(v:val, 'name')")
|
let l:stack = map(synstack(v:lnum, 1), "synIDattr(v:val, 'name')")
|
||||||
if get(l:stack, 0) ==# 'graphqlTemplateString'
|
if get(l:stack, 0, '') ==# 'graphqlTemplateString'
|
||||||
return GetGraphQLIndent()
|
return GetGraphQLIndent()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
return eval(b:indentexpr_base)
|
return eval(b:indentexpr_base)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
if has_key(g:polyglot_is_disabled, 'jsx')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
source <sfile>:h/jsx.vim
|
source <sfile>:h/jsx.vim
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
if has_key(g:polyglot_is_disabled, 'jsx')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
" Vim indent file
|
" Vim indent file
|
||||||
@@ -29,5 +31,3 @@ endfunction
|
|||||||
|
|
||||||
let &cpo = s:keepcpo
|
let &cpo = s:keepcpo
|
||||||
unlet s:keepcpo
|
unlet s:keepcpo
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'objc') == -1
|
if has_key(g:polyglot_is_disabled, 'objc')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Vim indent file
|
" Vim indent file
|
||||||
" Language: Objective-C
|
" Language: Objective-C
|
||||||
@@ -93,5 +95,3 @@ endfunction
|
|||||||
" Restore 'cpo' options
|
" Restore 'cpo' options
|
||||||
let &cpo = s:save_cpo
|
let &cpo = s:save_cpo
|
||||||
unlet s:save_cpo
|
unlet s:save_cpo
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
46
after/indent/php.vim
Normal file
46
after/indent/php.vim
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
if has_key(g:polyglot_is_disabled, 'graphql')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
|
||||||
|
"
|
||||||
|
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
" of this software and associated documentation files (the "Software"), to
|
||||||
|
" deal in the Software without restriction, including without limitation the
|
||||||
|
" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
" sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
" furnished to do so, subject to the following conditions:
|
||||||
|
"
|
||||||
|
" The above copyright notice and this permission notice shall be included in
|
||||||
|
" all copies or substantial portions of the Software.
|
||||||
|
"
|
||||||
|
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
" 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.
|
||||||
|
"
|
||||||
|
" Language: GraphQL
|
||||||
|
" Maintainer: Jon Parise <jon@indelible.org>
|
||||||
|
|
||||||
|
if exists('*GetPHPGraphQLIndent') && !empty(&indentexpr)
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
runtime! indent/graphql.vim
|
||||||
|
|
||||||
|
" Set the indentexpr with our own version that will call GetGraphQLIndent when
|
||||||
|
" we're inside of a GraphQL string and otherwise defer to the base function.
|
||||||
|
let b:indentexpr_base = &indentexpr
|
||||||
|
setlocal indentexpr=GetPHPGraphQLIndent()
|
||||||
|
|
||||||
|
function GetPHPGraphQLIndent()
|
||||||
|
let l:stack = map(synstack(v:lnum, 1), "synIDattr(v:val, 'name')")
|
||||||
|
if get(l:stack, 0, '') ==# 'phpRegion' && count(l:stack, 'graphqlFold') > 0
|
||||||
|
return GetGraphQLIndent()
|
||||||
|
endif
|
||||||
|
|
||||||
|
return eval(b:indentexpr_base)
|
||||||
|
endfunction
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
if has_key(g:polyglot_is_disabled, 'jsx')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
" Vim indent file
|
" Vim indent file
|
||||||
@@ -36,5 +38,3 @@ endfunction
|
|||||||
|
|
||||||
let &cpo = s:keepcpo
|
let &cpo = s:keepcpo
|
||||||
unlet s:keepcpo
|
unlet s:keepcpo
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
if has_key(g:polyglot_is_disabled, 'graphql')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
|
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
|
||||||
"
|
"
|
||||||
@@ -36,11 +38,9 @@ setlocal indentexpr=GetTypescriptGraphQLIndent()
|
|||||||
|
|
||||||
function GetTypescriptGraphQLIndent()
|
function GetTypescriptGraphQLIndent()
|
||||||
let l:stack = map(synstack(v:lnum, 1), "synIDattr(v:val, 'name')")
|
let l:stack = map(synstack(v:lnum, 1), "synIDattr(v:val, 'name')")
|
||||||
if get(l:stack, 0) ==# 'graphqlTemplateString'
|
if get(l:stack, 0, '') ==# 'graphqlTemplateString'
|
||||||
return GetGraphQLIndent()
|
return GetGraphQLIndent()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
return eval(b:indentexpr_base)
|
return eval(b:indentexpr_base)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
if has_key(g:polyglot_is_disabled, 'jsx')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
source <sfile>:h/tsx.vim
|
source <sfile>:h/tsx.vim
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,16 +1,14 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cpp-modern') == -1
|
if has_key(g:polyglot_is_disabled, 'cpp-modern')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" ==============================================================================
|
" ==============================================================================
|
||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: C Additions
|
" Language: C Additions
|
||||||
" Original Author: Mikhail Wolfson <mywolfson@gmail.com>
|
" Original Author: Mikhail Wolfson <mywolfson@gmail.com>
|
||||||
" http://www.vim.org/scripts/script.php?script_id=3064
|
" Maintainer: bfrg <https://github.com/bfrg>
|
||||||
" Maintainer: bfrg <bfrg@users.noreply.github.com>
|
|
||||||
" Website: https://github.com/bfrg/vim-cpp-modern
|
" Website: https://github.com/bfrg/vim-cpp-modern
|
||||||
" Last Change: Oct 4, 2020
|
" Last Change: Nov 23, 2020
|
||||||
"
|
|
||||||
" Extended C syntax highlighting including highlighting of user-defined
|
|
||||||
" functions.
|
|
||||||
"
|
"
|
||||||
" This syntax file is based on:
|
" This syntax file is based on:
|
||||||
" https://github.com/octol/vim-cpp-enhanced-highlight
|
" https://github.com/octol/vim-cpp-enhanced-highlight
|
||||||
@@ -28,6 +26,22 @@ if !get(g:, 'cpp_no_function_highlight', 0)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
" Highlight struct/class member variables
|
||||||
|
if get(g:, 'cpp_member_highlight', 0)
|
||||||
|
syn match cMemberAccess "\.\|->" nextgroup=cStructMember,cppTemplateKeyword
|
||||||
|
syn match cStructMember "\<\h\w*\>\%((\|<\)\@!" contained
|
||||||
|
syn cluster cParenGroup add=cStructMember
|
||||||
|
syn cluster cPreProcGroup add=cStructMember
|
||||||
|
syn cluster cMultiGroup add=cStructMember
|
||||||
|
hi def link cStructMember Identifier
|
||||||
|
|
||||||
|
if &filetype ==# 'cpp'
|
||||||
|
syn keyword cppTemplateKeyword template
|
||||||
|
hi def link cppTemplateKeyword cppStructure
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
" Common ANSI-standard Names
|
" Common ANSI-standard Names
|
||||||
syn keyword cAnsiName
|
syn keyword cAnsiName
|
||||||
\ PRId8 PRIi16 PRIo32 PRIu64 PRId16 PRIi32 PRIo64 PRIuLEAST8 PRId32 PRIi64 PRIoLEAST8 PRIuLEAST16 PRId64 PRIiLEAST8 PRIoLEAST16 PRIuLEAST32 PRIdLEAST8 PRIiLEAST16 PRIoLEAST32 PRIuLEAST64 PRIdLEAST16 PRIiLEAST32 PRIoLEAST64 PRIuFAST8 PRIdLEAST32 PRIiLEAST64 PRIoFAST8 PRIuFAST16 PRIdLEAST64 PRIiFAST8 PRIoFAST16 PRIuFAST32 PRIdFAST8 PRIiFAST16 PRIoFAST32 PRIuFAST64 PRIdFAST16 PRIiFAST32 PRIoFAST64 PRIuMAX PRIdFAST32 PRIiFAST64 PRIoMAX PRIuPTR PRIdFAST64 PRIiMAX PRIoPTR PRIx8 PRIdMAX PRIiPTR PRIu8 PRIx16 PRIdPTR PRIo8 PRIu16 PRIx32 PRIi8 PRIo16 PRIu32 PRIx64 PRIxLEAST8 SCNd8 SCNiFAST32 SCNuLEAST32 PRIxLEAST16 SCNd16 SCNiFAST64 SCNuLEAST64 PRIxLEAST32 SCNd32 SCNiMAX SCNuFAST8 PRIxLEAST64 SCNd64 SCNiPTR SCNuFAST16 PRIxFAST8 SCNdLEAST8 SCNo8 SCNuFAST32 PRIxFAST16 SCNdLEAST16 SCNo16 SCNuFAST64 PRIxFAST32 SCNdLEAST32 SCNo32 SCNuMAX PRIxFAST64 SCNdLEAST64 SCNo64 SCNuPTR PRIxMAX SCNdFAST8 SCNoLEAST8 SCNx8 PRIxPTR SCNdFAST16 SCNoLEAST16 SCNx16 PRIX8 SCNdFAST32 SCNoLEAST32 SCNx32 PRIX16 SCNdFAST64 SCNoLEAST64 SCNx64 PRIX32 SCNdMAX SCNoFAST8 SCNxLEAST8 PRIX64 SCNdPTR SCNoFAST16 SCNxLEAST16 PRIXLEAST8 SCNi8 SCNoFAST32 SCNxLEAST32 PRIXLEAST16 SCNi16 SCNoFAST64 SCNxLEAST64 PRIXLEAST32 SCNi32 SCNoMAX SCNxFAST8 PRIXLEAST64 SCNi64 SCNoPTR SCNxFAST16 PRIXFAST8 SCNiLEAST8 SCNu8 SCNxFAST32 PRIXFAST16 SCNiLEAST16 SCNu16 SCNxFAST64 PRIXFAST32 SCNiLEAST32 SCNu32 SCNxMAX PRIXFAST64 SCNiLEAST64 SCNu64 SCNxPTR PRIXMAX SCNiFAST8 SCNuLEAST8 PRIXPTR SCNiFAST16 SCNuLEAST16 STDC CX_LIMITED_RANGE STDC FENV_ACCESS STDC FP_CONTRACT
|
\ PRId8 PRIi16 PRIo32 PRIu64 PRId16 PRIi32 PRIo64 PRIuLEAST8 PRId32 PRIi64 PRIoLEAST8 PRIuLEAST16 PRId64 PRIiLEAST8 PRIoLEAST16 PRIuLEAST32 PRIdLEAST8 PRIiLEAST16 PRIoLEAST32 PRIuLEAST64 PRIdLEAST16 PRIiLEAST32 PRIoLEAST64 PRIuFAST8 PRIdLEAST32 PRIiLEAST64 PRIoFAST8 PRIuFAST16 PRIdLEAST64 PRIiFAST8 PRIoFAST16 PRIuFAST32 PRIdFAST8 PRIiFAST16 PRIoFAST32 PRIuFAST64 PRIdFAST16 PRIiFAST32 PRIoFAST64 PRIuMAX PRIdFAST32 PRIiFAST64 PRIoMAX PRIuPTR PRIdFAST64 PRIiMAX PRIoPTR PRIx8 PRIdMAX PRIiPTR PRIu8 PRIx16 PRIdPTR PRIo8 PRIu16 PRIx32 PRIi8 PRIo16 PRIu32 PRIx64 PRIxLEAST8 SCNd8 SCNiFAST32 SCNuLEAST32 PRIxLEAST16 SCNd16 SCNiFAST64 SCNuLEAST64 PRIxLEAST32 SCNd32 SCNiMAX SCNuFAST8 PRIxLEAST64 SCNd64 SCNiPTR SCNuFAST16 PRIxFAST8 SCNdLEAST8 SCNo8 SCNuFAST32 PRIxFAST16 SCNdLEAST16 SCNo16 SCNuFAST64 PRIxFAST32 SCNdLEAST32 SCNo32 SCNuMAX PRIxFAST64 SCNdLEAST64 SCNo64 SCNuPTR PRIxMAX SCNdFAST8 SCNoLEAST8 SCNx8 PRIxPTR SCNdFAST16 SCNoLEAST16 SCNx16 PRIX8 SCNdFAST32 SCNoLEAST32 SCNx32 PRIX16 SCNdFAST64 SCNoLEAST64 SCNx64 PRIX32 SCNdMAX SCNoFAST8 SCNxLEAST8 PRIX64 SCNdPTR SCNoFAST16 SCNxLEAST16 PRIXLEAST8 SCNi8 SCNoFAST32 SCNxLEAST32 PRIXLEAST16 SCNi16 SCNoFAST64 SCNxLEAST64 PRIXLEAST32 SCNi32 SCNoMAX SCNxFAST8 PRIXLEAST64 SCNi64 SCNoPTR SCNxFAST16 PRIXFAST8 SCNiLEAST8 SCNu8 SCNxFAST32 PRIXFAST16 SCNiLEAST16 SCNu16 SCNxFAST64 PRIXFAST32 SCNiLEAST32 SCNu32 SCNxMAX PRIXFAST64 SCNiLEAST64 SCNu64 SCNxPTR PRIXMAX SCNiFAST8 SCNuLEAST8 PRIXPTR SCNiFAST16 SCNuLEAST16 STDC CX_LIMITED_RANGE STDC FENV_ACCESS STDC FP_CONTRACT
|
||||||
@@ -45,9 +59,8 @@ hi def link cAnsiName Identifier
|
|||||||
" Highlight all standard C keywords as Statement
|
" Highlight all standard C keywords as Statement
|
||||||
" This is very similar to what other IDEs and editors do
|
" This is very similar to what other IDEs and editors do
|
||||||
if get(g:, 'cpp_simple_highlight', 0)
|
if get(g:, 'cpp_simple_highlight', 0)
|
||||||
hi link cStorageClass Statement
|
hi! def link cStorageClass Statement
|
||||||
hi link cStructure Statement
|
hi! def link cStructure Statement
|
||||||
hi link cLabel Statement
|
hi! def link cTypedef Statement
|
||||||
endif
|
hi! def link cLabel Statement
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cjsx') == -1
|
if has_key(g:polyglot_is_disabled, 'cjsx')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
if exists('b:current_syntax')
|
if exists('b:current_syntax')
|
||||||
let s:current_syntax=b:current_syntax
|
let s:current_syntax=b:current_syntax
|
||||||
@@ -27,5 +29,3 @@ hi def link cjsxTagName Function
|
|||||||
hi def link cjsxEntity Statement
|
hi def link cjsxEntity Statement
|
||||||
hi def link cjsxEntityPunct Type
|
hi def link cjsxEntityPunct Type
|
||||||
hi def link cjsxAttribProperty Type
|
hi def link cjsxAttribProperty Type
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cpp-modern') == -1
|
if has_key(g:polyglot_is_disabled, 'cpp-modern')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" ==============================================================================
|
" ==============================================================================
|
||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
@@ -6,7 +8,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cpp-modern') ==
|
|||||||
" Original Author: Jon Haggblad <https://github.com/octol>
|
" Original Author: Jon Haggblad <https://github.com/octol>
|
||||||
" Maintainer: bfrg <https://github.com/bfrg>
|
" Maintainer: bfrg <https://github.com/bfrg>
|
||||||
" Website: https://github.com/bfrg/vim-cpp-modern
|
" Website: https://github.com/bfrg/vim-cpp-modern
|
||||||
" Last Change: Oct 8, 2020
|
" Last Change: Nov 23, 2020
|
||||||
"
|
"
|
||||||
" This syntax file is based on:
|
" This syntax file is based on:
|
||||||
" https://github.com/octol/vim-cpp-enhanced-highlight
|
" https://github.com/octol/vim-cpp-enhanced-highlight
|
||||||
@@ -199,14 +201,12 @@ hi def link cppSTLvariable Identifier
|
|||||||
|
|
||||||
" The keywords {inline, virtual, explicit, export, override, final} are
|
" The keywords {inline, virtual, explicit, export, override, final} are
|
||||||
" standard C++ keywords and NOT types!
|
" standard C++ keywords and NOT types!
|
||||||
hi link cppModifier Statement
|
hi! def link cppModifier Statement
|
||||||
|
|
||||||
|
|
||||||
" Highlight all standard C++ keywords as Statement
|
" Highlight all standard C++ keywords as Statement
|
||||||
if get(g:, 'cpp_simple_highlight', 0)
|
if get(g:, 'cpp_simple_highlight', 0)
|
||||||
hi link cppStructure Statement
|
hi! def link cppStructure Statement
|
||||||
hi link cppExceptions Statement
|
hi! def link cppExceptions Statement
|
||||||
hi link cppStorageClass Statement
|
hi! def link cppStorageClass Statement
|
||||||
endif
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dhall') == -1
|
if has_key(g:polyglot_is_disabled, 'dhall')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" store and remove current syntax value
|
" store and remove current syntax value
|
||||||
let old_syntax = b:current_syntax
|
let old_syntax = b:current_syntax
|
||||||
@@ -13,5 +15,3 @@ hi def link quasiQuote Underlined
|
|||||||
|
|
||||||
" restore current syntax value
|
" restore current syntax value
|
||||||
let b:current_syntax = old_syntax
|
let b:current_syntax = old_syntax
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scala') == -1
|
if has_key(g:polyglot_is_disabled, 'scala')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Extends standard help syntax with highlighting of Scala code.
|
" Extends standard help syntax with highlighting of Scala code.
|
||||||
"
|
"
|
||||||
@@ -14,5 +16,3 @@ if has('conceal')
|
|||||||
else
|
else
|
||||||
syntax region rgnScala matchgroup=Ignore start='!sc!' end='!/sc!' contains=@ScalaCode
|
syntax region rgnScala matchgroup=Ignore start='!sc!' end='!/sc!' contains=@ScalaCode
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
|
if has_key(g:polyglot_is_disabled, 'html5')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: HTML (version 5.1)
|
" Language: HTML (version 5.1)
|
||||||
@@ -196,5 +198,3 @@ syn keyword htmlArg contained veryverythickmathspace veryverythinmathspace voffs
|
|||||||
" https://github.com/w3c/html/issues/694
|
" https://github.com/w3c/html/issues/694
|
||||||
syntax region htmlComment start=+<!--+ end=+-->+ contains=@Spell
|
syntax region htmlComment start=+<!--+ end=+-->+ contains=@Spell
|
||||||
syntax region htmlComment start=+<!DOCTYPE+ keepend end=+>+
|
syntax region htmlComment start=+<!DOCTYPE+ keepend end=+>+
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
|
if has_key(g:polyglot_is_disabled, 'html5')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: WAI-ARIA
|
" Language: WAI-ARIA
|
||||||
@@ -75,5 +77,3 @@ syn match htmlArg contained "\<aria-\%(\|labelledby\|owns\|posinset\|setsize\
|
|||||||
syn match htmlArg contained "\<aria-\%(\|colcount\|colindex\|colspan\)\>"
|
syn match htmlArg contained "\<aria-\%(\|colcount\|colindex\|colspan\)\>"
|
||||||
syn match htmlArg contained "\<aria-\%(\|rowcount\|rowindex\|rowspan\)\>"
|
syn match htmlArg contained "\<aria-\%(\|rowcount\|rowindex\|rowspan\)\>"
|
||||||
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
|
if has_key(g:polyglot_is_disabled, 'html5')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: Electron
|
" Language: Electron
|
||||||
@@ -15,5 +17,3 @@ syn keyword htmlArg contained useragent disablewebsecurity partition allowpopups
|
|||||||
syn keyword htmlArg contained webpreferences blinkfeatures disableblinkfeatures
|
syn keyword htmlArg contained webpreferences blinkfeatures disableblinkfeatures
|
||||||
syn keyword htmlArg contained guestinstance disableguestresize
|
syn keyword htmlArg contained guestinstance disableguestresize
|
||||||
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
|
if has_key(g:polyglot_is_disabled, 'html5')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: RDFa
|
" Language: RDFa
|
||||||
@@ -11,5 +13,3 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
|
|||||||
" RDFa
|
" RDFa
|
||||||
" http://www.w3.org/TR/rdfa-syntax/#s_syntax
|
" http://www.w3.org/TR/rdfa-syntax/#s_syntax
|
||||||
syn keyword htmlArg contained about content datatype href inlist prefix property rel resource rev src typeof vocab
|
syn keyword htmlArg contained about content datatype href inlist prefix property rel resource rev src typeof vocab
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris') == -1
|
if has_key(g:polyglot_is_disabled, 'idris')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" This script allows for unicode concealing of certain characters
|
" This script allows for unicode concealing of certain characters
|
||||||
" For instance -> goes to →
|
" For instance -> goes to →
|
||||||
@@ -78,5 +80,3 @@ hi link idrNiceOperator Operator
|
|||||||
hi! link Conceal Operator
|
hi! link Conceal Operator
|
||||||
setlocal conceallevel=2
|
setlocal conceallevel=2
|
||||||
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris2') == -1
|
if has_key(g:polyglot_is_disabled, 'idris2')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" This script allows for unicode concealing of certain characters
|
" This script allows for unicode concealing of certain characters
|
||||||
" For instance -> goes to →
|
" For instance -> goes to →
|
||||||
@@ -78,5 +80,3 @@ hi link idrNiceOperator Operator
|
|||||||
hi! link Conceal Operator
|
hi! link Conceal Operator
|
||||||
setlocal conceallevel=2
|
setlocal conceallevel=2
|
||||||
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
if has_key(g:polyglot_is_disabled, 'jsx')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
if get(g:, 'vim_jsx_pretty_disable_js', 0)
|
if get(g:, 'vim_jsx_pretty_disable_js', 0)
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
source <sfile>:h/jsx.vim
|
source <sfile>:h/jsx.vim
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
if has_key(g:polyglot_is_disabled, 'graphql')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
|
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
|
||||||
"
|
"
|
||||||
@@ -27,7 +29,11 @@ if exists('b:current_syntax')
|
|||||||
let s:current_syntax = b:current_syntax
|
let s:current_syntax = b:current_syntax
|
||||||
unlet b:current_syntax
|
unlet b:current_syntax
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
let b:graphql_nested_syntax = 1
|
||||||
syn include @GraphQLSyntax syntax/graphql.vim
|
syn include @GraphQLSyntax syntax/graphql.vim
|
||||||
|
unlet b:graphql_nested_syntax
|
||||||
|
|
||||||
if exists('s:current_syntax')
|
if exists('s:current_syntax')
|
||||||
let b:current_syntax = s:current_syntax
|
let b:current_syntax = s:current_syntax
|
||||||
endif
|
endif
|
||||||
@@ -40,11 +46,13 @@ if graphql#has_syntax_group('jsTemplateExpression')
|
|||||||
exec 'syntax match graphqlTaggedTemplate +' . s:tags . '\ze`+ nextgroup=graphqlTemplateString'
|
exec 'syntax match graphqlTaggedTemplate +' . s:tags . '\ze`+ nextgroup=graphqlTemplateString'
|
||||||
syntax region graphqlTemplateExpression start=+${+ end=+}+ contained contains=jsTemplateExpression containedin=graphqlFold keepend
|
syntax region graphqlTemplateExpression start=+${+ end=+}+ contained contains=jsTemplateExpression containedin=graphqlFold keepend
|
||||||
|
|
||||||
|
syntax region graphqlTemplateString matchgroup=jsTemplateString start=+`#\s\{,4\}gql\>\s*$+ skip=+\\\\\|\\`+ end=+`+ contains=@GraphQLSyntax,jsTemplateExpression,jsSpecial extend
|
||||||
|
|
||||||
hi def link graphqlTemplateString jsTemplateString
|
hi def link graphqlTemplateString jsTemplateString
|
||||||
hi def link graphqlTaggedTemplate jsTaggedTemplate
|
hi def link graphqlTaggedTemplate jsTaggedTemplate
|
||||||
hi def link graphqlTemplateExpression jsTemplateExpression
|
hi def link graphqlTemplateExpression jsTemplateExpression
|
||||||
|
|
||||||
syn cluster jsExpression add=graphqlTaggedTemplate
|
syn cluster jsExpression add=graphqlTemplateString,graphqlTaggedTemplate
|
||||||
syn cluster graphqlTaggedTemplate add=graphqlTemplateString
|
syn cluster graphqlTaggedTemplate add=graphqlTemplateString
|
||||||
elseif graphql#has_syntax_group('javaScriptStringT')
|
elseif graphql#has_syntax_group('javaScriptStringT')
|
||||||
" runtime/syntax/javascript.vim
|
" runtime/syntax/javascript.vim
|
||||||
@@ -52,6 +60,8 @@ elseif graphql#has_syntax_group('javaScriptStringT')
|
|||||||
exec 'syntax match graphqlTaggedTemplate +' . s:tags . '\ze`+ nextgroup=graphqlTemplateString'
|
exec 'syntax match graphqlTaggedTemplate +' . s:tags . '\ze`+ nextgroup=graphqlTemplateString'
|
||||||
syntax region graphqlTemplateExpression start=+${+ end=+}+ contained contains=@javaScriptEmbededExpr containedin=graphqlFold keepend
|
syntax region graphqlTemplateExpression start=+${+ end=+}+ contained contains=@javaScriptEmbededExpr containedin=graphqlFold keepend
|
||||||
|
|
||||||
|
syntax region graphqlTemplateString matchgroup=javaScriptStringT start=+`#\s\{,4\}gql\>\s*$+ skip=+\\\\\|\\`+ end=+`+ contains=@GraphQLSyntax,javaScriptSpecial,javaScriptEmbed,@htmlPreproc extend
|
||||||
|
|
||||||
hi def link graphqlTemplateString javaScriptStringT
|
hi def link graphqlTemplateString javaScriptStringT
|
||||||
hi def link graphqlTaggedTemplate javaScriptEmbed
|
hi def link graphqlTaggedTemplate javaScriptEmbed
|
||||||
hi def link graphqlTemplateExpression javaScriptEmbed
|
hi def link graphqlTemplateExpression javaScriptEmbed
|
||||||
@@ -60,5 +70,3 @@ elseif graphql#has_syntax_group('javaScriptStringT')
|
|||||||
syn cluster javaScriptEmbededExpr add=graphqlTaggedTemplate
|
syn cluster javaScriptEmbededExpr add=graphqlTaggedTemplate
|
||||||
syn cluster graphqlTaggedTemplate add=graphqlTemplateString
|
syn cluster graphqlTaggedTemplate add=graphqlTemplateString
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
|
if has_key(g:polyglot_is_disabled, 'html5')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: HTML5 New Stuff
|
" Language: HTML5 New Stuff
|
||||||
@@ -49,5 +51,3 @@ syn keyword javascriptDomElemAttrs indeterminate
|
|||||||
|
|
||||||
" select https://w3c.github.io/selection-api/#extensions-to-globaleventhandlers
|
" select https://w3c.github.io/selection-api/#extensions-to-globaleventhandlers
|
||||||
syn keyword javascriptDomElemAttrs onselectstart onselectchange
|
syn keyword javascriptDomElemAttrs onselectstart onselectchange
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript-sql') == -1
|
if has_key(g:polyglot_is_disabled, 'javascript-sql')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Vim plugin
|
" Vim plugin
|
||||||
" Language: JavaScript
|
" Language: JavaScript
|
||||||
@@ -22,5 +24,3 @@ hi def link sqlTaggedTemplate jsTaggedTemplate
|
|||||||
|
|
||||||
syn cluster jsExpression add=sqlTaggedTemplate
|
syn cluster jsExpression add=sqlTaggedTemplate
|
||||||
syn cluster sqlTaggedTemplate add=sqlTemplateString
|
syn cluster sqlTaggedTemplate add=sqlTemplateString
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
if has_key(g:polyglot_is_disabled, 'jsx')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
source <sfile>:h/jsx.vim
|
source <sfile>:h/jsx.vim
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
if has_key(g:polyglot_is_disabled, 'graphql')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
runtime! after/syntax/javascript/graphql.vim
|
runtime! after/syntax/javascript/graphql.vim
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
if has_key(g:polyglot_is_disabled, 'jsx')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
@@ -55,5 +57,3 @@ let b:current_syntax = 'javascript.jsx'
|
|||||||
|
|
||||||
let &cpo = s:jsx_cpo
|
let &cpo = s:jsx_cpo
|
||||||
unlet s:jsx_cpo
|
unlet s:jsx_cpo
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
if has_key(g:polyglot_is_disabled, 'jsx')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
let s:highlight_close_tag = get(g:, 'vim_jsx_pretty_highlight_close_tag', 0)
|
let s:highlight_close_tag = get(g:, 'vim_jsx_pretty_highlight_close_tag', 0)
|
||||||
|
|
||||||
@@ -138,7 +140,7 @@ exe 'syntax match jsxTagName
|
|||||||
" and
|
" and
|
||||||
" <tag id='sample'>
|
" <tag id='sample'>
|
||||||
" ~~~~~~~~
|
" ~~~~~~~~
|
||||||
syntax region jsxString start=+\z(["']\)+ skip=+\\\\\|\\\z1\|\\\n+ end=+\z1+ contained contains=@Spell
|
syntax region jsxString start=+\z(["']\)+ skip=+\\\\\|\\\z1\|\\\n+ end=+\z1+ extend contained contains=@Spell
|
||||||
|
|
||||||
let s:tags = get(g:, 'vim_jsx_pretty_template_tags', ['html', 'jsx'])
|
let s:tags = get(g:, 'vim_jsx_pretty_template_tags', ['html', 'jsx'])
|
||||||
let s:enable_tagged_jsx = !empty(s:tags)
|
let s:enable_tagged_jsx = !empty(s:tags)
|
||||||
@@ -221,5 +223,3 @@ if s:vim_jsx_pretty_colorful_config == 1
|
|||||||
highlight def link jsArrowFuncArgs Type
|
highlight def link jsArrowFuncArgs Type
|
||||||
highlight def link jsFuncArgs Type
|
highlight def link jsFuncArgs Type
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1
|
if has_key(g:polyglot_is_disabled, 'llvm')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Copyright (c) 2018 rhysd
|
" Copyright (c) 2018 rhysd
|
||||||
"
|
"
|
||||||
@@ -22,5 +24,3 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1
|
|||||||
|
|
||||||
syn keyword llvmKeyword attributes
|
syn keyword llvmKeyword attributes
|
||||||
syn match llvmNoName /#\d\+\>/
|
syn match llvmNoName /#\d\+\>/
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mdx') == -1
|
if has_key(g:polyglot_is_disabled, 'mdx')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
" based on mxw/vim-jsx
|
" based on mxw/vim-jsx
|
||||||
@@ -41,5 +43,3 @@ syn cluster jsExpression add=jsxRegion
|
|||||||
|
|
||||||
" Allow jsxRegion to contain reserved words.
|
" Allow jsxRegion to contain reserved words.
|
||||||
syn cluster javascriptNoReserved add=jsxRegion
|
syn cluster javascriptNoReserved add=jsxRegion
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mathematica') == -1
|
if has_key(g:polyglot_is_disabled, 'mathematica')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
"Vim conceal file
|
"Vim conceal file
|
||||||
" Language: Mathematica
|
" Language: Mathematica
|
||||||
@@ -1442,5 +1444,3 @@ endif
|
|||||||
hi! link Conceal Normal
|
hi! link Conceal Normal
|
||||||
setlocal conceallevel=2
|
setlocal conceallevel=2
|
||||||
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'objc') == -1
|
if has_key(g:polyglot_is_disabled, 'objc')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" ARC type modifiers
|
" ARC type modifiers
|
||||||
syn keyword objcTypeModifier __bridge __bridge_retained __bridge_transfer __autoreleasing __strong __weak __unsafe_unretained
|
syn keyword objcTypeModifier __bridge __bridge_retained __bridge_transfer __autoreleasing __strong __weak __unsafe_unretained
|
||||||
@@ -19,5 +21,3 @@ syn match objcDirective "@property\|@synthesize\|@dynamic\|@package"
|
|||||||
|
|
||||||
" Highlight property attributes as if they were type modifiers
|
" Highlight property attributes as if they were type modifiers
|
||||||
hi def link objcPropertyAttribute objcTypeModifier
|
hi def link objcPropertyAttribute objcTypeModifier
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
42
after/syntax/php/graphql.vim
Normal file
42
after/syntax/php/graphql.vim
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
if has_key(g:polyglot_is_disabled, 'graphql')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
|
||||||
|
"
|
||||||
|
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
" of this software and associated documentation files (the "Software"), to
|
||||||
|
" deal in the Software without restriction, including without limitation the
|
||||||
|
" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
" sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
" furnished to do so, subject to the following conditions:
|
||||||
|
"
|
||||||
|
" The above copyright notice and this permission notice shall be included in
|
||||||
|
" all copies or substantial portions of the Software.
|
||||||
|
"
|
||||||
|
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
" 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.
|
||||||
|
"
|
||||||
|
" Language: GraphQL
|
||||||
|
" Maintainer: Jon Parise <jon@indelible.org>
|
||||||
|
|
||||||
|
if exists('b:current_syntax')
|
||||||
|
let s:current_syntax = b:current_syntax
|
||||||
|
unlet b:current_syntax
|
||||||
|
endif
|
||||||
|
|
||||||
|
let b:graphql_nested_syntax = 1
|
||||||
|
syn include @GraphQLSyntax syntax/graphql.vim
|
||||||
|
unlet b:graphql_nested_syntax
|
||||||
|
|
||||||
|
if exists('s:current_syntax')
|
||||||
|
let b:current_syntax = s:current_syntax
|
||||||
|
endif
|
||||||
|
|
||||||
|
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(gql\)\c\(\i*\)\)\2$" end="^\s*\z1\>" contained contains=@GraphQLSyntax,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend
|
||||||
|
syntax region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(gql\)\c\(\i*\)\)'$" end="^\s*\z1\>" contained contains=@GraphQLSyntax,@Spell keepend extend
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'reason') == -1
|
if has_key(g:polyglot_is_disabled, 'reason')
|
||||||
|
finish
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
if has_key(g:polyglot_is_disabled, 'graphql')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
|
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
|
||||||
"
|
"
|
||||||
@@ -27,11 +29,13 @@ if exists('b:current_syntax')
|
|||||||
let s:current_syntax = b:current_syntax
|
let s:current_syntax = b:current_syntax
|
||||||
unlet b:current_syntax
|
unlet b:current_syntax
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
let b:graphql_nested_syntax = 1
|
||||||
syn include @GraphQLSyntax syntax/graphql.vim
|
syn include @GraphQLSyntax syntax/graphql.vim
|
||||||
|
unlet b:graphql_nested_syntax
|
||||||
|
|
||||||
if exists('s:current_syntax')
|
if exists('s:current_syntax')
|
||||||
let b:current_syntax = s:current_syntax
|
let b:current_syntax = s:current_syntax
|
||||||
endif
|
endif
|
||||||
|
|
||||||
syntax region graphqlExtensionPoint matchgroup=Noise start=+\[%graphql\_s*{|+lc=10 end=+|}\_s*]+he=s+1 contains=@GraphQLSyntax keepend
|
syntax region graphqlExtensionPoint matchgroup=Noise start=+\[%graphql\_s*{|+lc=10 end=+|}\_s*]+he=s+1 contains=@GraphQLSyntax keepend
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rspec') == -1
|
if has_key(g:polyglot_is_disabled, 'rspec')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
"
|
"
|
||||||
" An rspec syntax file
|
" An rspec syntax file
|
||||||
@@ -189,5 +191,3 @@ highlight link rspecMatchers Function
|
|||||||
highlight link rspecMessageExpectation Function
|
highlight link rspecMessageExpectation Function
|
||||||
|
|
||||||
let b:current_syntax = 'rspec'
|
let b:current_syntax = 'rspec'
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'yard') == -1
|
if has_key(g:polyglot_is_disabled, 'yard')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Ruby syntax extensions for highlighting YARD documentation.
|
" Ruby syntax extensions for highlighting YARD documentation.
|
||||||
"
|
"
|
||||||
@@ -127,5 +129,3 @@ hi def link yardParametricType yardComment
|
|||||||
hi def link yardArrow yardComment
|
hi def link yardArrow yardComment
|
||||||
hi def link yardHashAngle yardComment
|
hi def link yardHashAngle yardComment
|
||||||
hi def link yardHashCurly yardComment
|
hi def link yardHashCurly yardComment
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1
|
if has_key(g:polyglot_is_disabled, 'rust')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
scriptencoding utf-8
|
scriptencoding utf-8
|
||||||
|
|
||||||
@@ -41,5 +43,3 @@ if !get(g:, 'rust_conceal_mod_path', 0)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" vim: set et sw=4 sts=4 ts=8:
|
" vim: set et sw=4 sts=4 ts=8:
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
if has_key(g:polyglot_is_disabled, 'jsx')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
@@ -59,5 +61,3 @@ let b:current_syntax = 'typescript.tsx'
|
|||||||
|
|
||||||
let &cpo = s:jsx_cpo
|
let &cpo = s:jsx_cpo
|
||||||
unlet s:jsx_cpo
|
unlet s:jsx_cpo
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
if has_key(g:polyglot_is_disabled, 'graphql')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
|
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
|
||||||
"
|
"
|
||||||
@@ -27,7 +29,11 @@ if exists('b:current_syntax')
|
|||||||
let s:current_syntax = b:current_syntax
|
let s:current_syntax = b:current_syntax
|
||||||
unlet b:current_syntax
|
unlet b:current_syntax
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
let b:graphql_nested_syntax = 1
|
||||||
syn include @GraphQLSyntax syntax/graphql.vim
|
syn include @GraphQLSyntax syntax/graphql.vim
|
||||||
|
unlet b:graphql_nested_syntax
|
||||||
|
|
||||||
if exists('s:current_syntax')
|
if exists('s:current_syntax')
|
||||||
let b:current_syntax = s:current_syntax
|
let b:current_syntax = s:current_syntax
|
||||||
endif
|
endif
|
||||||
@@ -45,5 +51,3 @@ hi def link graphqlTemplateExpression typescriptTemplateSubstitution
|
|||||||
|
|
||||||
syn cluster typescriptExpression add=graphqlTaggedTemplate
|
syn cluster typescriptExpression add=graphqlTaggedTemplate
|
||||||
syn cluster graphqlTaggedTemplate add=graphqlTemplateString
|
syn cluster graphqlTaggedTemplate add=graphqlTemplateString
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
if has_key(g:polyglot_is_disabled, 'jsx')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
source <sfile>:h/tsx.vim
|
source <sfile>:h/tsx.vim
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
if has_key(g:polyglot_is_disabled, 'graphql')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
runtime! after/syntax/typescript/graphql.vim
|
runtime! after/syntax/typescript/graphql.vim
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
if has_key(g:polyglot_is_disabled, 'graphql')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
runtime! after/syntax/javascript/graphql.vim
|
runtime! after/syntax/javascript/graphql.vim
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zinit') == -1
|
if has_key(g:polyglot_is_disabled, 'zinit')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Copyright (c) 2019 Sebastian Gniazdowski
|
" Copyright (c) 2019 Sebastian Gniazdowski
|
||||||
"
|
"
|
||||||
@@ -122,5 +124,3 @@ highlight def link ZinitSnippetUrl2 Macro
|
|||||||
highlight def link ZinitSnippetUrl3 Macro
|
highlight def link ZinitSnippetUrl3 Macro
|
||||||
highlight def link ZinitSnippetUrl4 Macro
|
highlight def link ZinitSnippetUrl4 Macro
|
||||||
highlight def link ZinitTrailingWhiteSpace Error
|
highlight def link ZinitTrailingWhiteSpace Error
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1
|
if has_key(g:polyglot_is_disabled, 'julia')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
" Support for LaTex-to-Unicode conversion as in the Julia REPL "
|
" Support for LaTex-to-Unicode conversion as in the Julia REPL "
|
||||||
@@ -652,5 +654,3 @@ function! LaTeXtoUnicode#Toggle()
|
|||||||
endif
|
endif
|
||||||
return ''
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rst') == -1
|
if has_key(g:polyglot_is_disabled, 'rst')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Author: Antony Lee <anntzer.lee@gmail.com>
|
" Author: Antony Lee <anntzer.lee@gmail.com>
|
||||||
" Description: Helper functions for reStructuredText syntax folding
|
" Description: Helper functions for reStructuredText syntax folding
|
||||||
@@ -62,5 +64,3 @@ function RstFold#GetRstFoldText()
|
|||||||
let text = thisline =~ '^\([=`:.''"~^_*+#-]\)\1\+$' ? getline(v:foldstart + 1) : thisline
|
let text = thisline =~ '^\([=`:.''"~^_*+#-]\)\1\+$' ? getline(v:foldstart + 1) : thisline
|
||||||
return indent . text
|
return indent . text
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ada') == -1
|
if has_key(g:polyglot_is_disabled, 'ada')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
"------------------------------------------------------------------------------
|
"------------------------------------------------------------------------------
|
||||||
" Description: Perform Ada specific completion & tagging.
|
" Description: Perform Ada specific completion & tagging.
|
||||||
@@ -637,5 +639,3 @@ finish " 1}}}
|
|||||||
"------------------------------------------------------------------------------
|
"------------------------------------------------------------------------------
|
||||||
" vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
|
" vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
|
||||||
" vim: foldmethod=marker
|
" vim: foldmethod=marker
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1
|
if has_key(g:polyglot_is_disabled, 'rust')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
function! cargo#Load()
|
function! cargo#Load()
|
||||||
" Utility call to get this script loaded, for debugging
|
" Utility call to get this script loaded, for debugging
|
||||||
@@ -147,5 +149,3 @@ function! cargo#runtarget(args)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" vim: set et sw=4 sts=4 ts=8:
|
" vim: set et sw=4 sts=4 ts=8:
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1
|
if has_key(g:polyglot_is_disabled, 'rust')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
function! cargo#quickfix#CmdPre() abort
|
function! cargo#quickfix#CmdPre() abort
|
||||||
if &filetype ==# 'rust' && get(b:, 'current_compiler', '') ==# 'cargo' &&
|
if &filetype ==# 'rust' && get(b:, 'current_compiler', '') ==# 'cargo' &&
|
||||||
@@ -27,5 +29,3 @@ function! cargo#quickfix#CmdPost() abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" vim: set et sw=4 sts=4 ts=8:
|
" vim: set et sw=4 sts=4 ts=8:
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'clojure') == -1
|
if has_key(g:polyglot_is_disabled, 'clojure')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Vim completion script
|
" Vim completion script
|
||||||
" Language: Clojure
|
" Language: Clojure
|
||||||
@@ -22,5 +24,3 @@ function! clojurecomplete#Complete(findstart, base)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" vim:sts=8:sw=8:ts=8:noet
|
" vim:sts=8:sw=8:ts=8:noet
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1
|
if has_key(g:polyglot_is_disabled, 'coffee-script')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Language: CoffeeScript
|
" Language: CoffeeScript
|
||||||
" Maintainer: Mick Koch <mick@kochm.co>
|
" Maintainer: Mick Koch <mick@kochm.co>
|
||||||
@@ -54,5 +56,3 @@ function! coffee#CoffeeSetUpErrorFormat()
|
|||||||
\%f:%l:%c:\ error:\ %m,
|
\%f:%l:%c:\ error:\ %m,
|
||||||
\%-G%.%#
|
\%-G%.%#
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,188 +0,0 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'context') == -1
|
|
||||||
|
|
||||||
" Language: ConTeXt typesetting engine
|
|
||||||
" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
|
|
||||||
" Latest Revision: 2016 Oct 21
|
|
||||||
|
|
||||||
let s:keepcpo= &cpo
|
|
||||||
set cpo&vim
|
|
||||||
|
|
||||||
" Helper functions {{{
|
|
||||||
function! s:context_echo(message, mode)
|
|
||||||
redraw
|
|
||||||
echo "\r"
|
|
||||||
execute 'echohl' a:mode
|
|
||||||
echomsg '[ConTeXt]' a:message
|
|
||||||
echohl None
|
|
||||||
endf
|
|
||||||
|
|
||||||
function! s:sh()
|
|
||||||
return has('win32') || has('win64') || has('win16') || has('win95')
|
|
||||||
\ ? ['cmd.exe', '/C']
|
|
||||||
\ : ['/bin/sh', '-c']
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" For backward compatibility
|
|
||||||
if exists('*win_getid')
|
|
||||||
|
|
||||||
function! s:win_getid()
|
|
||||||
return win_getid()
|
|
||||||
endf
|
|
||||||
|
|
||||||
function! s:win_id2win(winid)
|
|
||||||
return win_id2win(a:winid)
|
|
||||||
endf
|
|
||||||
|
|
||||||
else
|
|
||||||
|
|
||||||
function! s:win_getid()
|
|
||||||
return winnr()
|
|
||||||
endf
|
|
||||||
|
|
||||||
function! s:win_id2win(winnr)
|
|
||||||
return a:winnr
|
|
||||||
endf
|
|
||||||
|
|
||||||
endif
|
|
||||||
" }}}
|
|
||||||
|
|
||||||
" ConTeXt jobs {{{
|
|
||||||
if has('job')
|
|
||||||
|
|
||||||
let g:context_jobs = []
|
|
||||||
|
|
||||||
" Print the status of ConTeXt jobs
|
|
||||||
function! context#job_status()
|
|
||||||
let l:jobs = filter(g:context_jobs, 'job_status(v:val) == "run"')
|
|
||||||
let l:n = len(l:jobs)
|
|
||||||
call s:context_echo(
|
|
||||||
\ 'There '.(l:n == 1 ? 'is' : 'are').' '.(l:n == 0 ? 'no' : l:n)
|
|
||||||
\ .' job'.(l:n == 1 ? '' : 's').' running'
|
|
||||||
\ .(l:n == 0 ? '.' : ' (' . join(l:jobs, ', ').').'),
|
|
||||||
\ 'ModeMsg')
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Stop all ConTeXt jobs
|
|
||||||
function! context#stop_jobs()
|
|
||||||
let l:jobs = filter(g:context_jobs, 'job_status(v:val) == "run"')
|
|
||||||
for job in l:jobs
|
|
||||||
call job_stop(job)
|
|
||||||
endfor
|
|
||||||
sleep 1
|
|
||||||
let l:tmp = []
|
|
||||||
for job in l:jobs
|
|
||||||
if job_status(job) == "run"
|
|
||||||
call add(l:tmp, job)
|
|
||||||
endif
|
|
||||||
endfor
|
|
||||||
let g:context_jobs = l:tmp
|
|
||||||
if empty(g:context_jobs)
|
|
||||||
call s:context_echo('Done. No jobs running.', 'ModeMsg')
|
|
||||||
else
|
|
||||||
call s:context_echo('There are still some jobs running. Please try again.', 'WarningMsg')
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! context#callback(path, job, status)
|
|
||||||
if index(g:context_jobs, a:job) != -1 && job_status(a:job) != 'run' " just in case
|
|
||||||
call remove(g:context_jobs, index(g:context_jobs, a:job))
|
|
||||||
endif
|
|
||||||
call s:callback(a:path, a:job, a:status)
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! context#close_cb(channel)
|
|
||||||
call job_status(ch_getjob(a:channel)) " Trigger exit_cb's callback for faster feedback
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:typeset(path)
|
|
||||||
call add(g:context_jobs,
|
|
||||||
\ job_start(add(s:sh(), context#command() . ' ' . shellescape(fnamemodify(a:path, ":t"))), {
|
|
||||||
\ 'close_cb' : 'context#close_cb',
|
|
||||||
\ 'exit_cb' : function(get(b:, 'context_callback', get(g:, 'context_callback', 'context#callback')),
|
|
||||||
\ [a:path]),
|
|
||||||
\ 'in_io' : 'null'
|
|
||||||
\ }))
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
else " No jobs
|
|
||||||
|
|
||||||
function! context#job_status()
|
|
||||||
call s:context_echo('Not implemented', 'WarningMsg')
|
|
||||||
endfunction!
|
|
||||||
|
|
||||||
function! context#stop_jobs()
|
|
||||||
call s:context_echo('Not implemented', 'WarningMsg')
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! context#callback(path, job, status)
|
|
||||||
call s:callback(a:path, a:job, a:status)
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:typeset(path)
|
|
||||||
execute '!' . context#command() . ' ' . shellescape(fnamemodify(a:path, ":t"))
|
|
||||||
call call(get(b:, 'context_callback', get(g:, 'context_callback', 'context#callback')),
|
|
||||||
\ [a:path, 0, v:shell_error])
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
endif " has('job')
|
|
||||||
|
|
||||||
function! s:callback(path, job, status) abort
|
|
||||||
if a:status < 0 " Assume the job was terminated
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
" Get info about the current window
|
|
||||||
let l:winid = s:win_getid() " Save window id
|
|
||||||
let l:efm = &l:errorformat " Save local errorformat
|
|
||||||
let l:cwd = fnamemodify(getcwd(), ":p") " Save local working directory
|
|
||||||
" Set errorformat to parse ConTeXt errors
|
|
||||||
execute 'setl efm=' . escape(b:context_errorformat, ' ')
|
|
||||||
try " Set cwd to expand error file correctly
|
|
||||||
execute 'lcd' fnameescape(fnamemodify(a:path, ':h'))
|
|
||||||
catch /.*/
|
|
||||||
execute 'setl efm=' . escape(l:efm, ' ')
|
|
||||||
throw v:exception
|
|
||||||
endtry
|
|
||||||
try
|
|
||||||
execute 'cgetfile' fnameescape(fnamemodify(a:path, ':r') . '.log')
|
|
||||||
botright cwindow
|
|
||||||
finally " Restore cwd and errorformat
|
|
||||||
execute s:win_id2win(l:winid) . 'wincmd w'
|
|
||||||
execute 'lcd ' . fnameescape(l:cwd)
|
|
||||||
execute 'setl efm=' . escape(l:efm, ' ')
|
|
||||||
endtry
|
|
||||||
if a:status == 0
|
|
||||||
call s:context_echo('Success!', 'ModeMsg')
|
|
||||||
else
|
|
||||||
call s:context_echo('There are errors. ', 'ErrorMsg')
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! context#command()
|
|
||||||
return get(b:, 'context_mtxrun', get(g:, 'context_mtxrun', 'mtxrun'))
|
|
||||||
\ . ' --script context --autogenerate --nonstopmode'
|
|
||||||
\ . ' --synctex=' . (get(b:, 'context_synctex', get(g:, 'context_synctex', 0)) ? '1' : '0')
|
|
||||||
\ . ' ' . get(b:, 'context_extra_options', get(g:, 'context_extra_options', ''))
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Accepts an optional path (useful for big projects, when the file you are
|
|
||||||
" editing is not the project's root document). If no argument is given, uses
|
|
||||||
" the path of the current buffer.
|
|
||||||
function! context#typeset(...) abort
|
|
||||||
let l:path = fnamemodify(strlen(a:000[0]) > 0 ? a:1 : expand("%"), ":p")
|
|
||||||
let l:cwd = fnamemodify(getcwd(), ":p") " Save local working directory
|
|
||||||
call s:context_echo('Typesetting...', 'ModeMsg')
|
|
||||||
execute 'lcd' fnameescape(fnamemodify(l:path, ":h"))
|
|
||||||
try
|
|
||||||
call s:typeset(l:path)
|
|
||||||
finally " Restore local working directory
|
|
||||||
execute 'lcd ' . fnameescape(l:cwd)
|
|
||||||
endtry
|
|
||||||
endfunction!
|
|
||||||
"}}}
|
|
||||||
|
|
||||||
let &cpo = s:keepcpo
|
|
||||||
unlet s:keepcpo
|
|
||||||
|
|
||||||
" vim: sw=2 fdm=marker
|
|
||||||
|
|
||||||
endif
|
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1
|
if has_key(g:polyglot_is_disabled, 'crystal')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Variables {{{1
|
" Variables {{{1
|
||||||
" =========
|
" =========
|
||||||
@@ -1040,5 +1042,4 @@ endfunction
|
|||||||
|
|
||||||
" }}}1
|
" }}}1
|
||||||
|
|
||||||
" vim:sw=2 sts=2 ts=8 fdm=marker et:
|
" vim:sw=2 sts=2 ts=8 fdm=marker et:
|
||||||
endif
|
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1
|
if has_key(g:polyglot_is_disabled, 'crystal')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
let s:V = vital#crystal#new()
|
let s:V = vital#crystal#new()
|
||||||
let s:P = s:V.import('Process')
|
let s:P = s:V.import('Process')
|
||||||
@@ -363,5 +365,3 @@ function! crystal_lang#expand(file, pos, ...) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" vim: sw=2 sts=2 et:
|
" vim: sw=2 sts=2 et:
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'csv') == -1
|
if has_key(g:polyglot_is_disabled, 'csv')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Filetype plugin for editing CSV files. "{{{1
|
" Filetype plugin for editing CSV files. "{{{1
|
||||||
" Author: Christian Brabandt <cb@256bit.org>
|
" Author: Christian Brabandt <cb@256bit.org>
|
||||||
@@ -3196,5 +3198,3 @@ endfun
|
|||||||
|
|
||||||
" Vim Modeline " {{{2
|
" Vim Modeline " {{{2
|
||||||
" vim: set foldmethod=marker et sw=0 sts=-1 ts=4:
|
" vim: set foldmethod=marker et sw=0 sts=-1 ts=4:
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dart') == -1
|
if has_key(g:polyglot_is_disabled, 'dart')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
function! s:error(text) abort
|
function! s:error(text) abort
|
||||||
@@ -183,5 +185,3 @@ function! dart#setModifiable() abort
|
|||||||
setlocal nomodifiable
|
setlocal nomodifiable
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1
|
if has_key(g:polyglot_is_disabled, 'elixir')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
let s:path = expand('<sfile>:h')
|
let s:path = expand('<sfile>:h')
|
||||||
let s:cmd = join(['mix', 'run', '--no-start', '--no-compile', shellescape(s:path.'/get_repos.exs')])
|
let s:cmd = join(['mix', 'run', '--no-start', '--no-compile', shellescape(s:path.'/get_repos.exs')])
|
||||||
@@ -20,5 +22,3 @@ endfunction
|
|||||||
function! db#adapter#ecto#complete_opaque(url) abort
|
function! db#adapter#ecto#complete_opaque(url) abort
|
||||||
return map(s:repo_list(), 'v:val[0]')
|
return map(s:repo_list(), 'v:val[0]')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1
|
if has_key(g:polyglot_is_disabled, 'crystal')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
let s:ecrystal_extensions = {
|
let s:ecrystal_extensions = {
|
||||||
\ 'cr': 'crystal',
|
\ 'cr': 'crystal',
|
||||||
@@ -32,5 +34,3 @@ function! ecrystal#SetSubtype() abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" vim: sw=2 sts=2 et:
|
" vim: sw=2 sts=2 et:
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1
|
if has_key(g:polyglot_is_disabled, 'elixir')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
if !exists("g:elixir_indent_max_lookbehind")
|
if !exists("g:elixir_indent_max_lookbehind")
|
||||||
let g:elixir_indent_max_lookbehind = 30
|
let g:elixir_indent_max_lookbehind = 30
|
||||||
@@ -371,5 +373,3 @@ function! elixir#indent#handle_inside_generic_block(context)
|
|||||||
return -1
|
return -1
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1
|
if has_key(g:polyglot_is_disabled, 'elixir')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
function! elixir#util#get_filename(word) abort
|
function! elixir#util#get_filename(word) abort
|
||||||
let word = a:word
|
let word = a:word
|
||||||
@@ -24,5 +26,3 @@ function! elixir#util#get_filename(word) abort
|
|||||||
|
|
||||||
return word
|
return word
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,43 +1,113 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fish') == -1
|
if has_key(g:polyglot_is_disabled, 'fish')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
function! s:IsString(lnum, col)
|
||||||
|
" Returns "true" if syntax item at the given position is part of fishString.
|
||||||
|
let l:stack = map(synstack(a:lnum, a:col), 'synIDattr(v:val, "name")')
|
||||||
|
return len(filter(l:stack, 'v:val ==# "fishString"'))
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! s:IsContinuedLine(lnum)
|
||||||
|
" Returns "true" if the given line is a continued line.
|
||||||
|
return getline(a:lnum - 1) =~ '\v\\$'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! s:FindPrevLnum(lnum)
|
||||||
|
" Starting on the given line, search backwards for a line that is not
|
||||||
|
" empty, not part of a string and not a continued line.
|
||||||
|
if a:lnum < 1 || a:lnum > line('$')
|
||||||
|
" First line or wrong value, follow prevnonblank() behaviour and
|
||||||
|
" return zero.
|
||||||
|
return 0
|
||||||
|
endif
|
||||||
|
let l:lnum = prevnonblank(a:lnum)
|
||||||
|
while l:lnum > 0 && ( s:IsContinuedLine(l:lnum) || s:IsString(l:lnum, 1) )
|
||||||
|
let l:lnum = prevnonblank(l:lnum - 1)
|
||||||
|
endwhile
|
||||||
|
return l:lnum
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! s:IsSwitch(lnum)
|
||||||
|
" Returns "true" if the given line is part of a switch block.
|
||||||
|
let l:lnum = a:lnum
|
||||||
|
let l:line = getline(l:lnum)
|
||||||
|
let l:in_block = 0
|
||||||
|
let l:stop_pat = '\v^\s*%(if|else|while|for|begin)>'
|
||||||
|
let l:block_start_pat = '\v^\s*%(if|while|for|switch|begin)>'
|
||||||
|
while l:lnum > 0
|
||||||
|
let l:lnum = prevnonblank(l:lnum - 1)
|
||||||
|
let l:line = getline(l:lnum)
|
||||||
|
if l:line =~# '\v^\s*end>'
|
||||||
|
let l:in_block += 1
|
||||||
|
elseif l:in_block && l:line =~# l:block_start_pat
|
||||||
|
let l:in_block -= 1
|
||||||
|
elseif !l:in_block && l:line =~# l:stop_pat
|
||||||
|
return 0
|
||||||
|
elseif !l:in_block && l:line =~# '\v^\s*switch>'
|
||||||
|
return 1
|
||||||
|
endif
|
||||||
|
endwhile
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
function! fish#Indent()
|
function! fish#Indent()
|
||||||
let l:prevlnum = prevnonblank(v:lnum - 1)
|
|
||||||
if l:prevlnum ==# 0
|
|
||||||
return 0
|
|
||||||
endif
|
|
||||||
let l:prevline = getline(l:prevlnum)
|
|
||||||
let l:line = getline(v:lnum)
|
let l:line = getline(v:lnum)
|
||||||
let l:shiftwidth = shiftwidth()
|
if s:IsString(v:lnum, 1)
|
||||||
let l:previndent = indent(l:prevlnum)
|
return indent(v:lnum)
|
||||||
let l:indent = l:previndent
|
|
||||||
if l:prevline =~# '\v^\s*%(begin|if|else|while|for|function|switch|case)>'
|
|
||||||
let l:indent += l:shiftwidth
|
|
||||||
endif
|
endif
|
||||||
if l:line =~# '\v^\s*end>'
|
" shiftwidth can be misleading in recent versions, use shiftwidth() if
|
||||||
let l:indent -= l:shiftwidth
|
" it is available.
|
||||||
" If we're inside a case, dedent twice because it ends the switch.
|
if exists('*shiftwidth')
|
||||||
if l:prevline =~# '\v^\s*case>'
|
let l:shiftwidth = shiftwidth()
|
||||||
" Previous line starts the case.
|
else
|
||||||
let l:indent -= l:shiftwidth
|
let l:shiftwidth = &shiftwidth
|
||||||
else
|
|
||||||
" Scan back to a dedented line to find whether we're in a case.
|
|
||||||
let l:i = l:prevlnum
|
|
||||||
while l:i >= 1 && indent(l:i) >= l:previndent
|
|
||||||
let l:i = prevnonblank(l:i - 1)
|
|
||||||
endwhile
|
|
||||||
if indent(l:i) < l:previndent && getline(l:i) =~# '\v^\s*case>'
|
|
||||||
let l:indent -= l:shiftwidth
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
elseif l:line =~# '\v^\s*else>'
|
|
||||||
let l:indent -= l:shiftwidth
|
|
||||||
elseif l:prevline !~# '\v^\s*switch>' && l:line =~# '\v^\s*case>'
|
|
||||||
let l:indent -= l:shiftwidth
|
|
||||||
endif
|
endif
|
||||||
if l:indent < 0
|
let l:prevlnum = s:FindPrevLnum(v:lnum - 1)
|
||||||
|
if l:prevlnum == 0
|
||||||
return 0
|
return 0
|
||||||
endif
|
endif
|
||||||
return l:indent
|
let l:shift = 0
|
||||||
|
let l:prevline = getline(l:prevlnum)
|
||||||
|
let l:previndent = indent(l:prevlnum)
|
||||||
|
if s:IsContinuedLine(v:lnum)
|
||||||
|
" It is customary to increment indentation of continued lines by three
|
||||||
|
" or a custom value defined by the user if available.
|
||||||
|
let l:previndent = indent(v:lnum - 1)
|
||||||
|
if s:IsContinuedLine(v:lnum - 1)
|
||||||
|
return l:previndent
|
||||||
|
elseif exists('g:fish_indent_cont')
|
||||||
|
return l:previndent + g:fish_indent_cont
|
||||||
|
elseif exists('g:indent_cont')
|
||||||
|
return l:previndent + g:indent_cont
|
||||||
|
else
|
||||||
|
return l:previndent + 3
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
if l:prevline =~# '\v^\s*%(begin|if|else|while|for|function|case|switch)>'
|
||||||
|
" First line inside a block, increase by one.
|
||||||
|
let l:shift += 1
|
||||||
|
endif
|
||||||
|
if l:line =~# '\v^\s*%(end|case|else)>'
|
||||||
|
" "end", "case" or "else", decrease by one.
|
||||||
|
let l:shift -= 1
|
||||||
|
endif
|
||||||
|
if l:line =~# '\v^\s*<case>' && l:prevline =~# '\v<switch>'
|
||||||
|
" "case" following "switch", increase by one.
|
||||||
|
let l:shift += 1
|
||||||
|
endif
|
||||||
|
if l:line =~# '\v\s*end>' && s:IsSwitch(v:lnum)
|
||||||
|
" "end" ends switch block, decrease by one more so it matches
|
||||||
|
" the indentation of "switch".
|
||||||
|
let l:shift -= 1
|
||||||
|
endif
|
||||||
|
if l:prevline =~# '\v^\s*%(if|while|for|else|switch|end)>.*<begin>'
|
||||||
|
" "begin" after start of block, increase by one.
|
||||||
|
let l:shift += 1
|
||||||
|
endif
|
||||||
|
let l:indent = l:previndent + l:shift * l:shiftwidth
|
||||||
|
" Only return zero or positive numbers.
|
||||||
|
return l:indent < 0 ? 0 : l:indent
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! fish#Format()
|
function! fish#Format()
|
||||||
@@ -47,6 +117,8 @@ function! fish#Format()
|
|||||||
let l:command = v:lnum.','.(v:lnum+v:count-1).'!fish_indent'
|
let l:command = v:lnum.','.(v:lnum+v:count-1).'!fish_indent'
|
||||||
echo l:command
|
echo l:command
|
||||||
execute l:command
|
execute l:command
|
||||||
|
" Fix indentation and replace tabs with spaces if necessary.
|
||||||
|
normal! '[=']
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
@@ -85,5 +157,3 @@ endfunction
|
|||||||
function! fish#errorformat()
|
function! fish#errorformat()
|
||||||
return '%Afish: %m,%-G%*\\ ^,%-Z%f (line %l):%s'
|
return '%Afish: %m,%-G%*\\ ^,%-Z%f (line %l):%s'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fsharp') == -1
|
if has_key(g:polyglot_is_disabled, 'fsharp')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Vim autoload functions
|
" Vim autoload functions
|
||||||
|
|
||||||
@@ -465,10 +467,10 @@ function! fsharp#sendFsi(text)
|
|||||||
if fsharp#openFsi(!g:fsharp#fsi_focus_on_send) > 0
|
if fsharp#openFsi(!g:fsharp#fsi_focus_on_send) > 0
|
||||||
" Neovim
|
" Neovim
|
||||||
if has('nvim')
|
if has('nvim')
|
||||||
call chansend(s:fsi_job, a:text . ";;". "\n")
|
call chansend(s:fsi_job, a:text . "\n" . ";;". "\n")
|
||||||
" Vim 8
|
" Vim 8
|
||||||
else
|
else
|
||||||
call term_sendkeys(s:fsi_buffer, a:text . ";;" . "\<cr>")
|
call term_sendkeys(s:fsi_buffer, a:text . "\<cr>" . ";;" . "\<cr>")
|
||||||
call term_wait(s:fsi_buffer)
|
call term_wait(s:fsi_buffer)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@@ -513,5 +515,3 @@ let &cpo = s:cpo_save
|
|||||||
unlet s:cpo_save
|
unlet s:cpo_save
|
||||||
|
|
||||||
" vim: sw=4 et sts=4
|
" vim: sw=4 et sts=4
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gitignore') == -1
|
if has_key(g:polyglot_is_disabled, 'gitignore')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
scriptencoding utf-8
|
scriptencoding utf-8
|
||||||
|
|
||||||
@@ -37,5 +39,3 @@ function! fzf_gitignore#run() abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" vim: ts=2 et sw=2
|
" vim: ts=2 et sw=2
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1
|
if has_key(g:polyglot_is_disabled, 'go')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" don't spam the user when Vim is started in Vi compatibility mode
|
" don't spam the user when Vim is started in Vi compatibility mode
|
||||||
let s:cpo_save = &cpo
|
let s:cpo_save = &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
|
|
||||||
function! go#config#AutodetectGopath() abort
|
|
||||||
return get(g:, 'go_autodetect_gopath', 0)
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! go#config#ListTypeCommands() abort
|
function! go#config#ListTypeCommands() abort
|
||||||
return get(g:, 'go_list_type_commands', {})
|
return get(g:, 'go_list_type_commands', {})
|
||||||
endfunction
|
endfunction
|
||||||
@@ -574,10 +572,21 @@ function! go#config#GoplsEnabled() abort
|
|||||||
return get(g:, 'go_gopls_enabled', 1)
|
return get(g:, 'go_gopls_enabled', 1)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
" TODO(bc): remove support for g:go_diagnostics_enabled;
|
||||||
|
" g:go_diagnostics_level is the replacement.
|
||||||
function! go#config#DiagnosticsEnabled() abort
|
function! go#config#DiagnosticsEnabled() abort
|
||||||
return get(g:, 'go_diagnostics_enabled', 0)
|
return get(g:, 'go_diagnostics_enabled', 0)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! go#config#DiagnosticsLevel() abort
|
||||||
|
let l:default = 0
|
||||||
|
if has_key(g:, 'go_diagnostics_enabled') && g:go_diagnostics_enabled
|
||||||
|
let l:default = 2
|
||||||
|
endif
|
||||||
|
|
||||||
|
return get(g:, 'go_diagnostics_level', l:default)
|
||||||
|
endfunction
|
||||||
|
|
||||||
function! go#config#GoplsOptions() abort
|
function! go#config#GoplsOptions() abort
|
||||||
return get(g:, 'go_gopls_options', ['-remote=auto'])
|
return get(g:, 'go_gopls_options', ['-remote=auto'])
|
||||||
endfunction
|
endfunction
|
||||||
@@ -612,5 +621,3 @@ let &cpo = s:cpo_save
|
|||||||
unlet s:cpo_save
|
unlet s:cpo_save
|
||||||
|
|
||||||
" vim: sw=2 ts=2 et
|
" vim: sw=2 ts=2 et
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
if has_key(g:polyglot_is_disabled, 'graphql')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
|
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
|
||||||
"
|
"
|
||||||
@@ -35,5 +37,3 @@ endfunction
|
|||||||
function! graphql#javascript_tags() abort
|
function! graphql#javascript_tags() abort
|
||||||
return get(g:, 'graphql_javascript_tags', ['gql', 'graphql', 'Relay.QL'])
|
return get(g:, 'graphql_javascript_tags', ['gql', 'graphql', 'Relay.QL'])
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
|
if has_key(g:polyglot_is_disabled, 'html5')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Vim completion script
|
" Vim completion script
|
||||||
" Language: HTML and XHTML
|
" Language: HTML and XHTML
|
||||||
@@ -841,5 +843,3 @@ function! htmlcomplete#CheckDoctype() " {{{
|
|||||||
endfunction
|
endfunction
|
||||||
" }}}
|
" }}}
|
||||||
" vim:set foldmethod=marker:
|
" vim:set foldmethod=marker:
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jsonnet') == -1
|
if has_key(g:polyglot_is_disabled, 'jsonnet')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -125,5 +127,3 @@ function! jsonnet#Format()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
if has_key(g:polyglot_is_disabled, 'jsx')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
function! jsx_pretty#comment#update_commentstring(original)
|
function! jsx_pretty#comment#update_commentstring(original)
|
||||||
let line = getline(".")
|
let line = getline(".")
|
||||||
@@ -37,5 +39,3 @@ function! s:syn_contains(lnum, cnum, syn_name)
|
|||||||
let syn_names = map(stack, 'synIDattr(v:val, "name")')
|
let syn_names = map(stack, 'synIDattr(v:val, "name")')
|
||||||
return index(syn_names, a:syn_name) >= 0
|
return index(syn_names, a:syn_name) >= 0
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
if has_key(g:polyglot_is_disabled, 'jsx')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
if exists('*shiftwidth')
|
if exists('*shiftwidth')
|
||||||
function! s:sw()
|
function! s:sw()
|
||||||
@@ -302,5 +304,3 @@ function! jsx_pretty#indent#get(js_indent)
|
|||||||
|
|
||||||
return a:js_indent()
|
return a:js_indent()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1
|
if has_key(g:polyglot_is_disabled, 'julia')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
function! julia#set_syntax_version(jvers)
|
function! julia#set_syntax_version(jvers)
|
||||||
echo "The julia#set_syntax_version function is deprecated"
|
echo "The julia#set_syntax_version function is deprecated"
|
||||||
@@ -165,5 +167,3 @@ function! julia#gotodefinition()
|
|||||||
return
|
return
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1
|
if has_key(g:polyglot_is_disabled, 'julia')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" path to the julia binary to communicate with
|
" path to the julia binary to communicate with
|
||||||
if has('win32') || has('win64')
|
if has('win32') || has('win64')
|
||||||
@@ -242,5 +244,3 @@ function! s:likely(str) abort
|
|||||||
let output = systemlist(cmd)
|
let output = systemlist(cmd)
|
||||||
return split(matchstr(output[0], '\C^search: \zs.*'))
|
return split(matchstr(output[0], '\C^search: \zs.*'))
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1
|
if has_key(g:polyglot_is_disabled, 'julia')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Facilities for moving around Julia blocks (e.g. if/end, function/end etc.)
|
" Facilities for moving around Julia blocks (e.g. if/end, function/end etc.)
|
||||||
" (AKA a collection of horrible hacks)
|
" (AKA a collection of horrible hacks)
|
||||||
@@ -794,5 +796,3 @@ function! s:cursor_moved(...)
|
|||||||
let b:jlblk_did_select = b:jlblk_doing_select
|
let b:jlblk_did_select = b:jlblk_doing_select
|
||||||
let b:jlblk_doing_select = 0
|
let b:jlblk_doing_select = 0
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1
|
if has_key(g:polyglot_is_disabled, 'julia')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" This file is autogenerated from the script 'generate_latex_symbols_table.jl'
|
" This file is autogenerated from the script 'generate_latex_symbols_table.jl'
|
||||||
" The symbols are based on Julia version 1.5.0-DEV.67
|
" The symbols are based on Julia version 1.5.0-DEV.67
|
||||||
@@ -3332,5 +3334,3 @@ function! julia_latex_symbols#get_dict()
|
|||||||
\ '\:baggage_claim:': '🛄',
|
\ '\:baggage_claim:': '🛄',
|
||||||
\ '\:left_luggage:': '🛅'}
|
\ '\:left_luggage:': '🛅'}
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ledger') == -1
|
if has_key(g:polyglot_is_disabled, 'ledger')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
scriptencoding utf-8
|
scriptencoding utf-8
|
||||||
" vim:ts=2:sw=2:sts=2:foldmethod=marker
|
" vim:ts=2:sw=2:sts=2:foldmethod=marker
|
||||||
@@ -442,6 +444,19 @@ function! ledger#align_commodity() abort
|
|||||||
endif
|
endif
|
||||||
endf
|
endf
|
||||||
|
|
||||||
|
" Align the commodity on the entire buffer
|
||||||
|
function! ledger#align_commodity_buffer() abort
|
||||||
|
" Store the viewport position
|
||||||
|
let view = winsaveview()
|
||||||
|
|
||||||
|
" Call ledger#align_commodity for every line
|
||||||
|
%call ledger#align_commodity()
|
||||||
|
|
||||||
|
" Restore the viewport position
|
||||||
|
call winrestview(view)
|
||||||
|
unlet view
|
||||||
|
endf
|
||||||
|
|
||||||
" Align the amount under the cursor and append/prepend the default currency.
|
" Align the amount under the cursor and append/prepend the default currency.
|
||||||
function! ledger#align_amount_at_cursor() abort
|
function! ledger#align_amount_at_cursor() abort
|
||||||
" Select and cut text:
|
" Select and cut text:
|
||||||
@@ -740,5 +755,3 @@ function! ledger#show_balance(file, ...) abort
|
|||||||
endif
|
endif
|
||||||
endf
|
endf
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
112
autoload/nim.vim
112
autoload/nim.vim
@@ -1,9 +1,11 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nim') == -1
|
if has_key(g:polyglot_is_disabled, 'nim')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
let g:nim_log = []
|
let g:nim_log = []
|
||||||
let s:plugin_path = escape(expand('<sfile>:p:h'), '\')
|
let s:plugin_path = escape(expand('<sfile>:p:h'), '\')
|
||||||
|
|
||||||
if !exists("g:nim_caas_enabled")
|
if !exists('g:nim_caas_enabled')
|
||||||
let g:nim_caas_enabled = 0
|
let g:nim_caas_enabled = 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -11,27 +13,25 @@ if !executable('nim')
|
|||||||
echoerr "the Nim compiler must be in your system's PATH"
|
echoerr "the Nim compiler must be in your system's PATH"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if has("python3")
|
if has('pythonx')
|
||||||
exe 'py3file ' . fnameescape(s:plugin_path) . '/nim_vim.py'
|
exe 'pyxfile ' . fnameescape(s:plugin_path) . '/nim_vim.py'
|
||||||
elseif has("python")
|
|
||||||
exe 'pyfile ' . fnameescape(s:plugin_path) . '/nim_vim.py'
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
fun! nim#init()
|
fun! nim#init() abort
|
||||||
let cmd = printf("nim --dump.format:json --verbosity:0 dump %s", s:CurrentNimFile())
|
let cmd = printf('nim --dump.format:json --verbosity:0 dump %s', s:CurrentNimFile())
|
||||||
let raw_dumpdata = system(cmd)
|
let raw_dumpdata = system(cmd)
|
||||||
if !v:shell_error && expand("%:e") == "nim"
|
if !v:shell_error && expand('%:e') ==# 'nim'
|
||||||
let false = 0 " Needed for eval of json
|
let false = 0 " Needed for eval of json
|
||||||
let true = 1 " Needed for eval of json
|
let true = 1 " Needed for eval of json
|
||||||
let dumpdata = eval(substitute(raw_dumpdata, "\n", "", "g"))
|
let dumpdata = eval(substitute(raw_dumpdata, "\n", '', 'g'))
|
||||||
|
|
||||||
let b:nim_project_root = dumpdata['project_path']
|
let b:nim_project_root = dumpdata['project_path']
|
||||||
let b:nim_defined_symbols = dumpdata['defined_symbols']
|
let b:nim_defined_symbols = dumpdata['defined_symbols']
|
||||||
let b:nim_caas_enabled = g:nim_caas_enabled || index(dumpdata['defined_symbols'], 'forcecaas') != -1
|
let b:nim_caas_enabled = g:nim_caas_enabled || index(dumpdata['defined_symbols'], 'forcecaas') != -1
|
||||||
|
|
||||||
for path in dumpdata['lib_paths']
|
for path in dumpdata['lib_paths']
|
||||||
if finddir(path) == path
|
if finddir(path) ==# path
|
||||||
let &l:path = path . "," . &l:path
|
let &l:path = path . ',' . &l:path
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
else
|
else
|
||||||
@@ -39,7 +39,7 @@ fun! nim#init()
|
|||||||
endif
|
endif
|
||||||
endf
|
endf
|
||||||
|
|
||||||
fun! s:UpdateNimLog()
|
fun! s:UpdateNimLog() abort
|
||||||
setlocal buftype=nofile
|
setlocal buftype=nofile
|
||||||
setlocal bufhidden=hide
|
setlocal bufhidden=hide
|
||||||
setlocal noswapfile
|
setlocal noswapfile
|
||||||
@@ -56,32 +56,32 @@ endf
|
|||||||
augroup NimVim
|
augroup NimVim
|
||||||
au!
|
au!
|
||||||
au BufEnter log://nim call s:UpdateNimLog()
|
au BufEnter log://nim call s:UpdateNimLog()
|
||||||
if has("python3") || has("python")
|
if has('pythonx')
|
||||||
" au QuitPre * :py nimTerminateAll()
|
" au QuitPre * :pyx nimTerminateAll()
|
||||||
au VimLeavePre * :py nimTerminateAll()
|
au VimLeavePre * :pyx nimTerminateAll()
|
||||||
endif
|
endif
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
command! NimLog :e log://nim
|
command! NimLog :e log://nim
|
||||||
|
|
||||||
command! NimTerminateService
|
command! NimTerminateService
|
||||||
\ :exe printf("py nimTerminateService('%s')", b:nim_project_root)
|
\ :exe printf("pyx nimTerminateService('%s')", b:nim_project_root)
|
||||||
|
|
||||||
command! NimRestartService
|
command! NimRestartService
|
||||||
\ :exe printf("py nimRestartService('%s')", b:nim_project_root)
|
\ :exe printf("pyx nimRestartService('%s')", b:nim_project_root)
|
||||||
|
|
||||||
fun! s:CurrentNimFile()
|
fun! s:CurrentNimFile() abort
|
||||||
let save_cur = getpos('.')
|
let save_cur = getpos('.')
|
||||||
call cursor(0, 0, 0)
|
call cursor(0, 0, 0)
|
||||||
|
|
||||||
let PATTERN = "\\v^\\#\\s*included from \\zs.*\\ze"
|
let PATTERN = '\v^\#\s*included from \zs.*\ze'
|
||||||
let l = search(PATTERN, "n")
|
let l = search(PATTERN, 'n')
|
||||||
|
|
||||||
if l != 0
|
if l != 0
|
||||||
let f = matchstr(getline(l), PATTERN)
|
let f = matchstr(getline(l), PATTERN)
|
||||||
let l:to_check = expand('%:h') . "/" . f
|
let l:to_check = expand('%:h') . '/' . f
|
||||||
else
|
else
|
||||||
let l:to_check = expand("%")
|
let l:to_check = expand('%')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call setpos('.', save_cur)
|
call setpos('.', save_cur)
|
||||||
@@ -108,42 +108,42 @@ let g:nim_symbol_types = {
|
|||||||
\ 'skEnumField': 'v',
|
\ 'skEnumField': 'v',
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
fun! NimExec(op)
|
fun! NimExec(op) abort
|
||||||
let isDirty = getbufvar(bufnr('%'), "&modified")
|
let isDirty = getbufvar(bufnr('%'), '&modified')
|
||||||
if isDirty
|
if isDirty
|
||||||
let tmp = tempname() . bufname("%") . "_dirty.nim"
|
let tmp = tempname() . bufname('%') . '_dirty.nim'
|
||||||
silent! exe ":w " . tmp
|
silent! exe ':w ' . tmp
|
||||||
|
|
||||||
let cmd = printf("idetools %s --trackDirty:\"%s,%s,%d,%d\" \"%s\"",
|
let cmd = printf('idetools %s --trackDirty:"%s,%s,%d,%d" "%s"',
|
||||||
\ a:op, tmp, expand('%:p'), line('.'), col('.')-1, s:CurrentNimFile())
|
\ a:op, tmp, expand('%:p'), line('.'), col('.')-1, s:CurrentNimFile())
|
||||||
else
|
else
|
||||||
let cmd = printf("idetools %s --track:\"%s,%d,%d\" \"%s\"",
|
let cmd = printf('idetools %s --track:"%s,%d,%d" "%s"',
|
||||||
\ a:op, expand('%:p'), line('.'), col('.')-1, s:CurrentNimFile())
|
\ a:op, expand('%:p'), line('.'), col('.')-1, s:CurrentNimFile())
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if b:nim_caas_enabled
|
if b:nim_caas_enabled
|
||||||
exe printf("py nimExecCmd('%s', '%s', False)", b:nim_project_root, cmd)
|
exe printf("pyx nimExecCmd('%s', '%s', False)", b:nim_project_root, cmd)
|
||||||
let output = l:py_res
|
let output = get(l:, 'py_res', '')
|
||||||
else
|
else
|
||||||
let output = system("nim " . cmd)
|
let output = system('nim ' . cmd)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call add(g:nim_log, "nim " . cmd . "\n" . output)
|
call add(g:nim_log, 'nim ' . cmd . "\n" . output)
|
||||||
return output
|
return output
|
||||||
endf
|
endf
|
||||||
|
|
||||||
fun! NimExecAsync(op, Handler)
|
fun! NimExecAsync(op, Handler) abort
|
||||||
let result = NimExec(a:op)
|
let result = NimExec(a:op)
|
||||||
call a:Handler(result)
|
call a:Handler(result)
|
||||||
endf
|
endf
|
||||||
|
|
||||||
fun! NimComplete(findstart, base)
|
fun! NimComplete(findstart, base) abort
|
||||||
if b:nim_caas_enabled == 0
|
if b:nim_caas_enabled ==# 0
|
||||||
return -1
|
return -1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if a:findstart
|
if a:findstart
|
||||||
if synIDattr(synIDtrans(synID(line("."),col("."),1)), "name") == 'Comment'
|
if synIDattr(synIDtrans(synID(line('.'),col('.'),1)), 'name') ==# 'Comment'
|
||||||
return -1
|
return -1
|
||||||
endif
|
endif
|
||||||
let line = getline('.')
|
let line = getline('.')
|
||||||
@@ -154,10 +154,10 @@ fun! NimComplete(findstart, base)
|
|||||||
return start
|
return start
|
||||||
else
|
else
|
||||||
let result = []
|
let result = []
|
||||||
let sugOut = NimExec("--suggest")
|
let sugOut = NimExec('--suggest')
|
||||||
for line in split(sugOut, '\n')
|
for line in split(sugOut, '\n')
|
||||||
let lineData = split(line, '\t')
|
let lineData = split(line, '\t')
|
||||||
if len(lineData) > 0 && lineData[0] == "sug"
|
if len(lineData) > 0 && lineData[0] ==# 'sug'
|
||||||
let word = split(lineData[2], '\.')[-1]
|
let word = split(lineData[2], '\.')[-1]
|
||||||
if a:base ==? '' || word =~# '^' . a:base
|
if a:base ==? '' || word =~# '^' . a:base
|
||||||
let kind = get(g:nim_symbol_types, lineData[1], '')
|
let kind = get(g:nim_symbol_types, lineData[1], '')
|
||||||
@@ -170,7 +170,7 @@ fun! NimComplete(findstart, base)
|
|||||||
endif
|
endif
|
||||||
endf
|
endf
|
||||||
|
|
||||||
if !exists("g:neocomplcache_omni_patterns")
|
if !exists('g:neocomplcache_omni_patterns')
|
||||||
let g:neocomplcache_omni_patterns = {}
|
let g:neocomplcache_omni_patterns = {}
|
||||||
endif
|
endif
|
||||||
let g:neocomplcache_omni_patterns['nim'] = '[^. *\t]\.\w*'
|
let g:neocomplcache_omni_patterns['nim'] = '[^. *\t]\.\w*'
|
||||||
@@ -182,7 +182,7 @@ let g:neocomplete#sources#omni#input_patterns['nim'] = '[^. *\t]\.\w*'
|
|||||||
|
|
||||||
let g:nim_completion_callbacks = {}
|
let g:nim_completion_callbacks = {}
|
||||||
|
|
||||||
fun! NimAsyncCmdComplete(cmd, output)
|
fun! NimAsyncCmdComplete(cmd, output) abort
|
||||||
call add(g:nim_log, a:output)
|
call add(g:nim_log, a:output)
|
||||||
echom g:nim_completion_callbacks
|
echom g:nim_completion_callbacks
|
||||||
if has_key(g:nim_completion_callbacks, a:cmd)
|
if has_key(g:nim_completion_callbacks, a:cmd)
|
||||||
@@ -190,55 +190,53 @@ fun! NimAsyncCmdComplete(cmd, output)
|
|||||||
call Callback(a:output)
|
call Callback(a:output)
|
||||||
" remove(g:nim_completion_callbacks, a:cmd)
|
" remove(g:nim_completion_callbacks, a:cmd)
|
||||||
else
|
else
|
||||||
echom "ERROR, Unknown Command: " . a:cmd
|
echom 'ERROR, Unknown Command: ' . a:cmd
|
||||||
endif
|
endif
|
||||||
return 1
|
return 1
|
||||||
endf
|
endf
|
||||||
|
|
||||||
fun! GotoDefinition_nim_ready(def_output)
|
fun! GotoDefinition_nim_ready(def_output) abort
|
||||||
if v:shell_error
|
if v:shell_error
|
||||||
echo "nim was unable to locate the definition. exit code: " . v:shell_error
|
echo 'nim was unable to locate the definition. exit code: ' . v:shell_error
|
||||||
" echoerr a:def_output
|
" echoerr a:def_output
|
||||||
return 0
|
return 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let rawDef = matchstr(a:def_output, 'def\t\([^\n]*\)')
|
let rawDef = matchstr(a:def_output, 'def\t\([^\n]*\)')
|
||||||
if rawDef == ""
|
if rawDef == ''
|
||||||
echo "the current cursor position does not match any definitions"
|
echo 'the current cursor position does not match any definitions'
|
||||||
return 0
|
return 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let defBits = split(rawDef, '\t')
|
let defBits = split(rawDef, '\t')
|
||||||
let file = defBits[4]
|
let file = defBits[4]
|
||||||
let line = defBits[5]
|
let line = defBits[5]
|
||||||
exe printf("e +%d %s", line, file)
|
exe printf('e +%d %s', line, file)
|
||||||
return 1
|
return 1
|
||||||
endf
|
endf
|
||||||
|
|
||||||
fun! GotoDefinition_nim()
|
fun! GotoDefinition_nim() abort
|
||||||
call NimExecAsync("--def", function("GotoDefinition_nim_ready"))
|
call NimExecAsync('--def', function('GotoDefinition_nim_ready'))
|
||||||
endf
|
endf
|
||||||
|
|
||||||
fun! FindReferences_nim()
|
fun! FindReferences_nim() abort
|
||||||
setloclist()
|
"setloclist()
|
||||||
endf
|
endf
|
||||||
|
|
||||||
" Syntastic syntax checking
|
" Syntastic syntax checking
|
||||||
fun! SyntaxCheckers_nim_nim_GetLocList()
|
fun! SyntaxCheckers_nim_nim_GetLocList() abort
|
||||||
let makeprg = 'nim check --hints:off --listfullpaths ' . s:CurrentNimFile()
|
let makeprg = 'nim check --hints:off --listfullpaths ' . s:CurrentNimFile()
|
||||||
let errorformat = &errorformat
|
let errorformat = &errorformat
|
||||||
|
|
||||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||||
endf
|
endf
|
||||||
|
|
||||||
function! SyntaxCheckers_nim_nim_IsAvailable()
|
function! SyntaxCheckers_nim_nim_IsAvailable() abort
|
||||||
return executable("nim")
|
return executable('nim')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
if exists("g:SyntasticRegistry")
|
if exists('g:SyntasticRegistry')
|
||||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||||
\ 'filetype': 'nim',
|
\ 'filetype': 'nim',
|
||||||
\ 'name': 'nim'})
|
\ 'name': 'nim'})
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -449,6 +449,11 @@ func! polyglot#shebang#VimDetect()
|
|||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if line1 =~ '^# ' || getline(2) =~ '^# ' || getline(3) =~ '^# ' || getline(4) =~ '^# ' || getline(5) =~ '^# '
|
||||||
|
setf FALLBACK conf
|
||||||
|
return 1
|
||||||
|
endif
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
" Restore 'cpoptions'
|
||||||
|
let s:cpo_save = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
" DO NOT EDIT CODE BELOW, IT IS GENERATED WITH MAKEFILE
|
||||||
|
|
||||||
let s:globs = {
|
let s:globs = {
|
||||||
\ '8th': '*.8th',
|
\ '8th': '*.8th',
|
||||||
\ 'Jenkinsfile': '*.jenkinsfile,*.Jenkinsfile,Jenkinsfile,Jenkinsfile*',
|
\ 'Jenkinsfile': '*.jenkinsfile,*.Jenkinsfile,Jenkinsfile,Jenkinsfile*',
|
||||||
@@ -138,7 +144,7 @@ let s:globs = {
|
|||||||
\ 'ecd': '*.ecd',
|
\ 'ecd': '*.ecd',
|
||||||
\ 'ecrystal': '*.ecr',
|
\ 'ecrystal': '*.ecr',
|
||||||
\ 'edif': '*.ed\(f\|if\|o\)',
|
\ 'edif': '*.ed\(f\|if\|o\)',
|
||||||
\ 'eelixir': '*.eex,*.leex',
|
\ 'eelixir': '*.eex,*.html.leex,*.leex',
|
||||||
\ 'elf': '*.am',
|
\ 'elf': '*.am',
|
||||||
\ 'elinks': 'elinks.conf',
|
\ 'elinks': 'elinks.conf',
|
||||||
\ 'elixir': '*.ex,*.exs,mix.lock',
|
\ 'elixir': '*.ex,*.exs,mix.lock',
|
||||||
@@ -257,6 +263,7 @@ let s:globs = {
|
|||||||
\ 'jq': '*.jq,.jqrc,.jqrc*',
|
\ 'jq': '*.jq,.jqrc,.jqrc*',
|
||||||
\ 'json': '*.json,*.avsc,*.geojson,*.gltf,*.har,*.ice,*.JSON-tmLanguage,*.jsonl,*.mcmeta,*.tfstate,*.tfstate.backup,*.topojson,*.webapp,*.webmanifest,*.yy,*.yyp,*.jsonp,*.template,.arcconfig,.htmlhintrc,.tern-config,.tern-project,.watchmanconfig,composer.lock,mcmod.info,Pipfile.lock',
|
\ 'json': '*.json,*.avsc,*.geojson,*.gltf,*.har,*.ice,*.JSON-tmLanguage,*.jsonl,*.mcmeta,*.tfstate,*.tfstate.backup,*.topojson,*.webapp,*.webmanifest,*.yy,*.yyp,*.jsonp,*.template,.arcconfig,.htmlhintrc,.tern-config,.tern-project,.watchmanconfig,composer.lock,mcmod.info,Pipfile.lock',
|
||||||
\ 'json5': '*.json5',
|
\ 'json5': '*.json5',
|
||||||
|
\ 'jsonc': '*.cjson,*.jsonc,coc-settings.json,.eslintrc.json,.babelrc,.jshintrc,.jslintrc,.mocharc.json,coffeelint.json,tsconfig.json,jsconfig.json',
|
||||||
\ 'jsonnet': '*.jsonnet,*.libsonnet',
|
\ 'jsonnet': '*.jsonnet,*.libsonnet',
|
||||||
\ 'jsp': '*.jsp',
|
\ 'jsp': '*.jsp',
|
||||||
\ 'jst': '*.ejs,*.ect,*.jst',
|
\ 'jst': '*.ejs,*.ect,*.jst',
|
||||||
@@ -309,7 +316,6 @@ let s:globs = {
|
|||||||
\ 'make': '*.mak,*.dsp,*.mk,*[mM]akefile',
|
\ 'make': '*.mak,*.dsp,*.mk,*[mM]akefile',
|
||||||
\ 'mako': '*.mako,*.mao',
|
\ 'mako': '*.mako,*.mao',
|
||||||
\ 'mallard': '*.page',
|
\ 'mallard': '*.page',
|
||||||
\ 'man': '*.1,*.1in,*.1m,*.1x,*.2,*.3,*.3in,*.3m,*.3p,*.3pm,*.3qt,*.3x,*.4,*.5,*.6,*.7,*.8,*.9,*.man,*.mdoc',
|
|
||||||
\ 'manconf': 'man.config',
|
\ 'manconf': 'man.config',
|
||||||
\ 'map': '*.map',
|
\ 'map': '*.map',
|
||||||
\ 'maple': '*.mv,*.mpl,*.mws',
|
\ 'maple': '*.mv,*.mpl,*.mws',
|
||||||
@@ -324,6 +330,7 @@ let s:globs = {
|
|||||||
\ 'mgl': '*.mgl',
|
\ 'mgl': '*.mgl',
|
||||||
\ 'mgp': '*.mgp',
|
\ 'mgp': '*.mgp',
|
||||||
\ 'mib': '*.mib,*.my',
|
\ 'mib': '*.mib,*.my',
|
||||||
|
\ 'mint': '*.mint',
|
||||||
\ 'mix': '*.mix,*.mixal',
|
\ 'mix': '*.mix,*.mixal',
|
||||||
\ 'mma': '*.mathematica,*.cdf,*.m,*.ma,*.mt,*.nb,*.nbp,*.wl,*.wlt,*.wls,*.mma',
|
\ 'mma': '*.mathematica,*.cdf,*.m,*.ma,*.mt,*.nb,*.nbp,*.wl,*.wlt,*.wls,*.mma',
|
||||||
\ 'mmp': '*.mmp',
|
\ 'mmp': '*.mmp',
|
||||||
@@ -355,7 +362,7 @@ let s:globs = {
|
|||||||
\ 'ninja': '*.ninja',
|
\ 'ninja': '*.ninja',
|
||||||
\ 'nix': '*.nix',
|
\ 'nix': '*.nix',
|
||||||
\ 'nqc': '*.nqc',
|
\ 'nqc': '*.nqc',
|
||||||
\ 'nroff': '*.tr,*.nr,*.roff,*.tmac,*.mom,tmac.*',
|
\ 'nroff': '*.1,*.1in,*.1m,*.1x,*.2,*.3,*.3in,*.3m,*.3p,*.3pm,*.3qt,*.3x,*.4,*.5,*.6,*.7,*.8,*.9,*.man,*.mdoc,*.tr,*.nr,*.roff,*.tmac,*.mom,tmac.*',
|
||||||
\ 'nsis': '*.nsi,*.nsh',
|
\ 'nsis': '*.nsi,*.nsh',
|
||||||
\ 'oasis': '_oasis',
|
\ 'oasis': '_oasis',
|
||||||
\ 'obj': '*.obj',
|
\ 'obj': '*.obj',
|
||||||
@@ -383,6 +390,7 @@ let s:globs = {
|
|||||||
\ 'pcmk': '*.pcmk',
|
\ 'pcmk': '*.pcmk',
|
||||||
\ 'pdf': '*.pdf',
|
\ 'pdf': '*.pdf',
|
||||||
\ 'perl': '*.pl,*.al,*.cgi,*.fcgi,*.perl,*.ph,*.plx,*.pm,*.psgi,*.t,Makefile.PL,Rexfile,ack,cpanfile,example.gitolite.rc,.gitolite.rc',
|
\ 'perl': '*.pl,*.al,*.cgi,*.fcgi,*.perl,*.ph,*.plx,*.pm,*.psgi,*.t,Makefile.PL,Rexfile,ack,cpanfile,example.gitolite.rc,.gitolite.rc',
|
||||||
|
\ 'pest': '*.pest',
|
||||||
\ 'pf': 'pf.conf',
|
\ 'pf': 'pf.conf',
|
||||||
\ 'pfmain': 'main.cf',
|
\ 'pfmain': 'main.cf',
|
||||||
\ 'php': '*.php,*.aw,*.ctp,*.fcgi,*.inc,*.php3,*.php4,*.php5,*.phps,*.phpt,*.phtml,*.php9,.php,.php_cs,.php_cs.dist,Phakefile',
|
\ 'php': '*.php,*.aw,*.ctp,*.fcgi,*.inc,*.php3,*.php4,*.php5,*.phps,*.phpt,*.phtml,*.php9,.php,.php_cs,.php_cs.dist,Phakefile',
|
||||||
@@ -555,6 +563,7 @@ let s:globs = {
|
|||||||
\ 'tssop': '*.tssop',
|
\ 'tssop': '*.tssop',
|
||||||
\ 'tt2': '*.tt2',
|
\ 'tt2': '*.tt2',
|
||||||
\ 'tt2html': '*.tt2',
|
\ 'tt2html': '*.tt2',
|
||||||
|
\ 'tutor': '*.tutor',
|
||||||
\ 'typescript': '*.ts',
|
\ 'typescript': '*.ts',
|
||||||
\ 'typescriptreact': '*.tsx',
|
\ 'typescriptreact': '*.tsx',
|
||||||
\ 'uc': '*.uc',
|
\ 'uc': '*.uc',
|
||||||
@@ -601,7 +610,7 @@ let s:globs = {
|
|||||||
\ 'xhtml': '*.xhtml,*.xht',
|
\ 'xhtml': '*.xhtml,*.xht',
|
||||||
\ 'xinetd': '',
|
\ 'xinetd': '',
|
||||||
\ 'xmath': '*.msc,*.msf',
|
\ 'xmath': '*.msc,*.msf',
|
||||||
\ 'xml': '*.xml,*.adml,*.admx,*.ant,*.axml,*.builds,*.ccproj,*.ccxml,*.clixml,*.cproject,*.cscfg,*.csdef,*.csl,*.csproj,*.ct,*.depproj,*.dita,*.ditamap,*.ditaval,*.dll.config,*.dotsettings,*.filters,*.fsproj,*.fxml,*.glade,*.gml,*.gmx,*.grxml,*.gst,*.iml,*.ivy,*.jelly,*.jsproj,*.kml,*.launch,*.mdpolicy,*.mjml,*.mm,*.mod,*.mxml,*.natvis,*.ncl,*.ndproj,*.nproj,*.nuspec,*.odd,*.osm,*.pkgproj,*.pluginspec,*.proj,*.props,*.psc1,*.pt,*.rdf,*.resx,*.rss,*.sch,*.scxml,*.sfproj,*.shproj,*.srdf,*.storyboard,*.sublime-snippet,*.targets,*.tml,*.ui,*.urdf,*.ux,*.vbproj,*.vcxproj,*.vsixmanifest,*.vssettings,*.vstemplate,*.vxml,*.wixproj,*.workflow,*.wsdl,*.wsf,*.wxi,*.wxl,*.wxs,*.x3d,*.xacro,*.xaml,*.xib,*.xlf,*.xliff,*.xmi,*.xml.dist,*.xproj,*.xsd,*.xspec,*.xul,*.zcml,*.cdxml,*.tpm,*.csproj.user,*.wpl,.classpath,.cproject,.project,App.config,NuGet.config,Settings.StyleCop,Web.Debug.config,Web.Release.config,Web.config,packages.config,*fglrxrc',
|
\ 'xml': '*.xml,*.adml,*.admx,*.ant,*.axml,*.builds,*.ccproj,*.ccxml,*.clixml,*.cproject,*.cscfg,*.csdef,*.csl,*.csproj,*.ct,*.depproj,*.dita,*.ditamap,*.ditaval,*.dll.config,*.dotsettings,*.filters,*.fsproj,*.fxml,*.glade,*.gml,*.gmx,*.grxml,*.gst,*.iml,*.ivy,*.jelly,*.jsproj,*.kml,*.launch,*.mdpolicy,*.mjml,*.mm,*.mod,*.mxml,*.natvis,*.ncl,*.ndproj,*.nproj,*.nuspec,*.odd,*.osm,*.pkgproj,*.pluginspec,*.proj,*.props,*.psc1,*.pt,*.rdf,*.res,*.resx,*.rss,*.sch,*.scxml,*.sfproj,*.shproj,*.srdf,*.storyboard,*.sublime-snippet,*.targets,*.tml,*.ui,*.urdf,*.ux,*.vbproj,*.vcxproj,*.vsixmanifest,*.vssettings,*.vstemplate,*.vxml,*.wixproj,*.workflow,*.wsdl,*.wsf,*.wxi,*.wxl,*.wxs,*.x3d,*.xacro,*.xaml,*.xib,*.xlf,*.xliff,*.xmi,*.xml.dist,*.xproj,*.xsd,*.xspec,*.xul,*.zcml,*.cdxml,*.tpm,*.csproj.user,*.wpl,.classpath,.cproject,.project,App.config,NuGet.config,Settings.StyleCop,Web.Debug.config,Web.Release.config,Web.config,packages.config,*fglrxrc',
|
||||||
\ 'xml.twig': '*.xml.twig',
|
\ 'xml.twig': '*.xml.twig',
|
||||||
\ 'xmodmap': '*Xmodmap,*xmodmap*',
|
\ 'xmodmap': '*Xmodmap,*xmodmap*',
|
||||||
\ 'xpm': '*.xpm,*.pm',
|
\ 'xpm': '*.xpm,*.pm',
|
||||||
@@ -624,6 +633,13 @@ let s:globs = {
|
|||||||
\ 'zsh': '*.zsh,.zshrc,.zshenv,.zlogin,.zprofile,.zlogout,.zlog*,.zcompdump*,.zfbfmarks,.zsh*',
|
\ 'zsh': '*.zsh,.zshrc,.zshenv,.zlogin,.zprofile,.zlogout,.zlog*,.zcompdump*,.zfbfmarks,.zsh*',
|
||||||
\}
|
\}
|
||||||
|
|
||||||
|
|
||||||
|
" DO NOT EDIT CODE ABOVE, IT IS GENERATED WITH MAKEFILE
|
||||||
|
|
||||||
func! polyglot#sleuth#GlobForFiletype(type)
|
func! polyglot#sleuth#GlobForFiletype(type)
|
||||||
return get(s:globs, a:type, '')
|
return get(s:globs, a:type, '')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
" Restore 'cpoptions'
|
||||||
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pony') == -1
|
if has_key(g:polyglot_is_disabled, 'pony')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Vim plugin file
|
" Vim plugin file
|
||||||
" Language: Pony
|
" Language: Pony
|
||||||
@@ -532,5 +534,3 @@ endfunction
|
|||||||
|
|
||||||
let &cpo = s:cpo_save
|
let &cpo = s:cpo_save
|
||||||
unlet s:cpo_save
|
unlet s:cpo_save
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1
|
if has_key(g:polyglot_is_disabled, 'puppet')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
function! puppet#align#IndentLevel(lnum)
|
function! puppet#align#IndentLevel(lnum)
|
||||||
return indent(a:lnum) / &shiftwidth
|
return indent(a:lnum) / &shiftwidth
|
||||||
@@ -68,5 +70,3 @@ function! puppet#align#AlignHashrockets(...) abort
|
|||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1
|
if has_key(g:polyglot_is_disabled, 'puppet')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
if !exists('s:ctags_type')
|
if !exists('s:ctags_type')
|
||||||
@@ -36,5 +38,3 @@ function! puppet#ctags#Type()
|
|||||||
return s:ctags_type
|
return s:ctags_type
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1
|
if has_key(g:polyglot_is_disabled, 'puppet')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
"
|
"
|
||||||
" Simple format using puppet's l:indents and align hashrockets function
|
" Simple format using puppet's l:indents and align hashrockets function
|
||||||
@@ -70,5 +72,3 @@ function! puppet#format#Fallback(start_lnum, end_lnum) abort
|
|||||||
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'python-compiler') == -1
|
if has_key(g:polyglot_is_disabled, 'python-compiler')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" Sometimes Python issues debugging messages
|
" Sometimes Python issues debugging messages
|
||||||
" which don't belong to a call stack context
|
" which don't belong to a call stack context
|
||||||
@@ -17,5 +19,3 @@ function! python#utils#fix_qflist() " {{{
|
|||||||
call setqflist(l:traceback)
|
call setqflist(l:traceback)
|
||||||
endif
|
endif
|
||||||
endfunction " }}}
|
endfunction " }}}
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'requirements') == -1
|
if has_key(g:polyglot_is_disabled, 'requirements')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" the Requirements File Format syntax support for Vim
|
" the Requirements File Format syntax support for Vim
|
||||||
" Version: 1.5.3
|
" Version: 1.5.3
|
||||||
@@ -32,5 +34,3 @@ set cpo&vim
|
|||||||
let &cpo = s:save_cpo
|
let &cpo = s:save_cpo
|
||||||
unlet s:save_cpo
|
unlet s:save_cpo
|
||||||
" vim: et sw=4 ts=4 sts=4:
|
" vim: et sw=4 ts=4 sts=4:
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user