practicalli

practicalli-johnny 2025-04-22T10:06:24.223549Z

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

fmjrey 2025-04-22T10:24:51.794729Z

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.

practicalli-johnny 2025-04-22T11:32:58.570519Z

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.

practicalli-johnny 2025-04-22T11:45:47.447949Z

Seems to detect .bb files as bitbake which is another automation tool with the same extension

fmjrey 2025-04-22T12:28:53.955149Z

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

fmjrey 2025-04-22T13:11:42.545299Z

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

practicalli-johnny 2025-04-22T13:16:11.146519Z

There seems to be conflicting filetype detection, possibly in one of the pluging

fmjrey 2025-04-22T13:22:06.260559Z

ah seems related to bitbake https://www.reddit.com/r/neovim/comments/15rw27n/neovim_badly_detecting_filetype/

practicalli-johnny 2025-04-22T13:37:48.422259Z

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)

fmjrey 2025-04-22T13:38:33.932429Z

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 END

fmjrey 2025-04-22T13:42:46.374709Z

not sure where that should go in your config

practicalli-johnny 2025-04-22T13:44:33.892709Z

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

👍 1
fmjrey 2025-04-22T13:54:32.987519Z

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 :

fmjrey 2025-04-30T10:16:51.968839Z

Looking good , thank you! Did not expect this to be so tedious.

practicalli-johnny 2025-04-28T20:59:44.376229Z

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.