mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Add heuristics for .h extension
This commit is contained in:
@@ -154,6 +154,25 @@ func! polyglot#DetectAspFiletype()
|
|||||||
setf aspvbs | return
|
setf aspvbs | return
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func! polyglot#DetectHFiletype()
|
||||||
|
for lnum in range(1, min([line("$"), 200]))
|
||||||
|
let line = getline(lnum)
|
||||||
|
if line =~# '^\s*\(@\(interface\|class\|protocol\|property\|end\|synchronised\|selector\|implementation\)\(\<\|\>\)\|#import\s\+.\+\.h[">]\)'
|
||||||
|
if exists("g:c_syntax_for_h")
|
||||||
|
setf objc | return
|
||||||
|
endif
|
||||||
|
setf objcpp | return
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
if exists("g:c_syntax_for_h")
|
||||||
|
setf c | return
|
||||||
|
endif
|
||||||
|
if exists("g:ch_syntax_for_h")
|
||||||
|
setf ch | return
|
||||||
|
endif
|
||||||
|
setf cpp | return
|
||||||
|
endfunc
|
||||||
|
|
||||||
func! polyglot#DetectMFiletype()
|
func! polyglot#DetectMFiletype()
|
||||||
let saw_comment = 0
|
let saw_comment = 0
|
||||||
for lnum in range(1, min([line("$"), 100]))
|
for lnum in range(1, min([line("$"), 100]))
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ let s:globs = {
|
|||||||
\ 'abc': '*.abc',
|
\ 'abc': '*.abc',
|
||||||
\ 'abel': '*.abl',
|
\ 'abel': '*.abl',
|
||||||
\ 'acedb': '*.wrm',
|
\ 'acedb': '*.wrm',
|
||||||
\ 'ada': '*.adb,*.ads,*.ada,*.gpr',
|
\ 'ada': '*.adb,*.ads,*.ada,*.adc,*.gpr,*.ada_m',
|
||||||
\ 'ahdl': '*.tdf',
|
\ 'ahdl': '*.tdf',
|
||||||
\ 'aidl': '*.aidl',
|
\ 'aidl': '*.aidl',
|
||||||
\ 'alsaconf': '',
|
\ 'alsaconf': '',
|
||||||
@@ -34,17 +34,17 @@ let s:globs = {
|
|||||||
\ 'autoit': '*.au3',
|
\ 'autoit': '*.au3',
|
||||||
\ 'automake': '[Mm]akefile.am,GNUmakefile.am',
|
\ 'automake': '[Mm]akefile.am,GNUmakefile.am',
|
||||||
\ 'ave': '*.ave',
|
\ 'ave': '*.ave',
|
||||||
\ 'awk': '*.awk',
|
\ 'awk': '*.awk,*.gawk',
|
||||||
\ 'basic': '*.basic',
|
\ 'basic': '*.basic',
|
||||||
\ 'blade': '*.blade,*.blade.php',
|
\ 'blade': '*.blade,*.blade.php',
|
||||||
\ 'brewfile': 'Brewfile',
|
\ 'brewfile': 'Brewfile',
|
||||||
\ 'c': '*.c,*.cats,*.h,*.idc',
|
\ 'c': '*.c,*.cats,*.h,*.idc,*.qc',
|
||||||
\ 'caddyfile': 'Caddyfile',
|
\ 'caddyfile': 'Caddyfile',
|
||||||
\ 'carp': '*.carp',
|
\ 'carp': '*.carp',
|
||||||
\ 'clojure': '*.clj,*.boot,*.cl2,*.cljc,*.cljs,*.cljs.hl,*.cljscm,*.cljx,*.hic,*.edn,riemann.config,build.boot,profile.boot',
|
\ 'clojure': '*.clj,*.boot,*.cl2,*.cljc,*.cljs,*.cljs.hl,*.cljscm,*.cljx,*.hic,*.edn,riemann.config,build.boot,profile.boot',
|
||||||
\ 'cmake': '*.cmake,*.cmake.in,CMakeLists.txt',
|
\ 'cmake': '*.cmake,*.cmake.in,CMakeLists.txt',
|
||||||
\ 'coffee': '*.coffee,*._coffee,*.cake,*.cjsx,*.iced,*.coffeekup,Cakefile',
|
\ 'coffee': '*.coffee,*._coffee,*.cake,*.cjsx,*.iced,*.coffeekup,Cakefile',
|
||||||
\ 'cpp': '*.cpp,*.c++,*.cc,*.cp,*.cxx,*.h,*.h++,*.hh,*.hpp,*.hxx,*.inc,*.inl,*.ipp,*.tcc,*.tpp',
|
\ 'cpp': '*.cpp,*.c++,*.cc,*.cp,*.cxx,*.h,*.h++,*.hh,*.hpp,*.hxx,*.inc,*.inl,*.ipp,*.tcc,*.tpp,*.moc',
|
||||||
\ 'cql': '*.cql',
|
\ 'cql': '*.cql',
|
||||||
\ 'cryptol': '*.cry,*.cyl,*.lcry,*.lcyl',
|
\ 'cryptol': '*.cry,*.cyl,*.lcry,*.lcyl',
|
||||||
\ 'crystal': '*.cr,Projectfile',
|
\ 'crystal': '*.cr,Projectfile',
|
||||||
@@ -52,7 +52,7 @@ let s:globs = {
|
|||||||
\ 'cucumber': '*.feature,*.story',
|
\ 'cucumber': '*.feature,*.story',
|
||||||
\ 'cuesheet': '*.cue',
|
\ 'cuesheet': '*.cue',
|
||||||
\ 'd': '*.d,*.di',
|
\ 'd': '*.d,*.di',
|
||||||
\ 'dart': '*.dart',
|
\ 'dart': '*.dart,*.drt',
|
||||||
\ 'dcov': '*.lst',
|
\ 'dcov': '*.lst',
|
||||||
\ 'dd': '*.dd',
|
\ 'dd': '*.dd',
|
||||||
\ 'ddoc': '*.ddoc',
|
\ 'ddoc': '*.ddoc',
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ if !has_key(s:disabled_packages, 'awk')
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if !has_key(s:disabled_packages, 'c/c++')
|
if !has_key(s:disabled_packages, 'c/c++')
|
||||||
au! BufRead,BufNewFile *.c,*.cpp,*.tpp
|
au! BufRead,BufNewFile *.cpp,*.tpp,*.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if !has_key(s:disabled_packages, 'cmake')
|
if !has_key(s:disabled_packages, 'cmake')
|
||||||
@@ -343,7 +343,9 @@ endif
|
|||||||
|
|
||||||
if !has_key(s:disabled_packages, 'ada')
|
if !has_key(s:disabled_packages, 'ada')
|
||||||
au BufNewFile,BufRead *.ada setf ada
|
au BufNewFile,BufRead *.ada setf ada
|
||||||
|
au BufNewFile,BufRead *.ada_m setf ada
|
||||||
au BufNewFile,BufRead *.adb setf ada
|
au BufNewFile,BufRead *.adb setf ada
|
||||||
|
au BufNewFile,BufRead *.adc setf ada
|
||||||
au BufNewFile,BufRead *.ads setf ada
|
au BufNewFile,BufRead *.ads setf ada
|
||||||
au BufNewFile,BufRead *.gpr setf ada
|
au BufNewFile,BufRead *.gpr setf ada
|
||||||
endif
|
endif
|
||||||
@@ -465,6 +467,7 @@ endif
|
|||||||
|
|
||||||
if !has_key(s:disabled_packages, 'awk')
|
if !has_key(s:disabled_packages, 'awk')
|
||||||
au BufNewFile,BufRead *.awk setf awk
|
au BufNewFile,BufRead *.awk setf awk
|
||||||
|
au BufNewFile,BufRead *.gawk setf awk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if !has_key(s:disabled_packages, 'reason')
|
if !has_key(s:disabled_packages, 'reason')
|
||||||
@@ -473,16 +476,11 @@ if !has_key(s:disabled_packages, 'reason')
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if !has_key(s:disabled_packages, 'c/c++')
|
if !has_key(s:disabled_packages, 'c/c++')
|
||||||
au BufNewFile,BufRead *.c setf c
|
|
||||||
au BufNewFile,BufRead *.cats setf c
|
|
||||||
au BufNewFile,BufRead *.h setf c
|
|
||||||
au BufNewFile,BufRead *.idc setf c
|
|
||||||
au BufNewFile,BufRead *.c++ setf cpp
|
au BufNewFile,BufRead *.c++ setf cpp
|
||||||
au BufNewFile,BufRead *.cc setf cpp
|
au BufNewFile,BufRead *.cc setf cpp
|
||||||
au BufNewFile,BufRead *.cp setf cpp
|
au BufNewFile,BufRead *.cp setf cpp
|
||||||
au BufNewFile,BufRead *.cpp setf cpp
|
au BufNewFile,BufRead *.cpp setf cpp
|
||||||
au BufNewFile,BufRead *.cxx setf cpp
|
au BufNewFile,BufRead *.cxx setf cpp
|
||||||
au BufNewFile,BufRead *.h setf cpp
|
|
||||||
au BufNewFile,BufRead *.h++ setf cpp
|
au BufNewFile,BufRead *.h++ setf cpp
|
||||||
au BufNewFile,BufRead *.hh setf cpp
|
au BufNewFile,BufRead *.hh setf cpp
|
||||||
au BufNewFile,BufRead *.hpp setf cpp
|
au BufNewFile,BufRead *.hpp setf cpp
|
||||||
@@ -490,8 +488,14 @@ if !has_key(s:disabled_packages, 'c/c++')
|
|||||||
au BufNewFile,BufRead *.inc setf cpp
|
au BufNewFile,BufRead *.inc setf cpp
|
||||||
au BufNewFile,BufRead *.inl setf cpp
|
au BufNewFile,BufRead *.inl setf cpp
|
||||||
au BufNewFile,BufRead *.ipp setf cpp
|
au BufNewFile,BufRead *.ipp setf cpp
|
||||||
|
au BufNewFile,BufRead *.moc setf cpp
|
||||||
au BufNewFile,BufRead *.tcc setf cpp
|
au BufNewFile,BufRead *.tcc setf cpp
|
||||||
au BufNewFile,BufRead *.tpp setf cpp
|
au BufNewFile,BufRead *.tpp setf cpp
|
||||||
|
au BufNewFile,BufRead *.c setf c
|
||||||
|
au BufNewFile,BufRead *.cats setf c
|
||||||
|
au BufNewFile,BufRead *.idc setf c
|
||||||
|
au BufNewFile,BufRead *.qc setf c
|
||||||
|
au! BufNewFile,BufRead *.h call polyglot#DetectHFiletype()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if !has_key(s:disabled_packages, 'caddyfile')
|
if !has_key(s:disabled_packages, 'caddyfile')
|
||||||
@@ -566,6 +570,7 @@ endif
|
|||||||
|
|
||||||
if !has_key(s:disabled_packages, 'dart')
|
if !has_key(s:disabled_packages, 'dart')
|
||||||
au BufNewFile,BufRead *.dart setf dart
|
au BufNewFile,BufRead *.dart setf dart
|
||||||
|
au BufNewFile,BufRead *.drt setf dart
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if !has_key(s:disabled_packages, 'dhall')
|
if !has_key(s:disabled_packages, 'dhall')
|
||||||
@@ -1065,7 +1070,7 @@ if !has_key(s:disabled_packages, 'nix')
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if !has_key(s:disabled_packages, 'objc')
|
if !has_key(s:disabled_packages, 'objc')
|
||||||
au BufNewFile,BufRead *.h setf objc
|
au! BufNewFile,BufRead *.h call polyglot#DetectHFiletype()
|
||||||
au! BufNewFile,BufRead *.m call polyglot#DetectMFiletype()
|
au! BufNewFile,BufRead *.m call polyglot#DetectMFiletype()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,20 @@ rules:
|
|||||||
filetype: aspperl
|
filetype: aspperl
|
||||||
- filetype: aspvbs
|
- filetype: aspvbs
|
||||||
---
|
---
|
||||||
|
extensions: [h]
|
||||||
|
rules:
|
||||||
|
- lines: 200
|
||||||
|
pattern: '^\s*(@(interface|class|protocol|property|end|synchronised|selector|implementation)\b|#import\s+.+\.h[">])'
|
||||||
|
rules:
|
||||||
|
- if_exists: "g:c_syntax_for_h"
|
||||||
|
filetype: objc
|
||||||
|
- filetype: objcpp
|
||||||
|
- if_exists: "g:c_syntax_for_h"
|
||||||
|
filetype: c
|
||||||
|
- if_exists: "g:ch_syntax_for_h"
|
||||||
|
filetype: ch
|
||||||
|
- filetype: cpp
|
||||||
|
---
|
||||||
extensions: [m]
|
extensions: [m]
|
||||||
rules:
|
rules:
|
||||||
- lines: 100
|
- lines: 100
|
||||||
|
|||||||
@@ -93,7 +93,9 @@ filetypes:
|
|||||||
- adb
|
- adb
|
||||||
- ads
|
- ads
|
||||||
- ada
|
- ada
|
||||||
|
- adc
|
||||||
- gpr
|
- gpr
|
||||||
|
- ada_m
|
||||||
---
|
---
|
||||||
name: ahdl
|
name: ahdl
|
||||||
remote: vim/vim:runtime
|
remote: vim/vim:runtime
|
||||||
@@ -191,6 +193,11 @@ filetypes:
|
|||||||
- '*/.aptitude/config'
|
- '*/.aptitude/config'
|
||||||
- '*/etc/apt/apt.conf.d/[^.]*'
|
- '*/etc/apt/apt.conf.d/[^.]*'
|
||||||
- '*/etc/apt/apt.conf.d/*.conf'
|
- '*/etc/apt/apt.conf.d/*.conf'
|
||||||
|
ignored_warnings:
|
||||||
|
# some kind of bugs in filetype detection algorithm
|
||||||
|
- '*/etc/apt/apt.conf.d/{[-_[:alnum:]]\+,[-_.[:alnum:]]\+.conf}'
|
||||||
|
- '*/etc/apt/apt.conf.d/]\+'
|
||||||
|
- '*/etc/apt/apt.conf.d/]\+.conf'
|
||||||
---
|
---
|
||||||
name: arch
|
name: arch
|
||||||
remote: vim/vim:runtime
|
remote: vim/vim:runtime
|
||||||
@@ -302,19 +309,25 @@ filetypes:
|
|||||||
- name: awk
|
- name: awk
|
||||||
extensions:
|
extensions:
|
||||||
- awk
|
- awk
|
||||||
|
- gawk
|
||||||
---
|
---
|
||||||
name: c/c++
|
name: c/c++
|
||||||
remote: vim-jp/vim-cpp
|
remote: vim-jp/vim-cpp
|
||||||
filetypes:
|
filetypes:
|
||||||
- name: c
|
|
||||||
linguist: C
|
|
||||||
- name: cpp
|
- name: cpp
|
||||||
linguist: C++
|
linguist: C++
|
||||||
|
extra_extensions:
|
||||||
|
- moc
|
||||||
ignored_extensions:
|
ignored_extensions:
|
||||||
# conflicts with more popular reason, remove after heuristics work
|
# conflicts with more popular reason, remove after heuristics work
|
||||||
- re
|
- re
|
||||||
# implemented by arduino
|
# implemented by arduino
|
||||||
- ino
|
- ino
|
||||||
|
- name: c
|
||||||
|
linguist: C
|
||||||
|
extra_extensions:
|
||||||
|
# Quake C
|
||||||
|
- qc
|
||||||
---
|
---
|
||||||
name: caddyfile
|
name: caddyfile
|
||||||
remote: isobit/vim-caddyfile
|
remote: isobit/vim-caddyfile
|
||||||
@@ -358,10 +371,9 @@ filetypes:
|
|||||||
extra_extensions:
|
extra_extensions:
|
||||||
# 17 results: https://github.com/search?q=extension%3Acoffeekup+html&type=Code
|
# 17 results: https://github.com/search?q=extension%3Acoffeekup+html&type=Code
|
||||||
- coffeekup
|
- coffeekup
|
||||||
ignored_filenames:
|
ignored_warnings:
|
||||||
# Probably mistake
|
# Probably mistake
|
||||||
- '*Cakefile'
|
- '*Cakefile'
|
||||||
ignored_warnings:
|
|
||||||
# Used by C#
|
# Used by C#
|
||||||
- csx
|
- csx
|
||||||
# Used by Chuck
|
# Used by Chuck
|
||||||
@@ -430,6 +442,8 @@ remote: dart-lang/dart-vim-plugin
|
|||||||
filetypes:
|
filetypes:
|
||||||
- name: dart
|
- name: dart
|
||||||
linguist: Dart
|
linguist: Dart
|
||||||
|
extra_extensions:
|
||||||
|
- drt
|
||||||
---
|
---
|
||||||
name: dhall
|
name: dhall
|
||||||
remote: vmchale/dhall-vim
|
remote: vmchale/dhall-vim
|
||||||
@@ -470,7 +484,7 @@ filetypes:
|
|||||||
filenames:
|
filenames:
|
||||||
- 'docker-compose*.yaml'
|
- 'docker-compose*.yaml'
|
||||||
- 'docker-compose*.yml'
|
- 'docker-compose*.yml'
|
||||||
ignored_filenames:
|
ignored_warnings:
|
||||||
# Probably mistakes?
|
# Probably mistakes?
|
||||||
- 'docker-compose*.yaml*'
|
- 'docker-compose*.yaml*'
|
||||||
- 'docker-compose*.yml*'
|
- 'docker-compose*.yml*'
|
||||||
|
|||||||
@@ -268,10 +268,6 @@ def rule_to_code(rule)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if rule.has_key?("rules")
|
|
||||||
return rule["rules"].map { |r| indent(rule_to_code(r), 0) }.join("\n")
|
|
||||||
end
|
|
||||||
|
|
||||||
if rule.has_key?("pattern") || rule.has_key?("or") || rule.has_key?("and")
|
if rule.has_key?("pattern") || rule.has_key?("or") || rule.has_key?("and")
|
||||||
return <<~EOS
|
return <<~EOS
|
||||||
if #{pattern_to_condition(rule)}
|
if #{pattern_to_condition(rule)}
|
||||||
@@ -280,6 +276,10 @@ def rule_to_code(rule)
|
|||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if rule.has_key?("rules")
|
||||||
|
return rule["rules"].map { |r| indent(rule_to_code(r), 0) }.join("\n")
|
||||||
|
end
|
||||||
|
|
||||||
if rule.has_key?("if_set")
|
if rule.has_key?("if_set")
|
||||||
return <<~EOS
|
return <<~EOS
|
||||||
if #{rule["negative"] ? "!" : ""}#{rule["if_set"]}
|
if #{rule["negative"] ? "!" : ""}#{rule["if_set"]}
|
||||||
@@ -288,6 +288,14 @@ def rule_to_code(rule)
|
|||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if rule.has_key?("if_exists")
|
||||||
|
return <<~EOS
|
||||||
|
if #{rule["negative"] ? "!" : ""}exists("#{rule["if_exists"]}")
|
||||||
|
#{indent(rule_to_code(except(rule, "if_exists", "negative")), 2)}
|
||||||
|
endif
|
||||||
|
EOS
|
||||||
|
end
|
||||||
|
|
||||||
if rule.has_key?("set")
|
if rule.has_key?("set")
|
||||||
return <<~EOS
|
return <<~EOS
|
||||||
let #{rule["set"]} = 1
|
let #{rule["set"]} = 1
|
||||||
@@ -455,7 +463,7 @@ def generate_ftdetect(packages, heuristics)
|
|||||||
extensions = filetype["extensions"]
|
extensions = filetype["extensions"]
|
||||||
filenames = filetype["filenames"]
|
filenames = filetype["filenames"]
|
||||||
|
|
||||||
expected_extensions = all_filetypes.has_key?(name) ? all_filetypes.fetch(name)[:extensions] : []
|
expected_extensions = (all_filetypes.has_key?(name) ? all_filetypes.fetch(name)[:extensions] : []).map(&:downcase)
|
||||||
ignored_extensions = expand_all(filetype.fetch("ignored_extensions", []))
|
ignored_extensions = expand_all(filetype.fetch("ignored_extensions", []))
|
||||||
ignored_warnings = expand_all(filetype.fetch("ignored_warnings", []))
|
ignored_warnings = expand_all(filetype.fetch("ignored_warnings", []))
|
||||||
|
|
||||||
|
|||||||
@@ -181,6 +181,18 @@ call TestExtension("ave", "foobar.ave", "")
|
|||||||
" Awk
|
" Awk
|
||||||
call TestExtension("awk", "foobar.awk", "")
|
call TestExtension("awk", "foobar.awk", "")
|
||||||
|
|
||||||
|
" C++
|
||||||
|
call TestExtension("c", "foobar.c", "")
|
||||||
|
call TestExtension("cpp", "foobar.cxx", "")
|
||||||
|
call TestExtension("cpp", "foobar.c++", "")
|
||||||
|
call TestExtension("cpp", "foobar.hh", "")
|
||||||
|
call TestExtension("cpp", "foobar.hxx", "")
|
||||||
|
call TestExtension("cpp", "foobar.hpp", "")
|
||||||
|
call TestExtension("cpp", "foobar.ipp", "")
|
||||||
|
call TestExtension("cpp", "foobar.moc", "")
|
||||||
|
call TestExtension("cpp", "foobar.tcc", "")
|
||||||
|
call TestExtension("cpp", "foobar.inl", "")
|
||||||
|
|
||||||
" vim-polyglot only
|
" vim-polyglot only
|
||||||
call TestExtension("blade", "test.blade.php", "")
|
call TestExtension("blade", "test.blade.php", "")
|
||||||
call TestExtension("yaml.ansible", "playbook.yml", "")
|
call TestExtension("yaml.ansible", "playbook.yml", "")
|
||||||
@@ -233,7 +245,7 @@ call TestExtension("vb", "vb.dsm", "")
|
|||||||
call TestExtension("vb", "vb.dsm", "")
|
call TestExtension("vb", "vb.dsm", "")
|
||||||
call TestExtension("vb", "vb.ctl", "")
|
call TestExtension("vb", "vb.ctl", "")
|
||||||
|
|
||||||
" Idris
|
" .idr extension
|
||||||
call TestExtension("idris", "lowercase.idr", "--idris1")
|
call TestExtension("idris", "lowercase.idr", "--idris1")
|
||||||
call TestExtension("idris", "uppercase.idr", "--Idris1")
|
call TestExtension("idris", "uppercase.idr", "--Idris1")
|
||||||
call TestExtension("idris", "start-space-l.idr", "-- idris1")
|
call TestExtension("idris", "start-space-l.idr", "-- idris1")
|
||||||
@@ -253,7 +265,17 @@ call TestExtension("idris2", "two-spaces-u.idr", "-- Idris 2")
|
|||||||
call TestExtension("idris2", "mypkg.ipkg", "package mypkg\n\ndepends = effects")
|
call TestExtension("idris2", "mypkg.ipkg", "package mypkg\n\ndepends = effects")
|
||||||
call TestExtension("idris2", "use-post-proj.idr", "%language PostfixProjections")
|
call TestExtension("idris2", "use-post-proj.idr", "%language PostfixProjections")
|
||||||
|
|
||||||
" Literate Idris
|
" .lidr extension
|
||||||
call TestExtension("lidris", "lidris-1.lidr", "Some test plaintext\n\n> --idris1\n> myfact : Nat -> Nat\n> myfact Z = 1\n> myfact (S k) = (S k) * myfact k\n\nMore plaintext")
|
call TestExtension("lidris", "lidris-1.lidr", "Some test plaintext\n\n> --idris1\n> myfact : Nat -> Nat\n> myfact Z = 1\n> myfact (S k) = (S k) * myfact k\n\nMore plaintext")
|
||||||
call TestExtension("lidris2", "lidris-2.lidr", "Some test plaintext\n\n> --idris2\n> myfact : Nat -> Nat\n> myfact Z = 1\n> myfact (S k) = (S k) * myfact k\n\nMore plaintext")
|
call TestExtension("lidris2", "lidris-2.lidr", "Some test plaintext\n\n> --idris2\n> myfact : Nat -> Nat\n> myfact Z = 1\n> myfact (S k) = (S k) * myfact k\n\nMore plaintext")
|
||||||
|
|
||||||
|
|
||||||
|
" .h extension
|
||||||
|
call TestExtension("objcpp", "foo.h", "@interface MTNavigationController : UINavigationController")
|
||||||
|
call TestExtension("cpp", "foo.h", "")
|
||||||
|
let g:c_syntax_for_h = 1
|
||||||
|
call TestExtension("objc", "foo.h", "@interface MTNavigationController : UINavigationController")
|
||||||
|
call TestExtension("c", "foo.h", "")
|
||||||
|
unlet g:c_syntax_for_h
|
||||||
|
let g:ch_syntax_for_h = 1
|
||||||
|
call TestExtension("ch", "foo.h", "")
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ call TestFiletype('autoit')
|
|||||||
call TestFiletype('ave')
|
call TestFiletype('ave')
|
||||||
call TestFiletype('awk')
|
call TestFiletype('awk')
|
||||||
call TestFiletype('reason')
|
call TestFiletype('reason')
|
||||||
call TestFiletype('c')
|
|
||||||
call TestFiletype('cpp')
|
call TestFiletype('cpp')
|
||||||
|
call TestFiletype('c')
|
||||||
call TestFiletype('caddyfile')
|
call TestFiletype('caddyfile')
|
||||||
call TestFiletype('carp')
|
call TestFiletype('carp')
|
||||||
call TestFiletype('clojure')
|
call TestFiletype('clojure')
|
||||||
|
|||||||
Reference in New Issue
Block a user