From 3e83987900bbd1d951bc1c7b7af80d566744a022 Mon Sep 17 00:00:00 2001 From: Mitchell Hanberg Date: Sun, 25 Jun 2023 16:17:29 -0400 Subject: [PATCH] fix: use correct directory for symbol table (#34) --- lib/next_ls/lsp_supervisor.ex | 2 +- lib/next_ls/symbol_table.ex | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/next_ls/lsp_supervisor.ex b/lib/next_ls/lsp_supervisor.ex index 3cbe0769..56f371f2 100644 --- a/lib/next_ls/lsp_supervisor.ex +++ b/lib/next_ls/lsp_supervisor.ex @@ -37,7 +37,7 @@ defmodule NextLS.LSPSupervisor do {Task.Supervisor, name: NextLS.TaskSupervisor}, {GenLSP.Buffer, buffer_opts}, {NextLS.DiagnosticCache, name: :diagnostic_cache}, - {NextLS.SymbolTable, name: :symbol_table, path: Path.expand("~/.cache/nvim/elixir-tools.nvim")}, + {NextLS.SymbolTable, name: :symbol_table, path: Path.expand(".elixir-tools")}, {Registry, name: NextLS.ExtensionRegistry, keys: :duplicate}, {NextLS, cache: :diagnostic_cache, diff --git a/lib/next_ls/symbol_table.ex b/lib/next_ls/symbol_table.ex index 45b4646a..ef3b6187 100644 --- a/lib/next_ls/symbol_table.ex +++ b/lib/next_ls/symbol_table.ex @@ -25,6 +25,8 @@ defmodule NextLS.SymbolTable do def init(args) do path = Keyword.fetch!(args, :path) + File.mkdir_p!(path) + {:ok, name} = :dets.open_file(:symbol_table, file: Path.join(path, "symbol_table.dets") |> String.to_charlist(),