Fix nvim :Format command

This commit is contained in:
Talia 2023-12-12 11:32:03 +01:00
parent ea92572a62
commit 33e5350bbb

View file

@ -34,5 +34,7 @@ return function(_, bufnr)
end
--vim.keymap.set('n', '<leader>f', vim.lsp.buf.formatting, bufopts)
vim.api.nvim_buf_create_user_command(bufnr, "Format", vim.lsp.buf.format, {})
vim.api.nvim_buf_create_user_command(bufnr, "Format", function()
vim.lsp.buf.format()
end, {})
end