mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-09 12:03:53 -05:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
63119f09d1 | ||
|
|
f2ef4cedec | ||
|
|
45c1923f43 | ||
|
|
8dd0474feb |
@@ -11,7 +11,7 @@ A collection of language packs for Vim.
|
||||
- It is more secure because scripts loaded for all extensions are generated by vim-polyglot (ftdetect).
|
||||
- Solid syntax and indentation support (other features skipped). Only the best language packs.
|
||||
- All unnecessary files are ignored (like enormous documentation from php support).
|
||||
- No support for esoteric languages, only most popular ones (modern too, like `slim`).
|
||||
- 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 `19ms` to load.
|
||||
@@ -132,6 +132,7 @@ If you need full functionality of any plugin, please use it directly with your p
|
||||
- [icalendar](https://github.com/chutzpah/icalendar.vim)
|
||||
- [idris](https://github.com/idris-hackers/idris-vim)
|
||||
- [ion](https://github.com/vmchale/ion-vim)
|
||||
- [javascript-sql](https://github.com/statico/vim-javascript-sql)
|
||||
- [javascript](https://github.com/pangloss/vim-javascript)
|
||||
- [jenkins](https://github.com/martinda/Jenkinsfile-vim-syntax)
|
||||
- [jinja](https://github.com/lepture/vim-jinja)
|
||||
@@ -200,7 +201,6 @@ If you need full functionality of any plugin, please use it directly with your p
|
||||
- [slime](https://github.com/slime-lang/vim-slime-syntax)
|
||||
- [smt2](https://github.com/bohlender/vim-smt2)
|
||||
- [solidity](https://github.com/tomlion/vim-solidity)
|
||||
- [sql](https://github.com/shmup/vim-sql-syntax)
|
||||
- [stylus](https://github.com/wavded/vim-stylus)
|
||||
- [svelte](https://github.com/evanleck/vim-svelte/tree/main)
|
||||
- [svg-indent](https://github.com/jasonshell/vim-svg-indent)
|
||||
|
||||
@@ -14,7 +14,7 @@ else
|
||||
endif
|
||||
|
||||
endif
|
||||
if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Vim ftplugin file
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
||||
|
||||
source <sfile>:h/javascript.vim
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
||||
|
||||
" modified from html.vim
|
||||
" For matchit plugin
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
||||
|
||||
source <sfile>:h/tsx.vim
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ function GetJavascriptGraphQLIndent()
|
||||
endfunction
|
||||
|
||||
endif
|
||||
if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Vim indent file
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
||||
|
||||
source <sfile>:h/javascript.vim
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Vim indent file
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
||||
|
||||
source <sfile>:h/tsx.vim
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Vim syntax file
|
||||
|
||||
26
after/syntax/javascript/sql.vim
Normal file
26
after/syntax/javascript/sql.vim
Normal file
@@ -0,0 +1,26 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript-sql') == -1
|
||||
|
||||
" Vim plugin
|
||||
" Language: JavaScript
|
||||
" Maintainer: Ian Langworth <ian@langworth.com>
|
||||
|
||||
if exists('b:current_syntax')
|
||||
let s:current_syntax = b:current_syntax
|
||||
unlet b:current_syntax
|
||||
endif
|
||||
|
||||
exec 'syntax include @SQLSyntax syntax/' . g:javascript_sql_dialect . '.vim'
|
||||
if exists('s:current_syntax')
|
||||
let b:current_syntax = s:current_syntax
|
||||
endif
|
||||
|
||||
syntax region sqlTemplateString start=+`+ skip=+\\\(`\|$\)+ end=+`+ contains=@SQLSyntax,jsTemplateExpression,jsSpecial extend
|
||||
exec 'syntax match sqlTaggedTemplate +\%(SQL\)\%(`\)\@=+ nextgroup=sqlTemplateString'
|
||||
|
||||
hi def link sqlTemplateString jsTemplateString
|
||||
hi def link sqlTaggedTemplate jsTaggedTemplate
|
||||
|
||||
syn cluster jsExpression add=sqlTaggedTemplate
|
||||
syn cluster sqlTaggedTemplate add=sqlTemplateString
|
||||
|
||||
endif
|
||||
@@ -1,4 +1,4 @@
|
||||
if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
||||
|
||||
source <sfile>:h/javascript.vim
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
||||
|
||||
let s:highlight_close_tag = get(g:, 'vim_jsx_pretty_highlight_close_tag', 0)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Vim syntax file
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
||||
|
||||
source <sfile>:h/tsx.vim
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
||||
|
||||
function! jsx_pretty#comment#update_commentstring(original)
|
||||
let line = getline(".")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
||||
|
||||
if exists('*shiftwidth')
|
||||
function! s:sw()
|
||||
|
||||
@@ -202,6 +202,16 @@ func! polyglot#DetectFsFiletype()
|
||||
setf forth | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#DetectReFiletype()
|
||||
for lnum in range(1, min([line("$"), 50]))
|
||||
let line = getline(lnum)
|
||||
if line =~# '^\s*#\%(\%(if\|ifdef\|define\|pragma\)\s\+\w\|\s*include\s\+[<"]\|template\s*<\)'
|
||||
setf cpp | return
|
||||
endif
|
||||
setf reason | return
|
||||
endfor
|
||||
endfunc
|
||||
|
||||
" Restore 'cpoptions'
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
221
autoload/sleuth.vim
Normal file
221
autoload/sleuth.vim
Normal file
@@ -0,0 +1,221 @@
|
||||
let s:globs = {
|
||||
\ '8th': '{*.8th,}',
|
||||
\ 'Dockerfile': '{*.dockerfile,*.dock,*.Dockerfile,Dockerfile,dockerfile,Dockerfile*,}',
|
||||
\ 'Jenkinsfile': '{*.jenkinsfile,*.Jenkinsfile,Jenkinsfile,Jenkinsfile*,}',
|
||||
\ 'a2ps': '{a2psrc,.a2psrc,}',
|
||||
\ 'a65': '{*.a65,}',
|
||||
\ 'aap': '{*.aap,}',
|
||||
\ 'abap': '{*.abap,}',
|
||||
\ 'abaqus': '{*.inp,}',
|
||||
\ 'abc': '{*.abc,}',
|
||||
\ 'abel': '{*.abl,}',
|
||||
\ 'acedb': '{*.wrm,}',
|
||||
\ 'ada': '{*.adb,*.ads,*.ada,*.gpr,}',
|
||||
\ 'ahdl': '{*.tdf,}',
|
||||
\ 'aidl': '{*.aidl,}',
|
||||
\ 'alsaconf': '{.asoundrc,}',
|
||||
\ 'aml': '{*.aml,}',
|
||||
\ 'ampl': '{*.run,}',
|
||||
\ 'ant': '{build.xml,}',
|
||||
\ 'apache': '{.htaccess,}',
|
||||
\ 'apiblueprint': '{*.apib,}',
|
||||
\ 'applescript': '{*.applescript,*.scpt,}',
|
||||
\ 'aptconf': '{apt.conf,}',
|
||||
\ 'arch': '{.arch-inventory,=tagging-method,}',
|
||||
\ 'arduino': '{*.pde,*.ino,}',
|
||||
\ 'art': '{*.art,}',
|
||||
\ 'asciidoc': '{*.asciidoc,*.adoc,*.asc,}',
|
||||
\ 'asl': '{*.asl,*.dsl,}',
|
||||
\ 'asn': '{*.asn,*.asn1,}',
|
||||
\ 'aspperl': '{*.asp,}',
|
||||
\ 'aspvbs': '{*.asa,*.asp,}',
|
||||
\ 'atlas': '{*.atl,*.as,}',
|
||||
\ 'autohotkey': '{*.ahk,*.ahkl,}',
|
||||
\ 'autoit': '{*.au3,}',
|
||||
\ 'automake': '{[Mm]akefile.am,GNUmakefile.am,}',
|
||||
\ 'ave': '{*.ave,}',
|
||||
\ 'awk': '{*.awk,}',
|
||||
\ 'blade': '{*.blade,*.blade.php,}',
|
||||
\ 'brewfile': '{Brewfile,}',
|
||||
\ 'c': '{*.c,*.cats,*.h,*.idc,}',
|
||||
\ 'caddyfile': '{Caddyfile,}',
|
||||
\ 'carp': '{*.carp,}',
|
||||
\ 'clojure': '{*.clj,*.boot,*.cl2,*.cljc,*.cljs,*.cljs.hl,*.cljscm,*.cljx,*.hic,*.edn,riemann.config,build.boot,profile.boot,}',
|
||||
\ 'cmake': '{*.cmake,*.cmake.in,CMakeLists.txt,}',
|
||||
\ 'coffee': '{*.coffee,*._coffee,*.cake,*.cjsx,*.iced,*.coffeekup,Cakefile,}',
|
||||
\ 'cpp': '{*.cpp,*.c++,*.cc,*.cp,*.cxx,*.h,*.h++,*.hh,*.hpp,*.hxx,*.inc,*.inl,*.ino,*.ipp,*.re,*.tcc,*.tpp,}',
|
||||
\ 'cql': '{*.cql,}',
|
||||
\ 'cryptol': '{*.cry,*.cyl,*.lcry,*.lcyl,}',
|
||||
\ 'crystal': '{*.cr,Projectfile,}',
|
||||
\ 'csv': '{*.csv,*.tsv,*.tab,}',
|
||||
\ 'cucumber': '{*.feature,*.story,}',
|
||||
\ 'cuesheet': '{*.cue,}',
|
||||
\ 'd': '{*.d,*.di,}',
|
||||
\ 'dart': '{*.dart,}',
|
||||
\ 'dcov': '{*.lst,}',
|
||||
\ 'dd': '{*.dd,}',
|
||||
\ 'ddoc': '{*.ddoc,}',
|
||||
\ 'dhall': '{*.dhall,}',
|
||||
\ 'dosini': '{*.wrap,}',
|
||||
\ 'dsdl': '{*.sdl,}',
|
||||
\ 'dune': '{jbuild,dune,dune-project,dune-workspace,}',
|
||||
\ 'ecrystal': '{*.ecr,}',
|
||||
\ 'eelixir': '{*.eex,*.leex,}',
|
||||
\ 'elf': '{*.am,}',
|
||||
\ 'elixir': '{*.ex,*.exs,mix.lock,}',
|
||||
\ 'elm': '{*.elm,}',
|
||||
\ 'embeddedpuppet': '{*.epp,}',
|
||||
\ 'ember-script': '{*.em,*.emberscript,}',
|
||||
\ 'emblem': '{*.emblem,*.em,}',
|
||||
\ 'erlang': '{*.erl,*.app.src,*.es,*.escript,*.hrl,*.xrl,*.yrl,*.app,*.yaws,Emakefile,rebar.config,rebar.config.lock,rebar.lock,}',
|
||||
\ 'eruby': '{*.erb,*.erb.deface,*.rhtml,}',
|
||||
\ 'fbs': '{*.fbs,}',
|
||||
\ 'fennel': '{*.fnl,}',
|
||||
\ 'ferm': '{*.ferm,ferm.conf,}',
|
||||
\ 'fish': '{*.fish,}',
|
||||
\ 'flow': '{*.flow,}',
|
||||
\ 'forth': '{*.fs,*.ft,*.fth,}',
|
||||
\ 'fsharp': '{*.fs,*.fsi,*.fsx,}',
|
||||
\ 'gdscript3': '{*.gd,}',
|
||||
\ 'gitcommit': '{,}',
|
||||
\ 'gitconfig': '{*.gitconfig,.gitconfig,.gitmodules,}',
|
||||
\ 'gitrebase': '{git-rebase-todo,}',
|
||||
\ 'gitsendemail': '{.gitsendemail.*,}',
|
||||
\ 'glsl': '{*.glsl,*.fp,*.frag,*.frg,*.fs,*.fsh,*.fshader,*.geo,*.geom,*.glslf,*.glslv,*.gs,*.gshader,*.shader,*.tesc,*.tese,*.vert,*.vrx,*.vsh,*.vshader,*.comp,}',
|
||||
\ 'gmpl': '{*.mod,}',
|
||||
\ 'gnuplot': '{*.gp,*.gnu,*.gnuplot,*.p,*.plot,*.plt,}',
|
||||
\ 'go': '{*.go,}',
|
||||
\ 'gohtmltmpl': '{*.tmpl,}',
|
||||
\ 'gomod': '{go.mod,}',
|
||||
\ 'graphql': '{*.graphql,*.gql,*.graphqls,}',
|
||||
\ 'groovy': '{*.gradle,}',
|
||||
\ 'grub': '{,}',
|
||||
\ 'haml': '{*.haml,*.haml.deface,*.hamlc,*.hamlbars,}',
|
||||
\ 'haproxy': '{*.cfg,haproxy.cfg,haproxy*.c*,}',
|
||||
\ 'haskell': '{*.hs,*.hs-boot,*.hsc,*.bpk,*.hsig,}',
|
||||
\ 'haxe': '{*.hx,*.hxsl,}',
|
||||
\ 'hcl': '{*.hcl,*.nomad,*.tf,*.tfvars,*.workflow,Appfile,}',
|
||||
\ 'helm': '{,}',
|
||||
\ 'help': '{,}',
|
||||
\ 'hive': '{*.q,*.hql,*.ql,}',
|
||||
\ 'html': '{*.html,*.htm,*.html.hl,*.inc,*.st,*.xht,*.xhtml,}',
|
||||
\ 'html.twig': '{*.twig,}',
|
||||
\ 'i3config': '{*.i3.config,*.i3config,i3.config,i3config,.i3.config,.i3config,}',
|
||||
\ 'icalendar': '{*.ics,}',
|
||||
\ 'idris': '{*.idr,*.lidr,idris-response,}',
|
||||
\ 'ion': '{*.ion,}',
|
||||
\ 'javascript': '{*.js,*._js,*.bones,*.cjs,*.es,*.es6,*.frag,*.gs,*.jake,*.jsb,*.jscad,*.jsfl,*.jsm,*.jss,*.mjs,*.njs,*.pac,*.sjs,*.ssjs,*.xsjs,*.xsjslib,Jakefile,}',
|
||||
\ 'javascriptreact': '{*.jsx,}',
|
||||
\ 'jinja.html': '{*.jinja,*.j2,*.jinja2,*.njk,}',
|
||||
\ 'jq': '{*.jq,.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,}',
|
||||
\ 'json5': '{*.json5,}',
|
||||
\ 'jsonnet': '{*.jsonnet,*.libsonnet,}',
|
||||
\ 'jst': '{*.ejs,*.ect,*.jst,}',
|
||||
\ 'julia': '{*.jl,}',
|
||||
\ 'kotlin': '{*.kt,*.ktm,*.kts,}',
|
||||
\ 'ledger': '{*.ldg,*.ledger,*.journal,}',
|
||||
\ 'less': '{*.less,}',
|
||||
\ 'lilypond': '{*.ly,*.ily,}',
|
||||
\ 'litcoffee': '{*.litcoffee,*.coffee.md,}',
|
||||
\ 'livescript': '{*.ls,*._ls,Slakefile,}',
|
||||
\ 'llvm': '{*.ll,}',
|
||||
\ 'log': '{*.log,*.LOG,*_log,*_LOG,}',
|
||||
\ 'lua': '{*.lua,*.fcgi,*.nse,*.p8,*.pd_lua,*.rbxs,*.rockspec,*.wlua,.luacheckrc,}',
|
||||
\ 'm4': '{*.m4,*.at,}',
|
||||
\ 'mako': '{*.mako,*.mao,}',
|
||||
\ 'markdown': '{*.md,*.markdown,*.mdown,*.mdwn,*.mdx,*.mkd,*.mkdn,*.mkdown,*.ronn,*.workbook,contents.lr,}',
|
||||
\ 'markdown.mdx': '{*.mdx,}',
|
||||
\ 'meson': '{meson.build,meson_options.txt,}',
|
||||
\ 'mma': '{*.mathematica,*.cdf,*.m,*.ma,*.mt,*.nb,*.nbp,*.wl,*.wlt,*.wls,}',
|
||||
\ 'moon': '{*.moon,}',
|
||||
\ 'murphi': '{*.m,}',
|
||||
\ 'mustache': '{*.handlebars,*.hbs,*.hulk,*.hjs,*.mustache,*.njk,*.hogan,*.hdbs,*.hb,}',
|
||||
\ 'nginx': '{*.nginx,*.nginxconf,*.vhost,nginx.conf,nginx*.conf,*nginx.conf,}',
|
||||
\ 'nim': '{*.nim,*.nim.cfg,*.nimble,*.nimrod,*.nims,nim.cfg,}',
|
||||
\ 'nix': '{*.nix,}',
|
||||
\ 'oasis': '{_oasis,}',
|
||||
\ 'objc': '{*.m,*.h,}',
|
||||
\ 'ocaml': '{*.ml,*.eliom,*.eliomi,*.ml4,*.mli,*.mll,*.mly,*.mlt,*.mlp,*.mlip,*.mli.cppo,*.ml.cppo,.ocamlinit,}',
|
||||
\ 'ocamlbuild_tags': '{_tags,}',
|
||||
\ 'ocpbuild': '{*.ocp,}',
|
||||
\ 'ocpbuildroot': '{*.root,}',
|
||||
\ 'octave': '{*.oct,*.m,}',
|
||||
\ 'omake': '{*.om,OMakefile,OMakeroot,OMakeroot.in,}',
|
||||
\ 'opam': '{*.opam,*.opam.template,opam,}',
|
||||
\ 'opencl': '{*.cl,*.opencl,}',
|
||||
\ 'perl': '{*.pl,*.al,*.cgi,*.fcgi,*.perl,*.ph,*.plx,*.pm,*.psgi,*.t,Makefile.PL,Rexfile,ack,cpanfile,}',
|
||||
\ 'php': '{*.php,*.aw,*.ctp,*.fcgi,*.inc,*.php3,*.php4,*.php5,*.phps,*.phpt,.php,.php_cs,.php_cs.dist,Phakefile,}',
|
||||
\ 'plantuml': '{*.puml,*.iuml,*.plantuml,*.uml,*.pu,}',
|
||||
\ 'pony': '{*.pony,}',
|
||||
\ 'proto': '{*.proto,}',
|
||||
\ 'ps1': '{*.ps1,*.psd1,*.psm1,*.pssc,}',
|
||||
\ 'ps1xml': '{*.ps1xml,}',
|
||||
\ 'pug': '{*.jade,*.pug,}',
|
||||
\ 'puppet': '{*.pp,Modulefile,}',
|
||||
\ 'purescript': '{*.purs,}',
|
||||
\ 'python': '{*.py,*.cgi,*.fcgi,*.gyp,*.gypi,*.lmi,*.py3,*.pyde,*.pyi,*.pyp,*.pyt,*.pyw,*.rpy,*.smk,*.spec,*.tac,*.wsgi,*.xpy,.gclient,DEPS,SConscript,SConstruct,Snakefile,wscript,}',
|
||||
\ 'qmake': '{*.pro,*.pri,}',
|
||||
\ 'qml': '{*.qml,*.qbs,}',
|
||||
\ 'r': '{*.r,*.rd,*.rsx,*.s,*.S,.Rprofile,expr-dist,}',
|
||||
\ 'racket': '{*.rkt,*.rktd,*.rktl,*.scrbl,}',
|
||||
\ 'ragel': '{*.rl,}',
|
||||
\ 'raku': '{*.6pl,*.6pm,*.nqp,*.p6,*.p6l,*.p6m,*.pl,*.pl6,*.pm,*.pm6,*.t,*.rakudoc,*.rakutest,*.raku,*.rakumod,*.pod6,*.t6,}',
|
||||
\ 'raml': '{*.raml,}',
|
||||
\ 'razor': '{*.cshtml,*.razor,}',
|
||||
\ 'reason': '{*.re,*.rei,}',
|
||||
\ 'requirements': '{*.pip,*requirements.{txt,in},*require.{txt,in},constraints.{txt,in},}',
|
||||
\ 'rhelp': '{*.rd,}',
|
||||
\ 'rst': '{*.rst,*.rest,*.rest.txt,*.rst.txt,}',
|
||||
\ 'ruby': '{*.rb,*.builder,*.eye,*.fcgi,*.gemspec,*.god,*.jbuilder,*.mspec,*.pluginspec,*.podspec,*.rabl,*.rake,*.rbi,*.rbuild,*.rbw,*.rbx,*.ru,*.ruby,*.spec,*.thor,*.watchr,*.rxml,*.rjs,*.rant,*.axlsx,*.cap,*.opal,.irbrc,.pryrc,.simplecov,Appraisals,Berksfile,Brewfile,Buildfile,Capfile,Dangerfile,Deliverfile,Fastfile,Gemfile,Gemfile.lock,Guardfile,Jarfile,Mavenfile,Podfile,Puppetfile,Rakefile,Snapfile,Thorfile,Vagrantfile,buildfile,Rantfile,.autotest,Cheffile,KitchenSink,Routefile,.Guardfile,.Brewfile,vagrantfile,[Rr]akefile*,*_spec.rb,}',
|
||||
\ 'rust': '{*.rs,*.rs.in,}',
|
||||
\ 'sbt.scala': '{*.sbt,}',
|
||||
\ 'scala': '{*.scala,*.kojo,*.sbt,*.sc,}',
|
||||
\ 'scss': '{*.scss,}',
|
||||
\ 'sexplib': '{*.sexp,}',
|
||||
\ 'sh': '{*.sh,*.bash,*.bats,*.cgi,*.command,*.env,*.fcgi,*.ksh,*.sh.in,*.tmux,*.tool,*.zsh,.bash_aliases,.bash_history,.bash_logout,.bash_profile,.bashrc,.cshrc,.env,.env.example,.flaskenv,.login,.profile,.zlogin,.zlogout,.zprofile,.zshenv,.zshrc,9fs,PKGBUILD,bash_aliases,bash_logout,bash_profile,bashrc,cshrc,gradlew,login,man,profile,zlogin,zlogout,zprofile,zshenv,zshrc,}',
|
||||
\ 'slim': '{*.slim,}',
|
||||
\ 'slime': '{*.slime,}',
|
||||
\ 'smt2': '{*.smt2,*.smt,}',
|
||||
\ 'solidity': '{*.sol,}',
|
||||
\ 'sql': '{*.pgsql,*.sql,}',
|
||||
\ 'stylus': '{*.styl,*.stylus,}',
|
||||
\ 'svelte': '{*.svelte,}',
|
||||
\ 'svg': '{*.svg,}',
|
||||
\ 'swift': '{*.swift,}',
|
||||
\ 'sxhkdrc': '{*.sxhkdrc,sxhkdrc,}',
|
||||
\ 'systemd': '{*.automount,*.mount,*.path,*.service,*.socket,*.swap,*.target,*.timer,}',
|
||||
\ 'tablegen': '{*.td,}',
|
||||
\ 'terraform': '{*.hcl,*.nomad,*.tf,*.tfvars,*.workflow,}',
|
||||
\ 'textile': '{*.textile,}',
|
||||
\ 'thrift': '{*.thrift,}',
|
||||
\ 'tmux': '{.tmux.conf,}',
|
||||
\ 'toml': '{*.toml,Cargo.lock,Gopkg.lock,poetry.lock,Pipfile,}',
|
||||
\ 'tptp': '{*.p,*.tptp,*.ax,}',
|
||||
\ 'trasys': '{*.inp,}',
|
||||
\ 'typescript': '{*.ts,}',
|
||||
\ 'typescriptreact': '{*.tsx,}',
|
||||
\ 'unison': '{*.u,*.uu,}',
|
||||
\ 'v': '{*.v,}',
|
||||
\ 'vala': '{*.vala,*.vapi,*.valadoc,}',
|
||||
\ 'vbnet': '{*.vb,*.vbhtml,}',
|
||||
\ 'vcl': '{*.vcl,}',
|
||||
\ 'velocity': '{*.vm,}',
|
||||
\ 'vmasm': '{*.mar,}',
|
||||
\ 'vue': '{*.vue,*.wpy,}',
|
||||
\ 'xdc': '{*.xdc,}',
|
||||
\ '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,*.ps1xml,*.psc1,*.pt,*.rdf,*.resx,*.rss,*.sch,*.scxml,*.sfproj,*.shproj,*.srdf,*.storyboard,*.sublime-snippet,*.targets,*.tml,*.ts,*.tsx,*.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,.classpath,.cproject,.project,App.config,NuGet.config,Settings.StyleCop,Web.Debug.config,Web.Release.config,Web.config,packages.config,}',
|
||||
\ 'xml.twig': '{*.xml.twig,}',
|
||||
\ 'xsl': '{*.xslt,*.xsl,}',
|
||||
\ 'yaml': '{*.yml,*.mir,*.reek,*.rviz,*.sublime-syntax,*.syntax,*.yaml,*.yaml-tmlanguage,*.yaml.sed,*.yml.mysql,.clang-format,.clang-tidy,.gemrc,glide.lock,yarn.lock,fish_history,fish_read_history,}',
|
||||
\ 'yaml.ansible': '{playbook.y{a,}ml,site.y{a,}ml,main.y{a,}ml,local.y{a,}ml,requirements.y{a,}ml,tasks.*.y{a,}ml,roles.*.y{a,}ml,handlers.*.y{a,}ml,}',
|
||||
\ 'yaml.docker-compose': '{docker-compose*.yaml,docker-compose*.yml,}',
|
||||
\ 'zephir': '{*.zep,}',
|
||||
\ 'zig': '{*.zig,*.zir,}',
|
||||
\ 'zir': '{*.zir,}',
|
||||
\ 'zsh': '{*.zsh,.zshrc,.zshenv,.zlogin,.zprofile,.zlogout,}',
|
||||
\}
|
||||
|
||||
func! sleuth#GlobForFiletype(type)
|
||||
return get(s:globs, a:type, '')
|
||||
endfunc
|
||||
@@ -1,4 +1,4 @@
|
||||
if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||
if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
|
||||
|
||||
vim-jsx-pretty is syntax highlight for JSX (React.js).
|
||||
(https://github.com/MaxMEllon/vim-jsx-pretty)
|
||||
|
||||
@@ -28,6 +28,9 @@ call s:SetDefault('g:markdown_enable_mappings', 0)
|
||||
" Enable jsx syntax by default
|
||||
call s:SetDefault('g:jsx_ext_required', 0)
|
||||
|
||||
" Needed for sql highlighting
|
||||
call s:SetDefault('g:javascript_sql_dialect', 'sql')
|
||||
|
||||
" Make csv loading faster
|
||||
call s:SetDefault('g:csv_start', 1)
|
||||
call s:SetDefault('g:csv_end', 2)
|
||||
@@ -215,6 +218,11 @@ if !has_key(s:disabled_packages, 'awk')
|
||||
au BufNewFile,BufRead *.awk setf awk
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'reason')
|
||||
au BufNewFile,BufRead *.rei setf reason
|
||||
au! BufNewFile,BufRead *.re call polyglot#DetectReFiletype()
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'c/c++')
|
||||
au BufNewFile,BufRead *.c setf c
|
||||
au BufNewFile,BufRead *.cats setf c
|
||||
@@ -234,9 +242,9 @@ if !has_key(s:disabled_packages, 'c/c++')
|
||||
au BufNewFile,BufRead *.inl setf cpp
|
||||
au BufNewFile,BufRead *.ino setf cpp
|
||||
au BufNewFile,BufRead *.ipp setf cpp
|
||||
au BufNewFile,BufRead *.re setf cpp
|
||||
au BufNewFile,BufRead *.tcc setf cpp
|
||||
au BufNewFile,BufRead *.tpp setf cpp
|
||||
au! BufNewFile,BufRead *.re call polyglot#DetectReFiletype()
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'caddyfile')
|
||||
@@ -573,6 +581,9 @@ if !has_key(s:disabled_packages, 'ion')
|
||||
au BufNewFile,BufRead ~/.config/ion/initrc setf ion
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'javascript-sql')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'javascript')
|
||||
au BufNewFile,BufRead *._js setf javascript
|
||||
au BufNewFile,BufRead *.bones setf javascript
|
||||
@@ -610,7 +621,6 @@ if !has_key(s:disabled_packages, 'jinja')
|
||||
au BufNewFile,BufRead *.j2 setf jinja.html
|
||||
au BufNewFile,BufRead *.jinja setf jinja.html
|
||||
au BufNewFile,BufRead *.jinja2 setf jinja.html
|
||||
au BufNewFile,BufRead *.mustache setf jinja.html
|
||||
au BufNewFile,BufRead *.njk setf jinja.html
|
||||
endif
|
||||
|
||||
@@ -869,25 +879,6 @@ if !has_key(s:disabled_packages, 'perl')
|
||||
au BufNewFile,BufRead cpanfile setf perl
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'sql')
|
||||
au BufNewFile,BufRead *.bdy setf sql
|
||||
au BufNewFile,BufRead *.ddl setf sql
|
||||
au BufNewFile,BufRead *.fnc setf sql
|
||||
au BufNewFile,BufRead *.pck setf sql
|
||||
au BufNewFile,BufRead *.pkb setf sql
|
||||
au BufNewFile,BufRead *.pks setf sql
|
||||
au BufNewFile,BufRead *.plb setf sql
|
||||
au BufNewFile,BufRead *.pls setf sql
|
||||
au BufNewFile,BufRead *.plsql setf sql
|
||||
au BufNewFile,BufRead *.prc setf sql
|
||||
au BufNewFile,BufRead *.spc setf sql
|
||||
au BufNewFile,BufRead *.sql setf sql
|
||||
au BufNewFile,BufRead *.tpb setf sql
|
||||
au BufNewFile,BufRead *.tps setf sql
|
||||
au BufNewFile,BufRead *.trg setf sql
|
||||
au BufNewFile,BufRead *.vw setf sql
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'pgsql')
|
||||
au BufNewFile,BufRead *.pgsql let b:sql_type_override='pgsql' | set ft=sql
|
||||
au BufNewFile,BufRead *.sql let b:sql_type_override='pgsql' | set ft=sql
|
||||
@@ -1059,11 +1050,6 @@ if !has_key(s:disabled_packages, 'razor')
|
||||
au BufNewFile,BufRead *.razor setf razor
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'reason')
|
||||
au BufNewFile,BufRead *.re setf reason
|
||||
au BufNewFile,BufRead *.rei setf reason
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'rst')
|
||||
au BufNewFile,BufRead *.rest setf rst
|
||||
au BufNewFile,BufRead *.rest.txt setf rst
|
||||
@@ -1278,6 +1264,7 @@ endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'terraform')
|
||||
au BufNewFile,BufRead *.hcl setf terraform
|
||||
au BufNewFile,BufRead *.nomad setf terraform
|
||||
au BufNewFile,BufRead *.tf setf terraform
|
||||
au BufNewFile,BufRead *.tfvars setf terraform
|
||||
au BufNewFile,BufRead *.workflow setf terraform
|
||||
@@ -1391,6 +1378,7 @@ if !has_key(s:disabled_packages, 'xml')
|
||||
au BufNewFile,BufRead *.gml setf xml
|
||||
au BufNewFile,BufRead *.gmx setf xml
|
||||
au BufNewFile,BufRead *.grxml setf xml
|
||||
au BufNewFile,BufRead *.gst setf xml
|
||||
au BufNewFile,BufRead *.iml setf xml
|
||||
au BufNewFile,BufRead *.ivy setf xml
|
||||
au BufNewFile,BufRead *.jelly setf xml
|
||||
|
||||
@@ -55,3 +55,11 @@ rules:
|
||||
filetype: glsl
|
||||
- override: "g:filetype_fs"
|
||||
- filetype: forth
|
||||
---
|
||||
extensions: [re]
|
||||
rules:
|
||||
- lines: 50
|
||||
rules:
|
||||
- pattern: '^\s*#(?:(?:if|ifdef|define|pragma)\s+\w|\s*include\s+[<"]|template\s*<)'
|
||||
filetype: cpp
|
||||
- filetype: reason
|
||||
|
||||
@@ -773,6 +773,11 @@ filetypes:
|
||||
extensions:
|
||||
- flow
|
||||
---
|
||||
name: javascript-sql
|
||||
remote: statico/vim-javascript-sql
|
||||
after: javascript
|
||||
filetypes: []
|
||||
---
|
||||
name: jenkins
|
||||
remote: martinda/Jenkinsfile-vim-syntax
|
||||
filetypes:
|
||||
@@ -1086,17 +1091,6 @@ filetypes:
|
||||
- name: perl
|
||||
linguist: Perl
|
||||
---
|
||||
name: sql
|
||||
remote: shmup/vim-sql-syntax
|
||||
filetypes:
|
||||
- name: sql
|
||||
linguist: PLSQL
|
||||
ignored_extensions:
|
||||
# Handled by cql plugin
|
||||
- cql
|
||||
# Handled by pgsql plugin
|
||||
- pgsql
|
||||
---
|
||||
name: pgsql
|
||||
remote: lifepillar/pgsql.vim
|
||||
filetypes:
|
||||
@@ -1282,6 +1276,7 @@ filetypes:
|
||||
---
|
||||
name: reason
|
||||
remote: reasonml-editor/vim-reason-plus
|
||||
after: c/c++
|
||||
filetypes:
|
||||
- name: reason
|
||||
linguist: Reason
|
||||
|
||||
164
plugin/sleuth.vim
Normal file
164
plugin/sleuth.vim
Normal file
@@ -0,0 +1,164 @@
|
||||
" Heuristically set buffer options
|
||||
"
|
||||
" Modified version of vim-sleuth:
|
||||
" - softtab and tabstop reduced from 8 to 2
|
||||
" - number of considered lines reduced from 1024 to 64
|
||||
" - maximum 6 other files are checked instead of 20
|
||||
" - check maximum of files 2 per directory level instead of 8
|
||||
" - maximum of 3 directory levels are checked
|
||||
" - globs are concatenated for performance
|
||||
|
||||
if exists("g:loaded_sleuth") || v:version < 700 || &cp
|
||||
finish
|
||||
endif
|
||||
let g:loaded_sleuth = 1
|
||||
|
||||
function! s:guess(lines) abort
|
||||
let options = {}
|
||||
let heuristics = {'spaces': 0, 'hard': 0, 'soft': 0}
|
||||
let ccomment = 0
|
||||
let podcomment = 0
|
||||
let triplequote = 0
|
||||
let backtick = 0
|
||||
let xmlcomment = 0
|
||||
let softtab = repeat(' ', 2)
|
||||
|
||||
for line in a:lines
|
||||
if !len(line) || line =~# '^\s*$'
|
||||
continue
|
||||
endif
|
||||
|
||||
if line =~# '^\s*/\*'
|
||||
let ccomment = 1
|
||||
endif
|
||||
if ccomment
|
||||
if line =~# '\*/'
|
||||
let ccomment = 0
|
||||
endif
|
||||
continue
|
||||
endif
|
||||
|
||||
if line =~# '^=\w'
|
||||
let podcomment = 1
|
||||
endif
|
||||
if podcomment
|
||||
if line =~# '^=\%(end\|cut\)\>'
|
||||
let podcomment = 0
|
||||
endif
|
||||
continue
|
||||
endif
|
||||
|
||||
if triplequote
|
||||
if line =~# '^[^"]*"""[^"]*$'
|
||||
let triplequote = 0
|
||||
endif
|
||||
continue
|
||||
elseif line =~# '^[^"]*"""[^"]*$'
|
||||
let triplequote = 1
|
||||
endif
|
||||
|
||||
if backtick
|
||||
if line =~# '^[^`]*`[^`]*$'
|
||||
let backtick = 0
|
||||
endif
|
||||
continue
|
||||
elseif &filetype ==# 'go' && line =~# '^[^`]*`[^`]*$'
|
||||
let backtick = 1
|
||||
endif
|
||||
|
||||
if line =~# '^\s*<\!--'
|
||||
let xmlcomment = 1
|
||||
endif
|
||||
if xmlcomment
|
||||
if line =~# '-->'
|
||||
let xmlcomment = 0
|
||||
endif
|
||||
continue
|
||||
endif
|
||||
|
||||
if line =~# '^\t'
|
||||
let heuristics.hard += 1
|
||||
elseif line =~# '^' . softtab
|
||||
let heuristics.soft += 1
|
||||
endif
|
||||
if line =~# '^ '
|
||||
let heuristics.spaces += 1
|
||||
endif
|
||||
let indent = len(matchstr(substitute(line, '\t', softtab, 'g'), '^ *'))
|
||||
if indent > 1 && (indent < 4 || indent % 2 == 0) &&
|
||||
\ get(options, 'shiftwidth', 99) > indent
|
||||
let options.shiftwidth = indent
|
||||
endif
|
||||
endfor
|
||||
|
||||
if heuristics.hard && !heuristics.spaces
|
||||
return {'expandtab': 0, 'shiftwidth': &tabstop}
|
||||
elseif heuristics.soft != heuristics.hard
|
||||
let options.expandtab = heuristics.soft > heuristics.hard
|
||||
if heuristics.hard
|
||||
let options.tabstop = 2
|
||||
endif
|
||||
endif
|
||||
|
||||
return options
|
||||
endfunction
|
||||
|
||||
function! s:apply_if_ready(options) abort
|
||||
if !has_key(a:options, 'expandtab') || !has_key(a:options, 'shiftwidth')
|
||||
return 0
|
||||
else
|
||||
for [option, value] in items(a:options)
|
||||
call setbufvar('', '&'.option, value)
|
||||
endfor
|
||||
return 1
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:detect() abort
|
||||
if &buftype ==# 'help'
|
||||
return
|
||||
endif
|
||||
|
||||
let options = s:guess(getline(1, 64))
|
||||
if s:apply_if_ready(options)
|
||||
return
|
||||
endif
|
||||
let c = 6
|
||||
let pattern = c > 0 ? sleuth#GlobForFiletype(&filetype) : ''
|
||||
let dir = expand('%:p:h')
|
||||
let level = 3
|
||||
while isdirectory(dir) && dir !=# fnamemodify(dir, ':h') && c > 0 && level > 0
|
||||
let level -= 1
|
||||
for neighbor in glob(dir.'/'.pattern,0,1)[0:1]
|
||||
if neighbor !=# expand('%:p') && filereadable(neighbor)
|
||||
call extend(options, s:guess(readfile(neighbor, '', 32)), 'keep')
|
||||
let c -= 1
|
||||
endif
|
||||
if s:apply_if_ready(options)
|
||||
let b:sleuth_culprit = neighbor
|
||||
return
|
||||
endif
|
||||
if c <= 0
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
if c <= 0
|
||||
break
|
||||
endif
|
||||
let dir = fnamemodify(dir, ':h')
|
||||
endwhile
|
||||
if has_key(options, 'shiftwidth')
|
||||
return s:apply_if_ready(extend({'expandtab': 1}, options))
|
||||
endif
|
||||
endfunction
|
||||
|
||||
setglobal smarttab
|
||||
|
||||
if !exists('g:did_indent_on')
|
||||
filetype indent on
|
||||
endif
|
||||
|
||||
augroup polyglot
|
||||
autocmd!
|
||||
autocmd FileType * call s:detect()
|
||||
augroup END
|
||||
@@ -156,7 +156,7 @@ def copy_file(package, src, dest)
|
||||
open(src, "r") do |input|
|
||||
open(dest, "a+") do |output|
|
||||
if name == "jsx"
|
||||
output << "if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)\n\n"
|
||||
output << "if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)\n\n"
|
||||
else
|
||||
output << "if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, '#{name}') == -1\n\n"
|
||||
end
|
||||
@@ -202,9 +202,17 @@ def indent(str, amount)
|
||||
end
|
||||
|
||||
def pattern_to_condition(rule)
|
||||
if rule.has_key?("or")
|
||||
return rule["or"].map { |p| pattern_to_condition(p) }.join(" || ")
|
||||
end
|
||||
|
||||
if rule.has_key?("or")
|
||||
return rule["and"].map { |p| pattern_to_condition(p) }.join(" && ")
|
||||
end
|
||||
|
||||
operator = (rule["negative"] ? "!" : "=") + "~" + (rule["ignore_case"] ? "?" : "#")
|
||||
|
||||
"line #{operator} '#{rule["pattern"]}'"
|
||||
return "line #{operator} '#{rule["pattern"]}'"
|
||||
end
|
||||
|
||||
def rules_to_code(rules)
|
||||
@@ -250,10 +258,10 @@ def rule_to_code(rule)
|
||||
return rule["rules"].map { |r| indent(rule_to_code(r), 0) }.join("\n")
|
||||
end
|
||||
|
||||
if rule.has_key?("pattern")
|
||||
if rule.has_key?("pattern") || rule.has_key?("or") || rule.has_key?("and")
|
||||
return <<~EOS
|
||||
if #{pattern_to_condition(rule)}
|
||||
#{indent(rule_to_code(except(rule, "pattern", "ignore_case", "negative")), 2)}
|
||||
#{indent(rule_to_code(except(rule, "pattern", "or", "and", "ignore_case", "negative")), 2)}
|
||||
endif
|
||||
EOS
|
||||
end
|
||||
@@ -391,6 +399,9 @@ def generate_ftdetect(packages, heuristics)
|
||||
" Enable jsx syntax by default
|
||||
call s:SetDefault('g:jsx_ext_required', 0)
|
||||
|
||||
" Needed for sql highlighting
|
||||
call s:SetDefault('g:javascript_sql_dialect', 'sql')
|
||||
|
||||
" Make csv loading faster
|
||||
call s:SetDefault('g:csv_start', 1)
|
||||
call s:SetDefault('g:csv_end', 2)
|
||||
@@ -705,6 +716,39 @@ def detect_filetypes
|
||||
}]
|
||||
end
|
||||
|
||||
def generate_plugins(packages)
|
||||
FileUtils.mkdir_p('autoload/polyglot')
|
||||
|
||||
output = "let s:globs = {\n"
|
||||
|
||||
patterns = Hash.new { |h, k| h[k] = [] }
|
||||
|
||||
for package in packages
|
||||
for filetype in package["filetypes"]
|
||||
extensions = (filetype["extensions"] || []).map { |e| "*.#{e}" }
|
||||
files = (filetype["filenames"] || []).reject { |e| e.match(/\*\*|\//) }
|
||||
patterns[filetype["name"]].concat(extensions)
|
||||
patterns[filetype["name"]].concat(files)
|
||||
end
|
||||
end
|
||||
|
||||
for filetype in patterns.keys.sort
|
||||
output << " \\ '#{filetype}': '{#{patterns[filetype].uniq.join(",")},}',\n"
|
||||
end
|
||||
output << " \\}\n\n"
|
||||
|
||||
|
||||
output << <<~EOS
|
||||
func! sleuth#GlobForFiletype(type)
|
||||
return get(s:globs, a:type, '')
|
||||
endfunc
|
||||
EOS
|
||||
|
||||
|
||||
File.write('autoload/sleuth.vim', output)
|
||||
end
|
||||
|
||||
|
||||
if __FILE__ == $0
|
||||
if !ENV["DEV"]
|
||||
FileUtils.rm_rf("tmp")
|
||||
@@ -714,6 +758,7 @@ if __FILE__ == $0
|
||||
download(packages)
|
||||
extract(packages)
|
||||
generate_ftdetect(packages, heuristics)
|
||||
generate_plugins(packages)
|
||||
generate_tests(packages)
|
||||
puts(" Bye! Have a wonderful time!")
|
||||
|
||||
|
||||
@@ -207,3 +207,10 @@ call TestExtension('fsharp', 'fsharp.fs', "let myInt = 5")
|
||||
call TestExtension('glsl', 'glsl.fs', "//#version 120\nvoid main() {}")
|
||||
let g:filetype_fs = 'fizfuz'
|
||||
call TestExtension('fizfuz', 'fizfuz.fs', '')
|
||||
|
||||
" .re extension
|
||||
call TestExtension('reason', 'empty.re', '')
|
||||
call TestExtension('cpp', 'cpp.re', '#include "config.h"')
|
||||
call TestExtension('cpp', 'cpp2.re', '#ifdef HAVE_CONFIG_H')
|
||||
call TestExtension('cpp', 'cpp3.re', '#define YYCTYPE unsigned char')
|
||||
call TestExtension('reason', 'react.re', 'ReasonReact.Router.push("");')
|
||||
|
||||
@@ -44,6 +44,7 @@ call TestFiletype('atlas')
|
||||
call TestFiletype('autoit')
|
||||
call TestFiletype('ave')
|
||||
call TestFiletype('awk')
|
||||
call TestFiletype('reason')
|
||||
call TestFiletype('c')
|
||||
call TestFiletype('cpp')
|
||||
call TestFiletype('caddyfile')
|
||||
@@ -152,7 +153,6 @@ call TestFiletype('sexplib')
|
||||
call TestFiletype('opencl')
|
||||
call TestFiletype('perl')
|
||||
call TestFiletype('sql')
|
||||
call TestFiletype('sql')
|
||||
call TestFiletype('cql')
|
||||
call TestFiletype('blade')
|
||||
call TestFiletype('php')
|
||||
@@ -176,7 +176,6 @@ call TestFiletype('ragel')
|
||||
call TestFiletype('raku')
|
||||
call TestFiletype('raml')
|
||||
call TestFiletype('razor')
|
||||
call TestFiletype('reason')
|
||||
call TestFiletype('rst')
|
||||
call TestFiletype('ruby')
|
||||
call TestFiletype('eruby')
|
||||
|
||||
266
syntax/sql.vim
266
syntax/sql.vim
@@ -1,266 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sql') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: SQL with SQLite and other additions.
|
||||
" Maintainer: Jessica K McIntosh AT gmail DOT com
|
||||
" Last Changed: Thu Jan 23 06:00 PM 2014 EST
|
||||
|
||||
" More complete SQL matching with error reporting.
|
||||
" Only matches types inside 'CREATE TABLE ();'.
|
||||
" Highlights functions. Unknown functions are an error.
|
||||
" Based on the SQL syntax files that come with Vim.
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn case ignore
|
||||
|
||||
" All non-contained SQL syntax.
|
||||
syn cluster sqlALL contains=TOP
|
||||
|
||||
" Various error conditions.
|
||||
"syn match sqlError "\<\w\+(" " Not a known function.
|
||||
syn match sqlError ")" " Lonely closing paren.
|
||||
syn match sqlError ",\(\_\s*[;)]\)\@=" " Comma before a paren or semicolon.
|
||||
syn match sqlError " $" " Space at the end of a line.
|
||||
" Comma before certain words.
|
||||
syn match sqlError ",\_\s*\(\<\(asc\|desc\|exists\|for\|from\)\>\)\@="
|
||||
syn match sqlError ",\_\s*\(\<\(group by\|into\|limit\|order\)\>\)\@="
|
||||
syn match sqlError ",\_\s*\(\<\(table\|using\|where\)\>\)\@="
|
||||
|
||||
" Special words.
|
||||
syn keyword sqlSpecial false null true
|
||||
|
||||
" Keywords
|
||||
syn keyword sqlKeyword access add after aggregate as asc authorization
|
||||
syn keyword sqlKeyword begin by cache cascade check cluster collate
|
||||
syn keyword sqlKeyword collation column compress conflict connect connection
|
||||
syn keyword sqlKeyword constraint current cursor database debug decimal
|
||||
syn keyword sqlKeyword default desc each else elsif escape exception
|
||||
syn keyword sqlKeyword exclusive explain external file for foreign from function
|
||||
syn keyword sqlKeyword group having identified if immediate increment index
|
||||
syn keyword sqlKeyword initial inner into is join key left level loop
|
||||
syn keyword sqlKeyword maxextents mode modify nocompress nowait object of
|
||||
syn keyword sqlKeyword off offline on online option order outer pctfree
|
||||
syn keyword sqlKeyword primary privileges procedure public references
|
||||
syn keyword sqlKeyword referencing release resource return role row rowid
|
||||
syn keyword sqlKeyword rowlabel rownum rows schema session share size
|
||||
syn keyword sqlKeyword start successful synonym then to transaction trigger
|
||||
syn keyword sqlKeyword uid user using validate values view virtual whenever
|
||||
syn keyword sqlKeyword where with
|
||||
syn match sqlKeyword "\<prompt\>"
|
||||
syn match sqlKeyword "\<glob\>"
|
||||
" Do special things with CREATE TABLE ( below.
|
||||
syn match sqlKeyword "\<table\>"
|
||||
|
||||
" SQLite Pragmas - Treat them as keywords.
|
||||
syn keyword sqlKeyword auto_vacuum automatic_index cache_size
|
||||
syn keyword sqlKeyword case_sensitive_like checkpoint_fullfsync
|
||||
syn keyword sqlKeyword collation_list compile_options count_changes
|
||||
syn keyword sqlKeyword database_list default_cache_size
|
||||
syn keyword sqlKeyword empty_result_callbacks encoding foreign_key_list
|
||||
syn keyword sqlKeyword foreign_keys freelist_count full_column_names
|
||||
syn keyword sqlKeyword fullfsync ignore_check_constraints
|
||||
syn keyword sqlKeyword incremental_vacuum index_info index_list
|
||||
syn keyword sqlKeyword integrity_check journal_mode journal_size_limit
|
||||
syn keyword sqlKeyword legacy_file_format locking_mode max_page_count
|
||||
syn keyword sqlKeyword page_count page_size parser_trace quick_check
|
||||
syn keyword sqlKeyword read_uncommitted recursive_triggers
|
||||
syn keyword sqlKeyword reverse_unordered_selects schema_version
|
||||
syn keyword sqlKeyword secure_delete short_column_names synchronous
|
||||
syn keyword sqlKeyword table_info temp_store temp_store_directory
|
||||
syn keyword sqlKeyword user_version vdbe_listing vdbe_trace
|
||||
syn keyword sqlKeyword wal_autocheckpoint wal_checkpoint writable_schema
|
||||
|
||||
" Operators
|
||||
syn keyword sqlOperator all and any between case distinct elif else end
|
||||
syn keyword sqlOperator exit exists if in intersect is like match matches
|
||||
syn keyword sqlOperator minus not or out prior regexp some then union
|
||||
syn keyword sqlOperator unique when
|
||||
syn match sqlOperator "||\|:="
|
||||
|
||||
" Conditionals
|
||||
syn match sqlConditional "=\|<\|>\|+\|-"
|
||||
|
||||
" Unknown functions.
|
||||
syn match sqlUnknownFunc "\<\w\+(\@="
|
||||
|
||||
" Functions - Only valid with a '(' after them.
|
||||
syn match sqlFunction "\<\(abs\|acos\|asin\|atan2\?\|avg\|cardinality\)(\@="
|
||||
syn match sqlFunction "\<\(cast\|changes\|char_length\|character_length\)(\@="
|
||||
syn match sqlFunction "\<\(coalesce\|concat\|cos\|count\|\(date\)\?\(time\)\?\)(\@="
|
||||
syn match sqlFunction "\<\(exp\|filetoblob\|filetoclob\|floor\|glob\|group_concat\)(\@="
|
||||
syn match sqlFunction "\<\(hex\|ifnull\|initcap\|isnull\|julianday\|last_insert_rowid\)(\@="
|
||||
syn match sqlFunction "\<\(length\|log10\|logn\|lower\|lpad\|ltrin\|max\|min\)(\@="
|
||||
syn match sqlFunction "\<\(mod\|nullif\|octet_length\|pow\|quote\|random\)(\@="
|
||||
syn match sqlFunction "\<\(range\|replace\|root\|round\|rpad\|sin\|soundex\)(\@="
|
||||
syn match sqlFunction "\<\(sqrtstdev\|strftime\|substr\|substring\|sum\|sysdate\|tan\)(\@="
|
||||
syn match sqlFunction "\<\(to_char\|to_date\|to_number\|total\|trim\|trunc\|typeof\)(\@="
|
||||
syn match sqlFunction "\<\(upper\|variance\)(\@="
|
||||
|
||||
" Oracle DBMS functions.
|
||||
syn match sqlFunction "\<dbms_\w\+\.\w\+(\@="
|
||||
|
||||
" Oracle Exception Functions.
|
||||
syn match sqlFunction "\<raise_application_error(\@="
|
||||
|
||||
" SQLite Functions
|
||||
syn match sqlFunction "\<\(last_insert_rowid\|load_extension\|randomblob\)(\@="
|
||||
syn match sqlFunction "\<\(sqlite_compileoption_get\|sqlite_compileoption_used\)(\@="
|
||||
syn match sqlFunction "\<\(sqlite_source_id\|sqlite_version\|sqlite_version\)(\@="
|
||||
syn match sqlFunction "\<\(zeroblob\|ltrim\|rtrim\)(\@="
|
||||
|
||||
" SQLite Command Line Client Functions
|
||||
syn match sqlFunction "^\.\w\+"
|
||||
|
||||
" Statements
|
||||
syn keyword sqlStatement alter analyze audit begin comment commit delete
|
||||
syn keyword sqlStatement drop execute explain grant insert lock noaudit
|
||||
syn keyword sqlStatement rename revoke rollback savepoint select
|
||||
syn keyword sqlStatement truncate update vacuum
|
||||
syn match sqlStatement "\<\(replace\|create\)\>"
|
||||
|
||||
" SQLite Statements
|
||||
syn keyword sqlStatement attach detach indexed pragma reindex
|
||||
|
||||
" Types - Only matched inside 'CREATE TABLE ();'.
|
||||
syn keyword sqlType contained bigint bit blob bool boolean byte char
|
||||
syn keyword sqlType contained clob date datetime dec decimal enum
|
||||
syn keyword sqlType contained float int int8 integer interval long
|
||||
syn keyword sqlType contained longblob longtext lvarchar mediumblob
|
||||
syn keyword sqlType contained mediumint mediumtext mlslabel money
|
||||
syn keyword sqlType contained multiset nchar number numeric nvarchar
|
||||
syn keyword sqlType contained raw real rowid serial serial8 set
|
||||
syn keyword sqlType contained smallfloat smallint text time
|
||||
syn keyword sqlType contained timestamp tinyblob tinyint tinytext
|
||||
syn keyword sqlType contained varchar varchar2 varray year
|
||||
syn match sqlType contained "\<\(character\|double\|varying\)\>"
|
||||
syn match sqlType contained "\<character\s\+varying\>"
|
||||
syn match sqlType contained "\<double\s\+precision\>"
|
||||
|
||||
" Oracle Variables
|
||||
syn match sqlVariable "&\a\w\+"
|
||||
syn match sqlVariable ":\w\+"
|
||||
syn match sqlVariable "SQL%\w\+"
|
||||
|
||||
" Strings
|
||||
syn region sqlString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=sqlVariable
|
||||
syn region sqlString start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=sqlVariable
|
||||
syn region sqlString start=+`+ skip=+\\\\\|\\`+ end=+`+ contains=sqlVariable
|
||||
|
||||
" Numbers
|
||||
syn match sqlNumber "-\=\<[0-9]*\>"
|
||||
syn match sqlNumber "-\=\<[0-9]*\.[0-9]*\>"
|
||||
syn match sqlNumber "-\=\<[0-9][0-9]*e[+-]\=[0-9]*\>"
|
||||
syn match sqlNumber "-\=\<[0-9]*\.[0-9]*e[+-]\=[0-9]*\>"
|
||||
syn match sqlNumber "\<0x[abcdef0-9]*\>"
|
||||
|
||||
" Todo
|
||||
syn keyword sqlTodo contained DEBUG FIXME NOTE TODO XXX
|
||||
|
||||
" Comments
|
||||
syn region sqlComment start="/\*" end="\*/" contains=sqlTodo
|
||||
syn match sqlComment "--.*$" contains=sqlTodo
|
||||
syn match sqlComment "\(^\|\s\)rem.*$" contains=sqlTodo
|
||||
|
||||
" Mark correct paren use. Different colors for different purposes.
|
||||
syn region sqlParens transparent matchgroup=sqlParen start="(" end=")"
|
||||
syn match sqlParenEmpty "()"
|
||||
syn region sqlParens transparent matchgroup=sqlParenFunc start="\(\<\w\+\>\)\@<=(" end=")"
|
||||
|
||||
" Highlight types correctly inside create table and procedure statements.
|
||||
" All other SQL is properly highlighted as well.
|
||||
syn region sqlTypeParens contained matchgroup=sqlType start="(" end=")" contains=@sqlALL
|
||||
syn match sqlTypeMatch contained "\(\(^\|[,(]\)\s*\S\+\s\+\)\@<=\w\+\(\s*([^)]\+)\)\?" contains=sqlType,sqlTypeParens
|
||||
syn match sqlTypeMatch contained "\(\(^\|[,(]\)\s*\S\+\s\+\)\@<=character\s\+varying\s*([^)]\+)" contains=sqlType,sqlTypeParens
|
||||
syn region sqlTypeRegion matchgroup=sqlParen start="\(create\s\+table\s\+[^(]\+\s\+\)\@<=(" end=")" contains=@sqlALL,sqlTypeMatch
|
||||
syn region sqlTypeRegion matchgroup=sqlParen start="\(create\s\+\(or\s\+replace\s\+\)\?procedure\s\+[^(]\+\s*\)\@<=(" end=")" contains=@sqlALL,sqlTypeMatch
|
||||
|
||||
" SQL Embedded in a statement.
|
||||
syn region sqlquoteRegion matchgroup=sqlParen start="\(execute\s\+immediate\s*\)\@<=('" end="')" contains=@sqlALL
|
||||
|
||||
" Special Oracle Statements
|
||||
syn match sqlStatement "^\s*\(prompt\|spool\)\>" nextgroup=sqlAnyString
|
||||
syn match sqlStatement "^\s*accept\s\+" nextgroup=sqlAnyVariable
|
||||
syn match sqlStatement "declare\s\+" nextgroup=sqlDeclare
|
||||
syn region sqlDeclare contained matchgroup=sqlVariable start="\a\w\+" end="$" contains=@sqlALL,sqlType
|
||||
syn match sqlOperator "^@" nextgroup=sqlAnyString
|
||||
syn match sqlAnyVariable contained "\a\w\+"
|
||||
syn match sqlAnyString contained ".*" contains=sqlVariable
|
||||
|
||||
syn region sqlSetRegion matchgroup=sqlStatement start="^\s*set\>" matchgroup=NONE end="$" contains=sqlSetOptions,sqlSetValues
|
||||
syn keyword sqlSetOptions contained autorecovery colsep copytypecheck describe escchar flagger
|
||||
syn keyword sqlSetOptions contained instance logsource long null recsep recsepchar
|
||||
syn keyword sqlSetOptions contained
|
||||
syn match sqlSetOptions contained "\<\(app\w*\|array\w*\|auto\w*\|autop\w*\)\>"
|
||||
syn match sqlSetOptions contained "\<\(autot\w*\|blo\w*\|cmds\w*\|con\w*\|copyc\w*\)\>"
|
||||
syn match sqlSetOptions contained "\<\(def\w*\|echo\|editf\w*\|emb\w*\|errorl\w*\|esc\w*\)\>"
|
||||
syn match sqlSetOptions contained "\<\(feed\w*\|flu\w*\|hea\w*\|heads\w*\|lin\w*\)\>"
|
||||
syn match sqlSetOptions contained "\<\(lobof\w*\|longc\w*\|mark\w*\|newp\w*\|numf\w*\)\>"
|
||||
syn match sqlSetOptions contained "\<\(pages\w*\|pau\w*\|serverout\w*\|shift\w*\|show\w*\)\>"
|
||||
syn match sqlSetOptions contained "\<\(sqlbl\w*\|sqlc\w*\|sqlco\w*\|sqln\w*\|sqlpluscompat\w*\)\>"
|
||||
syn match sqlSetOptions contained "\<\(sqlpre\w*\|sqlp\w*\|sqlt\w*\|suf\w*\|tab\)\>"
|
||||
syn match sqlSetOptions contained "\<\(term\w*\|timi\w*\|und\w*\|ver\w*\|wra\w\?\)\>"
|
||||
syn match sqlSetOptions contained "\<\(xquery\s\+\(baseuri\|ordering\|node\|context\)\)\>"
|
||||
syn keyword sqlSetValues contained all body byreference byvalue default
|
||||
syn keyword sqlSetValues contained entry fill head html identifier indent
|
||||
syn keyword sqlSetValues contained linenum local none off on size table truncate
|
||||
syn match sqlSetValues contained "\<\(ea\w*\|wr\w*\|imm\w*\|trace\w*\|expl\w*\|stat\w*\)\>"
|
||||
syn match sqlSetValues contained "\<\(intermed\w*\|pre\w*\|unl\w*\|for\w*\|wra\w*\|wor\w\?\)\>"
|
||||
syn match sqlSetValues contained "\<\(vis\w*\|inv\w*\)\>"
|
||||
syn match sqlSetValues contained "\<\(\(un\)\?ordered\)\>"
|
||||
|
||||
" Stolen from sh.vim.
|
||||
if !exists("sh_minlines")
|
||||
let sh_minlines = 200
|
||||
endif
|
||||
if !exists("sh_maxlines")
|
||||
let sh_maxlines = 2 * sh_minlines
|
||||
endif
|
||||
exec "syn sync minlines=" . sh_minlines . " maxlines=" . sh_maxlines
|
||||
|
||||
" Define the default highlighting.
|
||||
" For version 5.7 and earlier: only when not done already
|
||||
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
||||
if version >= 508 || !exists("did_sql_syn_inits")
|
||||
if version < 508
|
||||
let did_sql_syn_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
HiLink sqlComment Comment
|
||||
HiLink sqlError Error
|
||||
HiLink sqlFunction Function
|
||||
HiLink sqlUnknownFunc Exception
|
||||
HiLink sqlKeyword Special
|
||||
HiLink sqlConditional Conditional
|
||||
HiLink sqlNumber Number
|
||||
HiLink sqlOperator Operator
|
||||
HiLink sqlParen Comment
|
||||
HiLink sqlParenEmpty Operator
|
||||
HiLink sqlParenFunc Function
|
||||
HiLink sqlSpecial Keyword
|
||||
HiLink sqlStatement Statement
|
||||
HiLink sqlString String
|
||||
HiLink sqlTodo Todo
|
||||
HiLink sqlType Type
|
||||
HiLink sqlVariable Identifier
|
||||
|
||||
HiLink sqlAnyString sqlString
|
||||
HiLink sqlAnyVariable sqlVariable
|
||||
HiLink sqlSetOptions Operator
|
||||
HiLink sqlSetValues Special
|
||||
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "sql"
|
||||
|
||||
endif
|
||||
Reference in New Issue
Block a user