I'm trying to use dbt in emacs, and I'm hoping that there is a mode for this that will combine the jinja and sql parts in an intelligent way...

I quick google search didn't find anything, so the answer may be "it doesn't exist"...

  • If the answer is "it doesn't exist, so you should make one!" ... If I find the time I guess... Commented Jan 31, 2023 at 15:48
  • I'm in the same situation. I use github.com/tconbeer/sqlfmt as a command line code linter, but it would be nice to have it integrated with emacs or get some reasonable mode that takes care of indentation. Commented Sep 14, 2023 at 15:37

1 Answer 1


This one based on Polymode works pretty well.

I modified it to make jinja code stand out a bit more by adding the following to the first innermode:

  :adjust-face 10
  :head-adjust-face 10
  :tail-adjust-face 10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.