diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2021-06-27 10:07:29 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2021-06-27 10:07:29 +0200 |
commit | 4f5388350be1052f610b830c8fce8fbc17370ec6 (patch) | |
tree | 425cb8ee70c123233055a61d56d73e2eb97536db /autoload/polyglot | |
parent | 4899585281beab51e5dff1d9ae4d3159244a8275 (diff) | |
download | vim-polyglot-4f5388350be1052f610b830c8fce8fbc17370ec6.tar.gz vim-polyglot-4f5388350be1052f610b830c8fce8fbc17370ec6.zip |
Update
Diffstat (limited to 'autoload/polyglot')
-rw-r--r-- | autoload/polyglot/ft.vim | 11 | ||||
-rw-r--r-- | autoload/polyglot/sleuth.vim | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/autoload/polyglot/ft.vim b/autoload/polyglot/ft.vim index f872bf9c..2e4c1f69 100644 --- a/autoload/polyglot/ft.vim +++ b/autoload/polyglot/ft.vim @@ -172,6 +172,17 @@ func polyglot#ft#FTent() setf dtd endfunc +func polyglot#ft#ExCheck() + let lines = getline(1, min([line("$"), 100])) + if exists('g:filetype_euphoria') + exe 'setf ' . g:filetype_euphoria + elseif match(lines, '^--\|^ifdef\>\|^include\>') > -1 + setf euphoria3 + else + setf elixir + endif +endfunc + func polyglot#ft#EuphoriaCheck() if exists('g:filetype_euphoria') exe 'setf ' . g:filetype_euphoria diff --git a/autoload/polyglot/sleuth.vim b/autoload/polyglot/sleuth.vim index 0785dfbf..d308561c 100644 --- a/autoload/polyglot/sleuth.vim +++ b/autoload/polyglot/sleuth.vim @@ -257,7 +257,7 @@ let s:globs = { \ 'jam': '*.jpl,*.jpr,Prl*.*,JAM*.*', \ 'java': '*.java,*.jav', \ 'javacc': '*.jj,*.jjt', - \ 'javascript': '*.js,*._js,*.bones,*.cjs,*.es,*.es6,*.frag,*.gs,*.jake,*.jsb,*.jscad,*.jsfl,*.jsm,*.jss,*.jsx,*.mjs,*.njs,*.pac,*.sjs,*.ssjs,*.xsjs,*.xsjslib,*.javascript,Jakefile', + \ 'javascript': '*.js,*._js,*.bones,*.cjs,*.es,*.es6,*.frag,*.gs,*.jake,*.javascript,*.jsb,*.jscad,*.jsfl,*.jsm,*.jss,*.jsx,*.mjs,*.njs,*.pac,*.sjs,*.ssjs,*.xsjs,*.xsjslib,Jakefile', \ 'javascriptreact': '*.jsx', \ 'jess': '*.clp', \ 'jgraph': '*.jgr', |