From 8f6561e848879caf120d21cf9ab357a907a8e1f2 Mon Sep 17 00:00:00 2001 From: Mitchell Hanberg Date: Thu, 16 May 2024 08:56:51 -0400 Subject: [PATCH] fix: more accurate completions inside -> exprs (#480) Updates spitfire, which brings more accurate results from Spitfire.container_cursor_to_quoted. --- mix.lock | 2 +- test/next_ls/completions_test.exs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mix.lock b/mix.lock index 9720278c..e391027e 100644 --- a/mix.lock +++ b/mix.lock @@ -47,7 +47,7 @@ "req": {:hex, :req, "0.4.0", "1c759054dd64ef1b1a0e475c2d2543250d18f08395d3174c371b7746984579ce", [:mix], [{:brotli, "~> 0.3.1", [hex: :brotli, repo: "hexpm", optional: true]}, {:ezstd, "~> 1.0", [hex: :ezstd, repo: "hexpm", optional: true]}, {:finch, "~> 0.9", [hex: :finch, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:mime, "~> 1.6 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:nimble_csv, "~> 1.0", [hex: :nimble_csv, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "f53eadc32ebefd3e5d50390356ec3a59ed2b8513f7da8c6c3f2e14040e9fe989"}, "schematic": {:hex, :schematic, "0.2.1", "0b091df94146fd15a0a343d1bd179a6c5a58562527746dadd09477311698dbb1", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "0b255d65921e38006138201cd4263fd8bb807d9dfc511074615cd264a571b3b1"}, "sourceror": {:hex, :sourceror, "1.0.3", "111711c147f4f1414c07a67b45ad0064a7a41569037355407eda635649507f1d", [:mix], [], "hexpm", "56c21ef146c00b51bc3bb78d1f047cb732d193256a7c4ba91eaf828d3ae826af"}, - "spitfire": {:git, "https://github.com/elixir-tools/spitfire.git", "e47385f64db19f65b8efdd57d003272376446a4e", []}, + "spitfire": {:git, "https://github.com/elixir-tools/spitfire.git", "178b00becd55b33e080f23c9ed0d1126d57574be", []}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"}, "styler": {:hex, :styler, "0.8.1", "f3c0f65023e4bfbf7e7aa752d128b8475fdabfd30f96ee7314b84480cc56e788", [:mix], [], "hexpm", "1aa48d3aa689a639289af3d8254d40e068e98c083d6e5e3d1a695e71a147b344"}, "telemetry": {:hex, :telemetry, "1.2.1", "68fdfe8d8f05a8428483a97d7aab2f268aaff24b49e0f599faa091f1d4e7f61c", [:rebar3], [], "hexpm", "dad9ce9d8effc621708f99eac538ef1cbe05d6a874dd741de2e689c47feafed5"}, diff --git a/test/next_ls/completions_test.exs b/test/next_ls/completions_test.exs index 543fa377..6c24ce65 100644 --- a/test/next_ls/completions_test.exs +++ b/test/next_ls/completions_test.exs @@ -695,8 +695,7 @@ defmodule NextLS.CompletionsTest do assert_result 2, results assert_match %{"kind" => 6, "label" => "alice"} in results - # TODO: requires changes to spitfire - # assert_match %{"kind" => 6, "label" => "ast2"} in results + assert_match %{"kind" => 6, "label" => "ast2"} in results assert_match %{"kind" => 6, "label" => "ast1"} not in results end