update: nvim
This commit is contained in:
@@ -8,6 +8,13 @@ local format_modifications_only = settings.format_modifications_only
|
||||
local server_formatting_block_list = settings.server_formatting_block_list
|
||||
local format_timeout = settings.format_timeout
|
||||
|
||||
vim.api.nvim_create_user_command("Format", function()
|
||||
M.format({
|
||||
timeout = format_timeout,
|
||||
filter = M.format_filter,
|
||||
})
|
||||
end, {})
|
||||
|
||||
vim.api.nvim_create_user_command("FormatToggle", function()
|
||||
M.toggle_format_on_save()
|
||||
end, {})
|
||||
@@ -118,7 +125,7 @@ function M.format(opts)
|
||||
end
|
||||
|
||||
local bufnr = opts.bufnr or vim.api.nvim_get_current_buf()
|
||||
local clients = vim.lsp.get_clients({ buffer = bufnr })
|
||||
local clients = vim.lsp.get_clients({ bufnr = bufnr })
|
||||
|
||||
if opts.filter then
|
||||
clients = opts.filter(clients)
|
||||
|
||||
Reference in New Issue
Block a user