mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 11:20:07 -04:00
feat: add query filetype
This commit is contained in:
parent
bc36521967
commit
5a230e6c07
1 changed files with 11 additions and 0 deletions
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("%"))
|
||||||
Loading…
Add table
Add a link
Reference in a new issue