Mercurial > dotfiles
comparison .chezmoitemplates/init.lua @ 729:58fc7cc955d1
feat: disable sumneko formatting
author | zegervdv <zegervdv@me.com> |
---|---|
date | Mon, 12 Dec 2022 18:35:07 +0100 |
parents | b9c330fc7a79 |
children | 342a9bb455c8 |
comparison
equal
deleted
inserted
replaced
728:b9c330fc7a79 | 729:58fc7cc955d1 |
---|---|
1118 nmap('ga', vim.lsp.buf.code_action, opts) | 1118 nmap('ga', vim.lsp.buf.code_action, opts) |
1119 | 1119 |
1120 vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(vim.lsp.handlers.hover, { border = 'single' }) | 1120 vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(vim.lsp.handlers.hover, { border = 'single' }) |
1121 vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(vim.lsp.handlers.hover, { border = 'single' }) | 1121 vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(vim.lsp.handlers.hover, { border = 'single' }) |
1122 | 1122 |
1123 if client.name == 'sumneko_lua' then | |
1124 client.server_capabilities.documentFormattingProvider = false | |
1125 client.server_capabilities.documentRangeFormattingProvider = false | |
1126 end | |
1127 | |
1123 if client.supports_method 'textDocument/rangeFormatting' then | 1128 if client.supports_method 'textDocument/rangeFormatting' then |
1124 local root = vim.fs.find({ '.git', '.hg' }, { path = client.config.root_dir }) | 1129 local root = vim.fs.find({ '.git', '.hg' }, { path = client.config.root_dir }) |
1125 local vcs = 'git' | 1130 local vcs = 'git' |
1126 if root then vcs = vim.fs.basename(root[1]):sub(2) end | 1131 if root then vcs = vim.fs.basename(root[1]):sub(2) end |
1127 | 1132 |