1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 12:10:05 +08:00
SpaceVim/bundle/nvim-treesitter/ftdetect/query.vim

12 lines
236 B
VimL
Raw Normal View History

" Last Change: 2020 Sep 01
function! s:shouldFt(path)
let l:q_dir = fnamemodify(a:path, ":p:h:h:t")
if l:q_dir =~? "queries"
setlocal ft=query
endif
endfunction
autocmd BufNewFile,BufRead *.scm call s:shouldFt(expand("%"))