diff --git a/README.md b/README.md index f026f77..7e9addc 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,8 @@ gc_interval = 10 # every 10 seconds # ports below 1024 will typically require root privileges and should be # avoided, the default was picked at random, this only needs to change if # another application happens to collide with ra-multiplex. +# +# on unix platforms, this can also be the path of a unix domain socket listen = ["127.0.0.1", 27631] # localhost & some random unprivileged port # listen = "/var/run/ra-mux/ra-mux.sock" # unix socket diff --git a/examples/neovim/init.lua b/examples/neovim/init.lua index 5571a92..7deb3a9 100644 --- a/examples/neovim/init.lua +++ b/examples/neovim/init.lua @@ -1,5 +1,7 @@ require'lspconfig'.rust_analyzer.setup { cmd = vim.lsp.rpc.connect("127.0.0.1", 27631), + -- When using unix domain sockets, use something like: + --cmd = vim.lsp.rpc.domain_socket_connect("/path/to/ra-multiplex.sock"), init_options = { lspMux = { version = "1", diff --git a/src/lsp/jsonrpc.rs b/src/lsp/jsonrpc.rs index bf00ca0..4b7617c 100644 --- a/src/lsp/jsonrpc.rs +++ b/src/lsp/jsonrpc.rs @@ -197,7 +197,7 @@ mod tests { fn test(input: Value) { let deserialized = from_value::(input.clone()).expect("failed to deserialize"); - let serialized = to_value(&deserialized).expect("failed to serialize"); + let serialized = to_value(deserialized).expect("failed to serialize"); assert_eq!(input, serialized); }