summaryrefslogtreecommitdiffstats
path: root/autoload
diff options
context:
space:
mode:
Diffstat (limited to 'autoload')
-rw-r--r--autoload/polyglot.vim19
-rw-r--r--autoload/sleuth.vim10
2 files changed, 24 insertions, 5 deletions
diff --git a/autoload/polyglot.vim b/autoload/polyglot.vim
index ffb3c43f..1ed71826 100644
--- a/autoload/polyglot.vim
+++ b/autoload/polyglot.vim
@@ -154,6 +154,25 @@ func! polyglot#DetectAspFiletype()
setf aspvbs | return
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()
let saw_comment = 0
for lnum in range(1, min([line("$"), 100]))
diff --git a/autoload/sleuth.vim b/autoload/sleuth.vim
index 0460a46e..2eb95a63 100644
--- a/autoload/sleuth.vim
+++ b/autoload/sleuth.vim
@@ -10,7 +10,7 @@ let s:globs = {
\ 'abc': '*.abc',
\ 'abel': '*.abl',
\ 'acedb': '*.wrm',
- \ 'ada': '*.adb,*.ads,*.ada,*.gpr',
+ \ 'ada': '*.adb,*.ads,*.ada,*.adc,*.gpr,*.ada_m',
\ 'ahdl': '*.tdf',
\ 'aidl': '*.aidl',
\ 'alsaconf': '',
@@ -34,17 +34,17 @@ let s:globs = {
\ 'autoit': '*.au3',
\ 'automake': '[Mm]akefile.am,GNUmakefile.am',
\ 'ave': '*.ave',
- \ 'awk': '*.awk',
+ \ 'awk': '*.awk,*.gawk',
\ 'basic': '*.basic',
\ 'blade': '*.blade,*.blade.php',
\ 'brewfile': 'Brewfile',
- \ 'c': '*.c,*.cats,*.h,*.idc',
+ \ 'c': '*.c,*.cats,*.h,*.idc,*.qc',
\ '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,*.ipp,*.tcc,*.tpp',
+ \ 'cpp': '*.cpp,*.c++,*.cc,*.cp,*.cxx,*.h,*.h++,*.hh,*.hpp,*.hxx,*.inc,*.inl,*.ipp,*.tcc,*.tpp,*.moc',
\ 'cql': '*.cql',
\ 'cryptol': '*.cry,*.cyl,*.lcry,*.lcyl',
\ 'crystal': '*.cr,Projectfile',
@@ -52,7 +52,7 @@ let s:globs = {
\ 'cucumber': '*.feature,*.story',
\ 'cuesheet': '*.cue',
\ 'd': '*.d,*.di',
- \ 'dart': '*.dart',
+ \ 'dart': '*.dart,*.drt',
\ 'dcov': '*.lst',
\ 'dd': '*.dd',
\ 'ddoc': '*.ddoc',