Nvim format on save fix

Signed-off-by: Sagi Dayan <sagidayan@gmail.com>
This commit is contained in:
Sagi Dayan 2023-04-23 17:43:03 +03:00
parent 6bf0b284f9
commit 635d261dcc
Signed by: sagi
GPG key ID: FAB96BFC63B46458

View file

@ -4,9 +4,9 @@ local M = {}
M.setup = function()
local signs = {
{ name = "DiagnosticSignError", text = "" },
{ name = "DiagnosticSignWarn", text = "" },
{ name = "DiagnosticSignHint", text = "" },
{ name = "DiagnosticSignInfo", text = "" },
{ name = "DiagnosticSignWarn", text = "" },
{ name = "DiagnosticSignHint", text = "" },
{ name = "DiagnosticSignInfo", text = "" },
}
for _, sign in ipairs(signs) do
@ -79,7 +79,7 @@ M.on_attach = function(client, bufnr)
--end
lsp_keymaps(bufnr)
lsp_highlight_document(client, bufnr)
vim.cmd [[autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync()]]
vim.cmd [[autocmd BufWritePre <buffer> lua vim.lsp.buf.format()]]
end
local capabilities = vim.lsp.protocol.make_client_capabilities()