From c7a0954051a24b00e79e7b7961c4d9637bb2513f Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 13 Jan 2022 01:00:00 +0000 Subject: [PATCH] chore(nvim): disable formatting for now for PHP --- roles/neovim/files/lua/opdavies/lsp/init.lua | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/roles/neovim/files/lua/opdavies/lsp/init.lua b/roles/neovim/files/lua/opdavies/lsp/init.lua index ab676d6..4d8d801 100644 --- a/roles/neovim/files/lua/opdavies/lsp/init.lua +++ b/roles/neovim/files/lua/opdavies/lsp/init.lua @@ -16,6 +16,14 @@ local servers = { intelephense = { filetypes = { "php", "module", "test", "inc" }, + + on_attach = function(client) + -- Disable document formatting as I use different coding styles per + -- framework. + -- TODO: remove if editorconfig or something can format based on project. + client.resolved_capabilities.document_formatting = false + client.resolved_capabilities.document_range_formatting = false + end, }, sumneko_lua = { @@ -23,9 +31,9 @@ local servers = { Lua = { diagnostics = { globals = { "vim" }, - } - } - } + }, + }, + }, }, tailwindcss = {