summaryrefslogtreecommitdiff
path: root/neovim/.config/nvim
diff options
context:
space:
mode:
authorMichaël Ball <michael.ball@krotosaudio.com>2024-10-21 09:42:12 +0100
committerMichaël Ball <michael.ball@krotosaudio.com>2024-10-21 09:42:12 +0100
commitc4e7ad2b162d6318a2923ab1563e34d16e692f15 (patch)
treea641cc8f1546085d4d5ffa68cc9a540c4943b9de /neovim/.config/nvim
parent568e452fbf19f39a414137209302ccdd3071cc0b (diff)
Set up mason.nvim and intelephense PHP language server
Diffstat (limited to 'neovim/.config/nvim')
-rw-r--r--neovim/.config/nvim/lua/plugins/nvim_lspconfig.lua19
1 files changed, 18 insertions, 1 deletions
diff --git a/neovim/.config/nvim/lua/plugins/nvim_lspconfig.lua b/neovim/.config/nvim/lua/plugins/nvim_lspconfig.lua
index 48a86c6..c977de6 100644
--- a/neovim/.config/nvim/lua/plugins/nvim_lspconfig.lua
+++ b/neovim/.config/nvim/lua/plugins/nvim_lspconfig.lua
@@ -1,15 +1,21 @@
return {
{
+ dependencies = {
+ { 'williamboman/mason.nvim' },
+ { 'williamboman/mason-lspconfig.nvim' },
+ },
'neovim/nvim-lspconfig',
lazy = false,
priority = 800,
config = function()
+ require("mason").setup()
+ require("mason-lspconfig").setup()
local nvim_lsp = require('lspconfig')
local capabilities = require('cmp_nvim_lsp').default_capabilities()
-- Use a loop to conveniently call 'setup' on multiple servers and
-- map buffer local keybindings when the language server attaches
local servers = { "bashls", "clangd", "cssls", "dockerls", "gopls", "htmx", "jsonls", "marksman",
- "phpactor", "psalm", "ruff", "rust_analyzer", "taplo", "yamlls" }
+ "ruff", "rust_analyzer", "taplo", "yamlls" }
for _, lsp in ipairs(servers) do
nvim_lsp[lsp].setup {
capabilities = capabilities,
@@ -112,6 +118,17 @@ return {
flags = {
debounce_text_changes = 150,
},
+
+ require 'lspconfig'.intelephense.setup {
+ filetypes = { 'php' },
+ capabilities = capabilities,
+ flags = {
+ debounce_text_changes = 150,
+ },
+ init_options = {
+ licenceKey = '~/.config/intelephense/license.txt',
+ },
+ }
}
-- Use LspAttach autocommand to only map the following keys