mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Disable languages also from heuristics, fixes #673
This commit is contained in:
@@ -53,16 +53,16 @@ func! polyglot#detect#H(...)
|
||||
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")
|
||||
if exists('g:c_syntax_for_h')
|
||||
set ft=objc | return
|
||||
endif
|
||||
set ft=objcpp | return
|
||||
endif
|
||||
endfor
|
||||
if exists("g:c_syntax_for_h")
|
||||
if exists('g:c_syntax_for_h')
|
||||
set ft=c | return
|
||||
endif
|
||||
if exists("g:ch_syntax_for_h")
|
||||
if exists('g:ch_syntax_for_h')
|
||||
set ft=ch | return
|
||||
endif
|
||||
set ft=cpp | return
|
||||
@@ -82,7 +82,14 @@ func! polyglot#detect#M(...)
|
||||
set ft=objc | return
|
||||
endif
|
||||
if line =~# '^\s*%'
|
||||
set ft=octave | return
|
||||
if !has_key(g:polyglot_is_disabled, 'octave')
|
||||
set ft=octave | return
|
||||
endif
|
||||
endif
|
||||
if line =~# '^\s*%'
|
||||
if has_key(g:polyglot_is_disabled, 'octave')
|
||||
set ft=matlab | return
|
||||
endif
|
||||
endif
|
||||
if line =~# '^\s*(\*'
|
||||
set ft=mma | return
|
||||
@@ -97,7 +104,12 @@ func! polyglot#detect#M(...)
|
||||
if exists("g:filetype_m")
|
||||
let &ft = g:filetype_m | return
|
||||
endif
|
||||
set ft=octave | return
|
||||
if !has_key(g:polyglot_is_disabled, 'octave')
|
||||
set ft=octave | return
|
||||
endif
|
||||
if has_key(g:polyglot_is_disabled, 'octave')
|
||||
set ft=matlab | return
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#Fs(...)
|
||||
|
||||
Reference in New Issue
Block a user