Skip to content

Commit

Permalink
feat(neovim): added intelephense and modified lua_ls
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroSuero committed Apr 4, 2024
1 parent 3bd70a8 commit 04eeb4b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions roles/neovim/files/lua/aome/lsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,14 @@ local custom_attach = function(client, bufnr)
filetype_attach[filetype]()
end

local get_intelephense_license = function()
local f =
assert(io.open(os.getenv "HOME" .. "/intelephense/license.txt", "rb"))
local content = f:read "*a"
f:close()
return string.gsub(content, "%s+", "")
end

local updated_capabilities = vim.lsp.protocol.make_client_capabilities()
updated_capabilities.textDocument.completion.completionItem.snippetSupport =
true
Expand Down Expand Up @@ -247,6 +255,9 @@ local servers = {
workspace = {
checkThirdParty = false,
},
diagnostics = {
globals = { "vim" },
},
completion = {
callSnippet = "Replace",
},
Expand Down Expand Up @@ -296,6 +307,13 @@ local servers = {

svelte = true,

intelephense = true,
-- intelephense = {
-- init_options = {
-- licenceKey = get_intelephense_license(),
-- },
-- },

templ = true,
gopls = {
settings = {
Expand Down

0 comments on commit 04eeb4b

Please sign in to comment.