changeset 729:58fc7cc955d1

feat: disable sumneko formatting
author zegervdv <zegervdv@me.com>
date Mon, 12 Dec 2022 18:35:07 +0100
parents b9c330fc7a79
children 342a9bb455c8
files .chezmoitemplates/init.lua
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/.chezmoitemplates/init.lua	Sun Dec 11 21:41:01 2022 +0100
+++ b/.chezmoitemplates/init.lua	Mon Dec 12 18:35:07 2022 +0100
@@ -1120,6 +1120,11 @@
   vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(vim.lsp.handlers.hover, { border = 'single' })
   vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(vim.lsp.handlers.hover, { border = 'single' })
 
+  if client.name == 'sumneko_lua' then
+    client.server_capabilities.documentFormattingProvider = false
+    client.server_capabilities.documentRangeFormattingProvider = false
+  end
+
   if client.supports_method 'textDocument/rangeFormatting' then
     local root = vim.fs.find({ '.git', '.hg' }, { path = client.config.root_dir })
     local vcs = 'git'