1
0
Fork 0

formatter: reenable trailing whitespaces

This commit is contained in:
Felipe 2023-06-25 21:54:59 -04:00
parent 722dbbbf40
commit 92f6f79316
Signed by: pitbuster
SSH key fingerprint: SHA256:HDYu2Pm4/TmSX8GBwV49UvFWr1Ljg8XlHxKeCpjJpOk

View file

@ -124,7 +124,13 @@ formatter.setup({
require("formatter.filetypes.lua").stylua,
},
},
["*"] = {
-- "formatter.filetypes.any" defines default configurations for any
-- filetype
require("formatter.filetypes.any").remove_trailing_whitespace
}
})
---- LSP ----
local lsp = require("lspconfig")
@ -183,7 +189,7 @@ local servers = {
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
callback = function()
local lsp_format = false
for _, client in pairs(vim.lsp.get_active_clients({ bufnr = 0 })) do
for _, client in pairs(vim.lsp.buf_get_clients()) do
if client.server_capabilities.documentFormattingProvider then
lsp_format = true
break