Skip to content

Commit

Permalink
fix: scope and buf number in setting options
Browse files Browse the repository at this point in the history
  • Loading branch information
Alienover committed Sep 5, 2024
1 parent a29c534 commit 252d56a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/rest-nvim/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ end
function utils.gq_lines(lines, filetype)
logger.debug("formatting with `gq`")
local format_buf = vim.api.nvim_create_buf(false, true)
local ok, errmsg = pcall(vim.api.nvim_set_option_value, "filetype", filetype, { scope = "local", buf = format_buf })
local ok, errmsg = pcall(vim.api.nvim_set_option_value, "filetype", filetype, { buf = format_buf })
if not ok then
local msg = ("Can't set filetype to '%s' (%s). Formatting is canceled"):format(filetype, errmsg)
logger.warn(msg)
Expand Down

0 comments on commit 252d56a

Please sign in to comment.