diff --git a/lua/plugins/lsp/config/systemd.lua b/lua/plugins/lsp/config/systemd.lua new file mode 100644 index 0000000..3ba15ca --- /dev/null +++ b/lua/plugins/lsp/config/systemd.lua @@ -0,0 +1,28 @@ +---@type LazySpec +return { + "AstroNvim/astrolsp", + cond = vim.fn.executable("systemd-language-server") == 1, + ---@param opts AstroLSPOpts + opts = function(_, opts) + opts.servers = opts.servers or {} + table.insert(opts.servers, "systemd_ls") + opts.config = require("astrocore").extend_tbl(opts.config or {}, { + systemd_ls = { + cmd = { "systemd-language-server" }, + filetypes = { "systemd" }, + root_dir = function() return nil end, + single_file_support = true, + settings = {}, + docs = { + description = [[ +https://github.com/psacawa/systemd-language-server +Language Server for Systemd unit files. + +I tested it with python 3.10.15 +3.12.7 didn't work +]], + }, + }, + }) + end, +}