commit af256882da2b94c85d633339c0f8617191188a83
parent ac9fc7c4212d00fb90c8439aa3eccaddf9c9e7ae
Author: Thomas Vigouroux <thomas.vigouroux@protonmail.com>
Date: Mon, 10 Oct 2022 07:51:24 +0200
zig: init configuration
Diffstat:
3 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/after/ftplugin/zig.lua b/after/ftplugin/zig.lua
@@ -0,0 +1,3 @@
+vim.opt_local.tabstop = 4
+vim.opt_local.shiftwidth = 4
+vim.opt_local.softtabstop = 4
diff --git a/lua/completree-config.lua b/lua/completree-config.lua
@@ -67,6 +67,7 @@ comp.setup {
go = lsp_completion,
javascript = lsp_completion,
typescript = lsp_completion,
+ zig = lsp_completion,
-- For git commit and text only do luasnip
NeogitCommitMessage = cdef.luasnip,
diff --git a/lua/lsp_config.lua b/lua/lsp_config.lua
@@ -192,6 +192,18 @@ local system_lsps = {
filetypes = { "haskell" },
},
+ zls = {
+ filetypes = { "zig" },
+ root_markers = { "build.zig", ".git" },
+ cfg = {
+ settings = {
+ zig = {
+ enable_snippets = true
+ }
+ }
+ }
+ },
+
tsserver = {
command = { "typescript-language-server", "--stdio" },
filetypes = { "typescript", "javascript" },