diff --git a/lib/next_ls.ex b/lib/next_ls.ex index c863823e..16f5af89 100644 --- a/lib/next_ls.ex +++ b/lib/next_ls.ex @@ -63,6 +63,7 @@ defmodule NextLS do extension_registry = Keyword.fetch!(args, :extension_registry) extensions = Keyword.get(args, :extensions, [NextLS.ElixirExtension]) cache = Keyword.fetch!(args, :cache) + symbol_table = Keyword.fetch!(args, :symbol_table) {:ok, assign(lsp, @@ -70,6 +71,7 @@ defmodule NextLS do documents: %{}, refresh_refs: %{}, cache: cache, + symbol_table: symbol_table, task_supervisor: task_supervisor, dynamic_supervisor: dynamic_supervisor, extension_registry: extension_registry, diff --git a/test/next_ls/symbol_table_test.exs b/test/next_ls/symbol_table_test.exs index 8dd92416..14db538e 100644 --- a/test/next_ls/symbol_table_test.exs +++ b/test/next_ls/symbol_table_test.exs @@ -16,7 +16,7 @@ defmodule NextLS.SymbolTableTest do assert :sys.get_state(pid).table == :symbol_table end - test "builds the symbol table", %{dir: dir, pid: pid} do + test "builds the symbol table", %{pid: pid} do symbols = symbols() SymbolTable.put_symbols(pid, symbols) diff --git a/test/next_ls_test.exs b/test/next_ls_test.exs index 6b6daecf..e32f5df5 100644 --- a/test/next_ls_test.exs +++ b/test/next_ls_test.exs @@ -15,7 +15,7 @@ defmodule NextLSTest do start_supervised!({Registry, [keys: :unique, name: Registry.NextLSTest]}) extensions = [NextLS.ElixirExtension] cache = start_supervised!(NextLS.DiagnosticCache) - symbol_table = start_supervised!(NextLS.SymbolTable) + symbol_table = start_supervised!({NextLS.SymbolTable, [path: tmp_dir]}) server = server(NextLS,