mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-20 18:45:08 +02:00
Add format for zig (#991)
Co-authored-by: maxxnino <idonthaveemail@dontknow.com>
This commit is contained in:
parent
9b0292b003
commit
909b9cff87
2 changed files with 22 additions and 4 deletions
|
@ -161,3 +161,4 @@ require("lang.terraform").config()
|
|||
require("lang.tex").config()
|
||||
require("lang.vim").config()
|
||||
require("lang.yaml").config()
|
||||
require("lang.zig").config()
|
||||
|
|
|
@ -1,13 +1,30 @@
|
|||
local M = {}
|
||||
|
||||
M.config = function()
|
||||
-- TODO: implement config for language
|
||||
return "No config available!"
|
||||
O.lang.zig = {
|
||||
formatter = {
|
||||
exe = "zig",
|
||||
args = { "fmt" },
|
||||
stdin = false,
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
M.format = function()
|
||||
-- TODO: implement formatter for language
|
||||
return "No formatter available!"
|
||||
O.formatters.filetype["zig"] = {
|
||||
function()
|
||||
return {
|
||||
exe = O.lang.zig.formatter.exe,
|
||||
args = O.lang.zig.formatter.args,
|
||||
stdin = O.lang.zig.formatter.stdin,
|
||||
}
|
||||
end,
|
||||
}
|
||||
|
||||
require("formatter.config").set_defaults {
|
||||
logging = false,
|
||||
filetype = O.formatters.filetype,
|
||||
}
|
||||
end
|
||||
|
||||
M.lint = function()
|
||||
|
|
Loading…
Reference in a new issue