mirror of
https://github.com/chenasraf/nvim-treesitter.git
synced 2026-05-17 17:38:02 +00:00
feat: add query filetype
This commit is contained in:
11
ftdetect/query.vim
Normal file
11
ftdetect/query.vim
Normal file
@@ -0,0 +1,11 @@
|
||||
" 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 BufEnter,BufNewFile *.scm call s:shouldFt(expand("%"))
|
||||
Reference in New Issue
Block a user