Skip to content

Commit

Permalink
fix: use correct directory for symbol table (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhanberg committed Jun 25, 2023
1 parent 0a44d6c commit 3e83987
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/next_ls/lsp_supervisor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions lib/next_ls/symbol_table.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 3e83987

Please sign in to comment.