summary refs log tree commit diff
path: root/.vim/lua/plugins.lua
diff options
context:
space:
mode:
Diffstat (limited to '.vim/lua/plugins.lua')
-rw-r--r--.vim/lua/plugins.lua39
1 files changed, 38 insertions, 1 deletions
diff --git a/.vim/lua/plugins.lua b/.vim/lua/plugins.lua
index 16c4c57..a16dc91 100644
--- a/.vim/lua/plugins.lua
+++ b/.vim/lua/plugins.lua
@@ -416,7 +416,6 @@ require('packer').startup({function()
     requires = {'nvim-lua/plenary.nvim'},
     config = function()
       local nls = require('null-ls')
-      -- local h = require('null-ls.helpers')
       nls.setup {
         -- debug = true,
         sources = {
@@ -431,6 +430,44 @@ require('packer').startup({function()
         },
         on_attach = require('internal.lsp').my_attach,
       }
+
+      local h = require('null-ls.helpers')
+
+      nls.register({
+        h.make_builtin({
+          name = 'html-beautify',
+          filetypes = {'html', 'gotmpl.html'},
+          method = nls.methods.FORMATTING,
+          generator_opts = {
+            command = vim.env.HOME .. '/.yarn/bin/html-beautify',
+            args = {'--file', '-', '--editorconfig'},
+            to_stdin = true,
+          },
+          factory = h.formatter_factory,
+        }),
+        h.make_builtin({
+          name = 'html-beautify',
+          filetypes = {'html', 'gotmpl.html'},
+          method = nls.methods.FORMATTING,
+          generator_opts = {
+            command = vim.env.HOME .. '/.yarn/bin/html-beautify',
+            args = {'--file', '-', '--editorconfig'},
+            to_stdin = true,
+          },
+          factory = h.formatter_factory,
+        }),
+        h.make_builtin({
+          name = 'css-beautify',
+          filetypes = {'css', 'scss'},
+          method = nls.methods.FORMATTING,
+          generator_opts = {
+            command = vim.env.HOME .. '/.yarn/bin/css-beautify',
+            args = {'--file', '-', '--editorconfig'},
+            to_stdin = true,
+          },
+          factory = h.formatter_factory,
+        }),
+      })
     end} -- }}}
 
   use {'mfussenegger/nvim-dap', module = {'dap'}, -- {{{