Current section
29 Versions
Jump to
Current section
29 Versions
Compare versions
5
files changed
+13
additions
-10
deletions
| @@ -46,12 +46,10 @@ Using eglot: | |
| 46 46 | |
| 47 47 | ## Installation |
| 48 48 | |
| 49 | - The preferred way to use NextLS is through one of the supported editor extensions. |
| 49 | + The preferred way to use Next LS is through one of the supported editor extensions. |
| 50 50 | |
| 51 | - If you need to install NextLS on it's own, you can download the executable hosted by the GitHub release. The executable is an Elixir script that utilizes `Mix.install/2`. |
| 51 | + If you need to install Next LS on it's own, you can download the executable hosted by the GitHub release. The executable is an Elixir script that utilizes `Mix.install/2`. |
| 52 52 | |
| 53 53 | ### Note |
| 54 54 | |
| 55 | - NextLS creates an `.elixir-tools` hidden directory in your project. |
| 56 | - |
| 57 | - This should be added to your project's `.gitignore`. |
| 55 | + Next LS creates an `.elixir-tools` hidden directory in your project, but it will be automatically ignored by `git`. |
| @@ -24,4 +24,4 @@ | |
| 24 24 | {<<"optional">>,false}, |
| 25 25 | {<<"repository">>,<<"hexpm">>}, |
| 26 26 | {<<"requirement">>,<<"~> 0.4">>}]]}. |
| 27 | - {<<"version">>,<<"0.5.4">>}. |
| 27 | + {<<"version">>,<<"0.5.5">>}. |
| @@ -51,13 +51,20 @@ defmodule NextLS.LSPSupervisor do | |
| 51 51 | raise OptionsError, invalid |
| 52 52 | end |
| 53 53 | |
| 54 | + # FIXME: this directory should be inside the workspace, which will is not determined until |
| 55 | + # the LSP has begun initialization |
| 56 | + # The symbol table may need to started dynamically, like the extensions and the runtimes |
| 57 | + hidden_folder = Path.expand(".elixir-tools") |
| 58 | + File.mkdir_p!(hidden_folder) |
| 59 | + File.write!(Path.join(hidden_folder, ".gitignore"), "*\n") |
| 60 | + |
| 54 61 | children = [ |
| 55 62 | {DynamicSupervisor, name: NextLS.DynamicSupervisor}, |
| 56 63 | {Task.Supervisor, name: NextLS.TaskSupervisor}, |
| 57 64 | {Task.Supervisor, name: :runtime_task_supervisor}, |
| 58 65 | {GenLSP.Buffer, buffer_opts}, |
| 59 66 | {NextLS.DiagnosticCache, name: :diagnostic_cache}, |
| 60 | - {NextLS.SymbolTable, name: :symbol_table, path: Path.expand(".elixir-tools")}, |
| 67 | + {NextLS.SymbolTable, name: :symbol_table, path: hidden_folder}, |
| 61 68 | {Registry, name: NextLS.ExtensionRegistry, keys: :duplicate}, |
| 62 69 | {NextLS, |
| 63 70 | cache: :diagnostic_cache, |
| @@ -39,8 +39,6 @@ defmodule NextLS.SymbolTable do | |
| 39 39 | symbol_table_name = Keyword.get(args, :symbol_table_name, :symbol_table) |
| 40 40 | reference_table_name = Keyword.get(args, :reference_table_name, :reference_table) |
| 41 41 | |
| 42 | - File.mkdir_p!(path) |
| 43 | - |
| 44 42 | {:ok, name} = |
| 45 43 | :dets.open_file(symbol_table_name, |
| 46 44 | file: Path.join(path, "symbol_table.dets") |> String.to_charlist(), |
| @@ -5,7 +5,7 @@ defmodule NextLS.MixProject do | |
| 5 5 | [ |
| 6 6 | app: :next_ls, |
| 7 7 | description: "The language server for Elixir that just works", |
| 8 | - version: "0.5.4", |
| 8 | + version: "0.5.5", |
| 9 9 | elixir: "~> 1.13", |
| 10 10 | elixirc_paths: elixirc_paths(Mix.env()), |
| 11 11 | start_permanent: Mix.env() == :prod, |