From e6de44e4443042dc14d34e36dd8ee8528f4936f2 Mon Sep 17 00:00:00 2001 From: Abouzar Parvan Date: Thu, 15 Jul 2021 05:18:05 +0430 Subject: more language reformat (#949) --- lua/lang/zig.lua | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'lua/lang/zig.lua') diff --git a/lua/lang/zig.lua b/lua/lang/zig.lua index 178c6f54..1da329f5 100644 --- a/lua/lang/zig.lua +++ b/lua/lang/zig.lua @@ -15,7 +15,20 @@ M.lint = function() return "No linters configured!" end -M.lsp = function() 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 { + 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 -- cgit v1.2.3