From 252d56a7334838e2406ebd58f780e3d9becfbf73 Mon Sep 17 00:00:00 2001 From: Jiarong Date: Thu, 5 Sep 2024 13:41:25 -0700 Subject: [PATCH] fix: scope and buf number in setting options --- lua/rest-nvim/utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/rest-nvim/utils.lua b/lua/rest-nvim/utils.lua index 30549df..7583fc1 100644 --- a/lua/rest-nvim/utils.lua +++ b/lua/rest-nvim/utils.lua @@ -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)