nvim/lsp/intelephense.lua
Simon Lasbrugnas a2e5555c64
fix(lsp)!: actually use the root lsp/ folder and remove
lua/custom/lsp/** configs

This commit removes the need for nvim-lspconfig which is replaced by the
vim.lsp API.

The lsp/ folder is a copy of nvim-lspconfig's lsp/ folder as it makes it
easy to modify LSP configurations on the fly.

Conform: biome has been replaced with oxfmt
2026-02-02 16:16:06 +01:00

40 lines
1.1 KiB
Lua

---@brief
---
--- https://intelephense.com/
---
--- `intelephense` can be installed via `npm`:
--- ```sh
--- npm install -g intelephense
--- ```
---
--- ```lua
--- -- See https://github.com/bmewburn/intelephense-docs/blob/master/installation.md#initialisation-options
--- init_options = {
--- storagePath = …, -- Optional absolute path to storage dir. Defaults to os.tmpdir().
--- globalStoragePath = …, -- Optional absolute path to a global storage dir. Defaults to os.homedir().
--- licenceKey = …, -- Optional licence key or absolute path to a text file containing the licence key.
--- clearCache = …, -- Optional flag to clear server state. State can also be cleared by deleting {storagePath}/intelephense
--- }
--- -- See https://github.com/bmewburn/intelephense-docs
--- settings = {
--- intelephense = {
--- files = {
--- maxSize = 1000000;
--- };
--- };
--- }
--- ```
---@type vim.lsp.Config
return {
cmd = { 'intelephense', '--stdio' },
filetypes = { 'php' },
root_markers = { '.git', 'composer.json' },
settings = {
intelephense = {
telemetry = {
enabled = false,
},
},
},
}