From 5b4277f44ee4c7efd8b7c32eb1f1f4e3fa94607c Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Sat, 23 Dec 2023 00:09:38 +0100 Subject: [PATCH] [zls] Add zls --- lua/lsp.lua | 1 + lua/lsp/zls.lua | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 lua/lsp/zls.lua diff --git a/lua/lsp.lua b/lua/lsp.lua index 1d9a4e2..bd43180 100644 --- a/lua/lsp.lua +++ b/lua/lsp.lua @@ -34,6 +34,7 @@ P.config = { lua_ls = {}, phpactor = {}, intelephense = {}, + -- zls = {}, rust_analyzer = {}, gopls = {}, } diff --git a/lua/lsp/zls.lua b/lua/lsp/zls.lua new file mode 100644 index 0000000..ecda715 --- /dev/null +++ b/lua/lsp/zls.lua @@ -0,0 +1,32 @@ +--[[ + Copyright 2023 Oscar Wallberg + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +]] + +return { + enabled = true, + dependencies = { + "zig", + }, + lspconfig = { + filetypes = { + "zig", + "zir", + }, + cmd = { "zls", }, + single_file_support = true, + -- init_options = { + -- }, + }, +}