mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-02 17:14:56 +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
|
@ -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…
Add table
Add a link
Reference in a new issue