diff options
| author | Thomas Vigouroux <tomvig38@gmail.com> | 2020-09-01 10:16:05 +0200 |
|---|---|---|
| committer | Thomas Vigouroux <tomvig38@gmail.com> | 2020-09-01 15:09:31 +0200 |
| commit | 5a230e6c07813e648daf943ea8ee3a2286eb51b4 (patch) | |
| tree | 3db40d95fe16bf50995ffb66eacb069278a332fe /ftdetect | |
| parent | bc365219671a132458a6f1259cd58799bd54d3f7 (diff) | |
feat: add query filetype
Diffstat (limited to 'ftdetect')
| -rw-r--r-- | ftdetect/query.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ftdetect/query.vim b/ftdetect/query.vim new file mode 100644 index 00000000..18224275 --- /dev/null +++ b/ftdetect/query.vim @@ -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("%")) |
