summaryrefslogtreecommitdiff
path: root/dot-config/nvim/lua/plugins
diff options
context:
space:
mode:
authorJosé Juan Loeza Sierra <jj@xz6ze.com>2025-08-09 00:14:22 -0700
committerJosé Juan Loeza Sierra <jj@xz6ze.com>2025-08-09 00:14:22 -0700
commit997339e359498ae67b7bd6e05902649f952aee79 (patch)
treed0ba47f759728008cb48f5d659de78559c37bc27 /dot-config/nvim/lua/plugins
parent6f00949372ff97d61f51e2c3b1b0db7ce15b48f9 (diff)
add language support for handlebars
- adds treesitter - adds formatting via djLint. Requires djlint be installed, see https://www.djlint.com/docs/getting-started/
Diffstat (limited to 'dot-config/nvim/lua/plugins')
-rw-r--r--dot-config/nvim/lua/plugins/handlebars.lua26
1 files changed, 26 insertions, 0 deletions
diff --git a/dot-config/nvim/lua/plugins/handlebars.lua b/dot-config/nvim/lua/plugins/handlebars.lua
new file mode 100644
index 0000000..b09dc3c
--- /dev/null
+++ b/dot-config/nvim/lua/plugins/handlebars.lua
@@ -0,0 +1,26 @@
+-- add language support for handlebars (.hbs)
+
+return {
+
+ -- glimmer is the treesitter parser for handlebars
+ -- see https://github.com/nvim-treesitter/nvim-treesitter
+ {
+ "nvim-treesitter/nvim-treesitter",
+ opts = { ensure_installed = { "glimmer" } },
+ },
+
+ -- we can use djLint to format handlebars
+ {
+ "stevearc/conform.nvim",
+ opts = {
+ formatters_by_ft = {
+ handlebars = { "djlint" },
+ },
+ formatters = {
+ djlint = {
+ prepend_args = { "--preserve-blank-lines" },
+ },
+ },
+ },
+ },
+}