summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ftdetect/query.vim11
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("%"))