docs(neovim): fix broken rpc.connect example, document stdio-bridge fix
This commit is contained in:
@@ -75,13 +75,20 @@ tail -f /tmp/lsp_bridge_debug.log
|
||||
|
||||
## Neovim setup
|
||||
|
||||
> **Important**: `vim.lsp.rpc.connect(url)` does **not** speak WebSocket — it's a raw
|
||||
> TCP/pipe connector and will fail with `ENOENT` on a `wss://` URL (verified). Use
|
||||
> `cmd = { ".../scripts/lsp_bridge_debug.sh", "wss://..." }` instead (stdio ↔
|
||||
> WebSocket bridge, same one IntelliJ/LSP4IJ uses). Confirmed working end-to-end
|
||||
> (32 module completions returned) with the config below.
|
||||
|
||||
```lua
|
||||
-- In your LSP config (e.g. ~/.config/nvim/lua/lsp.lua)
|
||||
local BRIDGE = "/Users/lrihni/Projects/iLSP/scripts/lsp_bridge_debug.sh"
|
||||
|
||||
-- Bicep
|
||||
vim.lsp.start({
|
||||
name = "ilsp-bicep",
|
||||
cmd = vim.lsp.rpc.connect("wss://ilsp.i80.dk/bicep"),
|
||||
cmd = { BRIDGE, "wss://ilsp.i80.dk/bicep" },
|
||||
root_dir = vim.fs.dirname(vim.fs.find({ "bicepconfig.json", ".git" }, { upward = true })[1]),
|
||||
filetypes = { "bicep" },
|
||||
})
|
||||
@@ -89,7 +96,7 @@ vim.lsp.start({
|
||||
-- YAML (pipeline files)
|
||||
vim.lsp.start({
|
||||
name = "ilsp-yaml",
|
||||
cmd = vim.lsp.rpc.connect("wss://ilsp.i80.dk/yaml"),
|
||||
cmd = { BRIDGE, "wss://ilsp.i80.dk/yaml" },
|
||||
root_dir = vim.fs.dirname(vim.fs.find({ ".git" }, { upward = true })[1]),
|
||||
filetypes = { "yaml" },
|
||||
})
|
||||
@@ -97,7 +104,7 @@ vim.lsp.start({
|
||||
-- Python
|
||||
vim.lsp.start({
|
||||
name = "ilsp-python",
|
||||
cmd = vim.lsp.rpc.connect("wss://ilsp.i80.dk/python"),
|
||||
cmd = { BRIDGE, "wss://ilsp.i80.dk/python" },
|
||||
root_dir = vim.fs.dirname(vim.fs.find({ "pyproject.toml", ".git" }, { upward = true })[1]),
|
||||
filetypes = { "python" },
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user