fix error message intelephense license txt

main
Mathias Rothenhaeusler 2026-03-22 17:17:16 +01:00
parent 6a326d7321
commit fbcc0b8d61
1 changed files with 10 additions and 1 deletions

View File

@ -156,7 +156,16 @@ setup_server("intelephense", {
filetypes = { "php" },
-- root_dir = fallback_root_dir,
init_options = {
licenceKey = vim.fn.readfile(vim.fn.expand("$HOME/.config/intelephense/license.txt"))[1],
licenceKey = (function()
local license_path = vim.fn.expand("$HOME/.config/intelephense/license.txt")
local file = io.open(license_path, "r")
if file then
local content = file:read("*l") -- read first line
file:close()
return content
end
return nil
end)(),
},
settings = {
intelephense = {