Skip to content

Commit 128ccd4

Browse files
authored
Merge pull request #42 from russtoku/master
- Detect `.bb` and `.clj_kondo` file extension as Clojure. - Add XML file filter to GVim file browser. - Moved unofficial Clojure file extension detection to an `after/ftdetect` plugin. - Can be turned off with `let g:clojure_detect_unofficial_exts = 0` - Maybe improve this at a later date.
2 parents bc3f1fa + ea53176 commit 128ccd4

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

after/ftdetect/clojure.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
if get(g:, 'clojure_detect_unofficial_exts', 1)
2+
autocmd BufNewFile,BufRead {build,profile}.boot,*.bb,*.clj_kondo setlocal filetype=clojure
3+
endif

ftdetect/clojure.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
autocmd BufNewFile,BufRead *.clj,*.cljs,*.edn,*.cljx,*.cljc,{build,profile}.boot setlocal filetype=clojure
1+
autocmd BufNewFile,BufRead *.clj,*.cljs,*.edn,*.cljx,*.cljc setlocal filetype=clojure

ftplugin/clojure.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,10 @@ endif
6767
" Filter files in the browse dialog
6868
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
6969
let b:browsefilter = "All Files\t*\n" .
70-
\ "Clojure Files\t*.clj;*.cljc;*.cljs;*.cljx\n" .
70+
\ "Clojure Files\t*.clj;*.cljc;*.cljs;*.cljx;*.bb;*.clj_kondo\n" .
7171
\ "EDN Files\t*.edn\n" .
72-
\ "Java Files\t*.java\n"
72+
\ "Java Files\t*.java\n" .
73+
\ "XML Files\t*.xml\n"
7374
let b:undo_ftplugin .= ' | unlet! b:browsefilter'
7475
endif
7576

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy