From 41537892a3f419221094c150cf3e51ff2d84f1c7 Mon Sep 17 00:00:00 2001 From: Ethan Holz Date: Wed, 5 Aug 2026 13:24:14 -0600 Subject: [PATCH] feat: add native ZLS language server config Define ZLS with Neovim's native LSP configuration and enable it explicitly during startup. Assisted-by: Pi:openai-codex/gpt-5.6-sol --- init.lua | 2 +- lsp/zls.lua | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 lsp/zls.lua diff --git a/init.lua b/init.lua index 81817e4..f8d7ec4 100644 --- a/init.lua +++ b/init.lua @@ -161,7 +161,7 @@ end require("mappings") require("lsp") vim.cmd("set completeopt+=noselect") -vim.lsp.enable({ "lua_ls", "gh_actions_ls", "gopls", "astro", "nixd" }) +vim.lsp.enable({ "lua_ls", "gh_actions_ls", "gopls", "astro", "nixd", "zls" }) vim.api.nvim_create_autocmd("LspAttach", { callback = function(ev) local client = vim.lsp.get_client_by_id(ev.data.client_id) diff --git a/lsp/zls.lua b/lsp/zls.lua new file mode 100644 index 0000000..b75de2c --- /dev/null +++ b/lsp/zls.lua @@ -0,0 +1,10 @@ +---@brief +--- https://github.com/zigtools/zls + +---@type vim.lsp.Config +return { + cmd = { "zls" }, + filetypes = { "zig", "zir" }, + root_markers = { "zls.json", "build.zig", ".git" }, + workspace_required = false, +} -- 2.51.2