nvim 設定
lsp
:MasonInstall zls
highlight
:TSInstall zig
formatter
--
-- zig format
--
local null_ls = require "null-ls"
null_ls.register {
method = null_ls.methods.FORMATTING,
name = "zig_fmt",
filetypes = { "zig" },
generator = null_ls.formatter {
command = { "zig" },
args = {
"fmt",
"$FILENAME",
},
to_stdin = false,
to_temp_file = true,
from_temp_file = true,
},
}