diff options
author | Christian Chiarulli <[email protected]> | 2021-07-24 21:17:11 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2021-07-24 21:17:11 -0400 |
commit | 98f8a77819670ce6012216e01885c135a6d3a289 (patch) | |
tree | b655da889c33e0eb89251878783700a8cd014a27 /lua/lang/zig.lua | |
parent | 0884dcd84670bc097c34253e983d2cde9c209dfa (diff) |
New contract (#1080)
Changes to the global config object
O is now lvim
user_plugins is now plugins
user_autocommands is now autocommands
No more lang specific plugins
Null-ls has replaced both formatter.nvim and nvim-lint
Diffstat (limited to 'lua/lang/zig.lua')
-rw-r--r-- | lua/lang/zig.lua | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/lua/lang/zig.lua b/lua/lang/zig.lua deleted file mode 100644 index 06ae9197..00000000 --- a/lua/lang/zig.lua +++ /dev/null @@ -1,58 +0,0 @@ -local M = {} - -M.config = function() - O.lang.zig = { - formatter = { - exe = "zig", - args = { "fmt" }, - stdin = false, - }, - lsp = { - path = "zls", - }, - } -end - -M.format = function() - 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() - -- TODO: implement linters (if applicable) - return "No linters configured!" -end - -M.lsp = function() - if require("lv-utils").check_lsp_client_active "zls" then - return - end - -- Because lspinstall don't support zig yet, - -- So we need zls preset in global lib - -- Further custom install zls in - -- https://github.com/zigtools/zls/wiki/Downloading-and-Building-ZLS - require("lspconfig").zls.setup { - cmd = { O.lang.zig.lsp.path }, - root_dir = require("lspconfig").util.root_pattern(".git", "build.zig", "zls.json"), - on_attach = require("lsp").common_on_attach, - } -end - -M.dap = function() - -- TODO: implement dap - return "No DAP configured!" -end - -return M |