From abf4a2b7ccdb2fa21ef59b66e50d9b69a746e3ef Mon Sep 17 00:00:00 2001 From: Chris Kipp Date: Mon, 16 Dec 2024 19:28:12 +0100 Subject: [PATCH] fix: make sure `make_range_params` works on nightly (#704) This should also be safe for the current stable release as it checks to see if this exists before setting it. closes #703 --- lua/metals.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/metals.lua b/lua/metals.lua index 23e0e15..3c05ad5 100644 --- a/lua/metals.lua +++ b/lua/metals.lua @@ -296,7 +296,7 @@ M.organize_imports = function() end local metals_client = lsp_clients[1] - local params = lsp.util.make_range_params() + local params = lsp.util.make_range_params(nil, "utf-8") params.context = { diagnostics = {}, only = { "source.organizeImports" } } local response = metals_client.request_sync("textDocument/codeAction", params, 1000, 0)