I'm waiting on a couple of pull requests to be merged and then Practicalli nvim-astro5 will be ready for a major release. • Other-nvim to switch between src and test file • clojure pack update to use parpar-nvim and other-nvim The https://github.com/orgs/practicalli/projects/8/views/8 shows all the tickets for putting this Neovim 0.11config together
May I suggest to have some config to have .bb files handled as clojure? If I weren't so new to neovim I would make a PR but I'm still at the stage of understanding the whole config.
I haven't used Babaska myself, although one day I may get around to it. I guess such a config would need to define that .bb files are the clojure filetype. I will do a bit of searching, but let me know if you find anything interesting.
Seems to detect .bb files as bitbake which is another automation tool with the same extension
in clojure-vim bb is listed in the filter but not in the file extentions:
https://github.com/search?q=repo%3Aclojure-vim%2Fclojure.vim%20cljc&type=code
Edit: don't think clojure-vim is used here
It seems tree-sitter-clojure which is loaded by tree-sitter does include the bb extention, so why is it not working from start like clj files?
https://github.com/sogaiu/tree-sitter-clojure/blob/f4236d4da8aa92bc105d9c118746474c608e6af7/package.json#L9
There seems to be conflicting filetype detection, possibly in one of the pluging
ah seems related to bitbake https://www.reddit.com/r/neovim/comments/15rw27n/neovim_badly_detecting_filetype/
I can set the filetype using the :bufdo command, but obviously it not ideal having to do that each time.
:bufdo setlocal filetype=clojure
I saw similar posts and they suggested updating vim itself to recognise .bb as clojure (which would then be added to Neovim)I think the way to do it is using autocommands in some lua config file:
augroup ClojureFileType
autocmd!
autocmd BufRead,BufNewFile *.bb setfiletype clojure
augroup ENDnot sure where that should go in your config
That reminds me that I did something similar for Clojure Dart. I'll have a think about where to add an augroup in the config. Thanks
In the bb file this line does the trick for not having to set the filetype each time the file is loaded
;; vim: set filetype=clojure :
Looking good , thank you! Did not expect this to be so tedious.
I created https://github.com/practicalli/nvim-astro5/issues/49 with babashka support, as most of them were not successful and I don't want to repeat failure 🤣
I've added a quick 'vim' solution to the config for *.bb files which seems to work okay, it uses the ftdetect approach which should be fine for one file type.
" Quick hack to set Babashka files as Clojure filetype
au BufRead,BufNewFile *.bb set filetype=clojure
Let me know if this works for your Babashka code. Thanks.