From a14894fefa7f0961b4d114befab7d76f69d292ca Mon Sep 17 00:00:00 2001 From: Turiiya <34311583+ttytm@users.noreply.github.com> Date: Fri, 7 Jun 2024 03:14:04 +0200 Subject: [PATCH] lsp(null-ls): add `vzit` as zig formatter --- lua/nxvim/lsp/plugins/null-ls.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lua/nxvim/lsp/plugins/null-ls.lua b/lua/nxvim/lsp/plugins/null-ls.lua index 9adb7a9..e991bb3 100644 --- a/lua/nxvim/lsp/plugins/null-ls.lua +++ b/lua/nxvim/lsp/plugins/null-ls.lua @@ -28,6 +28,17 @@ null_ls.register({ }), }) +null_ls.register({ + name = "vzit", + method = null_ls.methods.FORMATTING, + filetypes = { "zig" }, + generator = null_ls.formatter({ + command = "vzit", + args = { "-w", "$FILENAME" }, + to_temp_file = true, + }), +}) + -- { == Configuration ==> ===================================================== null_ls.setup({