mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-21 02:55:09 +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.tex").config()
|
||||||
require("lang.vim").config()
|
require("lang.vim").config()
|
||||||
require("lang.yaml").config()
|
require("lang.yaml").config()
|
||||||
|
require("lang.zig").config()
|
||||||
|
|
|
@ -1,13 +1,30 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.config = function()
|
M.config = function()
|
||||||
-- TODO: implement config for language
|
O.lang.zig = {
|
||||||
return "No config available!"
|
formatter = {
|
||||||
|
exe = "zig",
|
||||||
|
args = { "fmt" },
|
||||||
|
stdin = false,
|
||||||
|
},
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
M.format = function()
|
M.format = function()
|
||||||
-- TODO: implement formatter for language
|
O.formatters.filetype["zig"] = {
|
||||||
return "No formatter available!"
|
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
|
end
|
||||||
|
|
||||||
M.lint = function()
|
M.lint = function()
|
||||||
|
|
Loading…
Reference in a new issue