From 523a7cc1b23b853007e200b73df8bc63b4339308 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Sun, 4 Jun 2023 02:44:33 -0600 Subject: merge(fix): changes from original repo (nvim-lua/kickstart.nvim@cdaa750c86cfc0c8f2fc1c8638b7296c327bf5a9) --- lua/kickstart/plugins/autoformat.lua | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'lua/kickstart/plugins') diff --git a/lua/kickstart/plugins/autoformat.lua b/lua/kickstart/plugins/autoformat.lua index bc56b15..88bbd57 100644 --- a/lua/kickstart/plugins/autoformat.lua +++ b/lua/kickstart/plugins/autoformat.lua @@ -28,9 +28,6 @@ return { return _augroups[client.id] end - -- Whenever an LSP attaches to a buffer, we will run this function. - -- - -- See `:help LspAttach` for more information about this autocmd event. vim.api.nvim_create_autocmd('LspAttach', { group = vim.api.nvim_create_augroup('kickstart-lsp-attach-format', { clear = true }), -- This is where we attach the autoformatting for reasonable clients @@ -50,8 +47,6 @@ return { return end - -- Create an autocmd that will run *before* we save the buffer. - -- Run the formatting command for the LSP that has just attached. vim.api.nvim_create_autocmd('BufWritePre', { group = get_augroup(client), buffer = bufnr, @@ -60,12 +55,7 @@ return { return end - vim.lsp.buf.format { - async = false, - filter = function(c) - return c.id == client.id - end, - } + vim.lsp.buf.format({ async = false }) end, }) end, -- cgit v1.2.3-70-g09d2