Skip to content

Commit a394bf4

Browse files
committed
update docs
1 parent 85cfc56 commit a394bf4

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,9 +385,9 @@ To ensure that the correct environment is set up, you can create a setup script
385385

386386
In the setup script the environment variable `ELS_MODE` available and set to either `debugger` or `language_server` to help you decide what to do.
387387

388-
Note: The setup script must not read from `stdin` and write to `stdout` and `stderr`. On unix/linux/macOS
389-
this might be accomplished by adding `>/dev/null` and/or `2>/dev/null` at the end of any line that produces
390-
output, and for a windows batch script you will want `@echo off` at the top and `>nul` and/or `2>nul`.
388+
Note: The setup script must not read from `stdin` and write to `stdout`. On unix/linux/macOS
389+
this might be accomplished by adding `>/dev/null` at the end of any line that produces
390+
output, and for a windows batch script you will want `@echo off` at the top and `>nul`.
391391

392392
## Environment variables
393393

apps/elixir_ls_utils/lib/output_device.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
defmodule ElixirLS.Utils.OutputDevice do
22
@moduledoc """
33
Intercepts IO request messages and forwards them to the Output server to be sent as events to
4-
the IDE. Implements Erlang I/O Protocol https://erlang.org/doc/apps/stdlib/io_protocol.html
4+
the IDE. Implements [Erlang I/O Protocol](https://erlang.org/doc/apps/stdlib/io_protocol.html)
55
66
In order to send console output to Visual Studio Code, the debug adapter needs to send events
77
using the usual wire protocol. In order to intercept the debugged code's output, we replace the

guides/initialization.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ When launching the elixir_ls server using the scripts, the initialization steps
1111
7. Gets the "initialize" request
1212
8. Starts building/analyzing the project
1313

14-
## Replace default IO with Json RPC notifications
14+
## Replace default IO with JSON-RPC notifications
1515

16-
The Language Server protocol mandates that all communication between servers are made using UTF-16. BEAM is UTF-8 as default currently (was latin1 in the past which is a type of UTF-16). So, in order to have this kind of encoding/decoding out of the way, it first overrides two processes started by all BEAM instances: `:user` and `:stderr`.
16+
The Language Server Protocol and Debugger Adapter Protocol mandate that all communication between the client and the server is made using UTF-8 encoded JSON-RPC based protocol. See [LSP Base Protocol](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#baseProtocol) and [DAP Base Protocol](https://microsoft.github.io/debug-adapter-protocol/overview/#base-protocol). BEAM character IO is UTF-8 as default currently (was latin1 in the past which is a type of UTF-16). So, in order to have this kind of encoding/decoding out of the way, it first overrides two processes started by all BEAM instances: `:user` and `:stderr` with `ElixirLS.Utils.OutputDevice` in `ElixirLS.Utils.WireProtocol` module.
1717

1818
The first process is the name for standard IO while the second is the the standard error. They are both IO servers, that means, `:gen_server` implementations that follows the [IO protocol](http://erlang.org/doc/apps/stdlib/io_protocol.html).
1919

20-
The servers delegate the callbacks to the module `ElixirLS.LanguageServer.JsonRpc`.
20+
The servers reads and decodes protocol messages in `ElixirLS.Utils.PacketStream`. Output messages are sent via `ElixirLS.LanguageServer.JsonRpc` or `ElixirLS.Debugger.Output`.
2121

2222
## Starts Mix
2323

0 commit comments

Comments
 (0)