lsp-format.nvim icon indicating copy to clipboard operation
lsp-format.nvim copied to clipboard

support sync save for global

Open junnplus opened this issue 3 years ago • 1 comments

I need to set synchronization options for different filetypes, is there a way to set them globally?

junnplus avatar Aug 05 '22 03:08 junnplus

No, there is no built in way to set options globally.

But you could script this pretty easly like so

local config = {}
for _, v in pairs(vim.fn.getcompletion("", "filetype")) do
    config[v] = { sync = true }
end
require("lsp-format").setup(config)

lukas-reineke avatar Aug 05 '22 06:08 lukas-reineke