Skip to content

Commit 165a03c

Browse files
committed
fix: use correct spelling of Next LS in logs
1 parent 92248b6 commit 165a03c

File tree

8 files changed

+23
-23
lines changed

8 files changed

+23
-23
lines changed

lib/next_ls.ex

+11-11
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ defmodule NextLS do
612612
e ->
613613
GenLSP.warning(
614614
lsp,
615-
"[NextLS] Failed to run completion request: #{Exception.format_banner(:error, e, __STACKTRACE__)}"
615+
"[Next LS] Failed to run completion request: #{Exception.format_banner(:error, e, __STACKTRACE__)}"
616616
)
617617

618618
{:reply, [], lsp}
@@ -687,7 +687,7 @@ defmodule NextLS do
687687
end
688688

689689
def handle_request(%{method: method}, lsp) do
690-
GenLSP.warning(lsp, "[NextLS] Method Not Found: #{method}")
690+
GenLSP.warning(lsp, "[Next LS] Method Not Found: #{method}")
691691

692692
{:reply,
693693
%ErrorResponse{
@@ -698,7 +698,7 @@ defmodule NextLS do
698698

699699
@impl true
700700
def handle_notification(%Initialized{}, lsp) do
701-
GenLSP.log(lsp, "[NextLS] NextLS v#{version()} has initialized!")
701+
GenLSP.log(lsp, "[Next LS] NextLS v#{version()} has initialized!")
702702

703703
with opts when is_list(opts) <- lsp.assigns.auto_update do
704704
{:ok, _} =
@@ -748,7 +748,7 @@ defmodule NextLS do
748748
})
749749
end
750750

751-
GenLSP.log(lsp, "[NextLS] Booting runtimes...")
751+
GenLSP.log(lsp, "[Next LS] Booting runtimes...")
752752

753753
parent = self()
754754

@@ -775,7 +775,7 @@ defmodule NextLS do
775775
on_initialized: fn status ->
776776
if status == :ready do
777777
Progress.stop(lsp, token, "NextLS runtime for folder #{name} has initialized!")
778-
GenLSP.log(lsp, "[NextLS] Runtime for folder #{name} is ready...")
778+
GenLSP.log(lsp, "[Next LS] Runtime for folder #{name} is ready...")
779779

780780
msg = {:runtime_ready, name, self()}
781781

@@ -789,7 +789,7 @@ defmodule NextLS do
789789

790790
send(parent, {:runtime_failed, name, status})
791791

792-
GenLSP.error(lsp, "[NextLS] Runtime for folder #{name} failed to initialize")
792+
GenLSP.error(lsp, "[Next LS] Runtime for folder #{name} failed to initialize")
793793
end
794794
end,
795795
logger: lsp.assigns.logger
@@ -870,7 +870,7 @@ defmodule NextLS do
870870
names = Enum.map(entries, fn {_, %{name: name}} -> name end)
871871

872872
for %{name: name, uri: uri} <- added, name not in names do
873-
GenLSP.log(lsp, "[NextLS] Adding workspace folder #{name}")
873+
GenLSP.log(lsp, "[Next LS] Adding workspace folder #{name}")
874874
token = Progress.token()
875875
Progress.start(lsp, token, "Initializing NextLS runtime for folder #{name}...")
876876
parent = self()
@@ -890,7 +890,7 @@ defmodule NextLS do
890890
on_initialized: fn status ->
891891
if status == :ready do
892892
Progress.stop(lsp, token, "NextLS runtime for folder #{name} has initialized!")
893-
GenLSP.log(lsp, "[NextLS] Runtime for folder #{name} is ready...")
893+
GenLSP.log(lsp, "[Next LS] Runtime for folder #{name} is ready...")
894894

895895
msg = {:runtime_ready, name, self()}
896896

@@ -904,7 +904,7 @@ defmodule NextLS do
904904

905905
send(parent, {:runtime_failed, name, status})
906906

907-
GenLSP.error(lsp, "[NextLS] Runtime for folder #{name} failed to initialize")
907+
GenLSP.error(lsp, "[Next LS] Runtime for folder #{name} failed to initialize")
908908
end
909909
end,
910910
logger: lsp.assigns.logger
@@ -915,7 +915,7 @@ defmodule NextLS do
915915
names = Enum.map(removed, & &1.name)
916916

917917
for {pid, %{name: name}} <- entries, name in names do
918-
GenLSP.log(lsp, "[NextLS] Removing workspace folder #{name}")
918+
GenLSP.log(lsp, "[Next LS] Removing workspace folder #{name}")
919919
NextLS.Runtime.stop(lsp.assigns.dynamic_supervisor, pid)
920920
end
921921
end)
@@ -1102,7 +1102,7 @@ defmodule NextLS do
11021102
end
11031103

11041104
def handle_info(message, lsp) do
1105-
GenLSP.log(lsp, "[NextLS] Unhandled message: #{inspect(message)}")
1105+
GenLSP.log(lsp, "[Next LS] Unhandled message: #{inspect(message)}")
11061106
{:noreply, lsp}
11071107
end
11081108

lib/next_ls/logger.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ defmodule NextLS.Logger do
2323
end
2424

2525
def handle_cast({:log, type, msg}, state) do
26-
apply(GenLSP, type, [state.lsp, String.trim("[NextLS] #{msg}")])
26+
apply(GenLSP, type, [state.lsp, String.trim("[Next LS] #{msg}")])
2727

2828
case type do
2929
:log -> Logger.debug(msg)

test/next_ls/dependency_test.exs

+4-4
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ defmodule NextLS.DependencyTest do
8989
end)
9090

9191
assert_notification "window/logMessage", %{
92-
"message" => "[NextLS] Running `mix deps.get` in directory" <> _,
92+
"message" => "[Next LS] Running `mix deps.get` in directory" <> _,
9393
"type" => 3
9494
}
9595

9696
assert_notification "window/logMessage", %{
97-
"message" => "[NextLS] Restarting runtime" <> _,
97+
"message" => "[Next LS] Restarting runtime" <> _,
9898
"type" => 3
9999
}
100100

@@ -151,12 +151,12 @@ defmodule NextLS.DependencyTest do
151151
end)
152152

153153
assert_notification "window/logMessage", %{
154-
"message" => "[NextLS] Running `mix deps.get` in directory" <> _,
154+
"message" => "[Next LS] Running `mix deps.get` in directory" <> _,
155155
"type" => 3
156156
}
157157

158158
assert_notification "window/logMessage", %{
159-
"message" => "[NextLS] Restarting runtime" <> _,
159+
"message" => "[Next LS] Restarting runtime" <> _,
160160
"type" => 3
161161
}
162162

test/next_ls/diagnostics_test.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ defmodule NextLS.DiagnosticsTest do
5858
assert :ok == notify(client, %{method: "initialized", jsonrpc: "2.0", params: %{}})
5959

6060
assert_notification "window/logMessage", %{
61-
"message" => "[NextLS] NextLS v" <> _,
61+
"message" => "[Next LS] NextLS v" <> _,
6262
"type" => 4
6363
}
6464

test/next_ls/extensions/credo_extension_test.exs

+3-3
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ defmodule NextLS.CredoExtensionTest do
7575
assert_compiled(context, "my_proj")
7676

7777
assert_notification "window/logMessage", %{
78-
"message" => "[NextLS] [extension] Credo disabled",
78+
"message" => "[Next LS] [extension] Credo disabled",
7979
"type" => 3
8080
}
8181
end
@@ -88,7 +88,7 @@ defmodule NextLS.CredoExtensionTest do
8888
assert_compiled(context, "my_proj")
8989

9090
assert_notification "window/logMessage", %{
91-
"message" => "[NextLS] [extension] Credo initializing with options" <> _,
91+
"message" => "[Next LS] [extension] Credo initializing with options" <> _,
9292
"type" => 3
9393
}
9494

@@ -126,7 +126,7 @@ defmodule NextLS.CredoExtensionTest do
126126
assert_notification "$/progress", %{"value" => %{"kind" => "end", "message" => "Finished indexing!"}}
127127

128128
assert_notification "window/logMessage", %{
129-
"message" => "[NextLS] [extension] Credo initializing with options" <> _,
129+
"message" => "[Next LS] [extension] Credo initializing with options" <> _,
130130
"type" => 3
131131
}
132132

test/next_ls/workspaces_test.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ defmodule NextLS.WorkspacesTest do
8888
}
8989
})
9090

91-
message = "[NextLS] The runtime for #{context.module}-proj_two has successfully shut down."
91+
message = "[Next LS] The runtime for #{context.module}-proj_two has successfully shut down."
9292

9393
assert_notification "window/logMessage", %{
9494
"message" => ^message

test/next_ls_test.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ defmodule NextLSTest do
8484
})
8585

8686
assert_notification "window/logMessage", %{
87-
"message" => "[NextLS] Method Not Found: textDocument/signatureHelp",
87+
"message" => "[Next LS] Method Not Found: textDocument/signatureHelp",
8888
"type" => 2
8989
}
9090

test/support/utils.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ defmodule NextLS.Support.Utils do
9999
timeout \\ Application.get_env(:ex_unit, :assert_receive_timeout)
100100
) do
101101
quote do
102-
message = "[NextLS] Runtime for folder #{unquote(context).module}-#{unquote(name)} is ready..."
102+
message = "[Next LS] Runtime for folder #{unquote(context).module}-#{unquote(name)} is ready..."
103103

104104
assert_notification "window/logMessage", %{"message" => ^message}, unquote(timeout)
105105
end

0 commit comments

Comments
 (0)