diff options
Diffstat (limited to 'nvim/completion.lua')
| -rw-r--r-- | nvim/completion.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nvim/completion.lua b/nvim/completion.lua index d477367..4b7f335 100644 --- a/nvim/completion.lua +++ b/nvim/completion.lua | |||
| @@ -5,9 +5,10 @@ vim.api.nvim_create_autocmd("LspAttach", { | |||
| 5 | vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = true }) | 5 | vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = true }) |
| 6 | end | 6 | end |
| 7 | 7 | ||
| 8 | if client and not client:supports_method('textDocument/willSaveWaitUntil') and client:supports_method('textDocument/formatting') then | 8 | if client and not client:supports_method('textDocument/willSaveWaitUntil') and |
| 9 | client:supports_method('textDocument/formatting') then | ||
| 9 | vim.api.nvim_create_autocmd('BufWritePre', { | 10 | vim.api.nvim_create_autocmd('BufWritePre', { |
| 10 | group = vim.api.nvim_create_augroup('my.lsp', {clear=false}), | 11 | group = vim.api.nvim_create_augroup('my.lsp', { clear = false }), |
| 11 | buffer = ev.buf, | 12 | buffer = ev.buf, |
| 12 | callback = function() | 13 | callback = function() |
| 13 | vim.lsp.buf.format({ bufnr = ev.buf, id = client.id, timeout_ms = 1000 }) | 14 | vim.lsp.buf.format({ bufnr = ev.buf, id = client.id, timeout_ms = 1000 }) |
| @@ -18,4 +19,3 @@ vim.api.nvim_create_autocmd("LspAttach", { | |||
| 18 | }) | 19 | }) |
| 19 | 20 | ||
| 20 | vim.o.winborder = 'rounded' | 21 | vim.o.winborder = 'rounded' |
| 21 | |||
