nvim-neorg / neorg

Modernity meets insane extensibility. The future of organizing your life in Neovim.
GNU General Public License v3.0
6.32k stars 209 forks source link

Autoformat tangled files #1214

Open aareman opened 9 months ago

aareman commented 9 months ago

Issues

Feature description

Pretty self explanatory, and two parts:

  1. When Neorg does a tangle it should autoformat according to whatever LSP or formatting is setup (perhaps null-ls or conform.nvim)
  2. Allow post tangle hooks with list of files, this way users can format themselves. This part can allow for the user to configure neorg to do part 1.

Thank you guys for this very cool system

Help

Yes, but I don't know how to start. I would need guidance

Implementation help

Recommendations on approach, and where to target in the codebase (currently unfamiliar with it).

max397574 commented 9 months ago
  1. out of scope imo
  2. sounds like a really useful idea

if you'd like to implement the hooks you could search for the tangle module and there add a post_tangle_hook=function() end in the config which you can call after the tangling if that doesn't help you enough I can look into the code base later to give you better help