mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
vim-patch:9.0.1057: conflict between supercollider and scala filetype detection (#21417)
Problem: Conflict between supercollider and scala filetype detection.
Solution: Do not check for "Class : Method", it can appear in both
filetypes. (Chris Kipp, closes vim/vim#11699)
70ef3f546b
Co-authored-by: Chris Kipp <ckipp@pm.me>
This commit is contained in:
@@ -1097,11 +1097,10 @@ function M.sc(bufnr)
|
|||||||
for _, line in ipairs(getlines(bufnr, 1, 25)) do
|
for _, line in ipairs(getlines(bufnr, 1, 25)) do
|
||||||
if
|
if
|
||||||
findany(line, {
|
findany(line, {
|
||||||
'[A-Za-z0-9]*%s:%s[A-Za-z0-9]',
|
|
||||||
'var%s<',
|
'var%s<',
|
||||||
'classvar%s<',
|
'classvar%s<',
|
||||||
'%^this.*',
|
'%^this.*',
|
||||||
'|%w*|',
|
'|%w+|',
|
||||||
'%+%s%w*%s{',
|
'%+%s%w*%s{',
|
||||||
'%*ar%s',
|
'%*ar%s',
|
||||||
})
|
})
|
||||||
|
@@ -1555,13 +1555,6 @@ endfunc
|
|||||||
func Test_sc_file()
|
func Test_sc_file()
|
||||||
filetype on
|
filetype on
|
||||||
|
|
||||||
" SC file methods are defined 'Class : Method'
|
|
||||||
call writefile(['SCNvimDocRenderer : SCDocHTMLRenderer {'], 'srcfile.sc')
|
|
||||||
split srcfile.sc
|
|
||||||
call assert_equal('supercollider', &filetype)
|
|
||||||
bwipe!
|
|
||||||
call delete('srcfile.sc')
|
|
||||||
|
|
||||||
" SC classes are defined with '+ Class {}'
|
" SC classes are defined with '+ Class {}'
|
||||||
call writefile(['+ SCNvim {', '*methodArgs {|method|'], 'srcfile.sc')
|
call writefile(['+ SCNvim {', '*methodArgs {|method|'], 'srcfile.sc')
|
||||||
split srcfile.sc
|
split srcfile.sc
|
||||||
|
Reference in New Issue
Block a user