|
|
|
@@ -75,13 +75,20 @@ tail -f /tmp/lsp_bridge_debug.log
|
|
|
|
|
|
|
|
|
|
|
|
## Neovim setup
|
|
|
|
## 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
|
|
|
|
```lua
|
|
|
|
-- In your LSP config (e.g. ~/.config/nvim/lua/lsp.lua)
|
|
|
|
-- In your LSP config (e.g. ~/.config/nvim/lua/lsp.lua)
|
|
|
|
|
|
|
|
local BRIDGE = "/Users/lrihni/Projects/iLSP/scripts/lsp_bridge_debug.sh"
|
|
|
|
|
|
|
|
|
|
|
|
-- Bicep
|
|
|
|
-- Bicep
|
|
|
|
vim.lsp.start({
|
|
|
|
vim.lsp.start({
|
|
|
|
name = "ilsp-bicep",
|
|
|
|
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]),
|
|
|
|
root_dir = vim.fs.dirname(vim.fs.find({ "bicepconfig.json", ".git" }, { upward = true })[1]),
|
|
|
|
filetypes = { "bicep" },
|
|
|
|
filetypes = { "bicep" },
|
|
|
|
})
|
|
|
|
})
|
|
|
|
@@ -89,7 +96,7 @@ vim.lsp.start({
|
|
|
|
-- YAML (pipeline files)
|
|
|
|
-- YAML (pipeline files)
|
|
|
|
vim.lsp.start({
|
|
|
|
vim.lsp.start({
|
|
|
|
name = "ilsp-yaml",
|
|
|
|
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]),
|
|
|
|
root_dir = vim.fs.dirname(vim.fs.find({ ".git" }, { upward = true })[1]),
|
|
|
|
filetypes = { "yaml" },
|
|
|
|
filetypes = { "yaml" },
|
|
|
|
})
|
|
|
|
})
|
|
|
|
@@ -97,7 +104,7 @@ vim.lsp.start({
|
|
|
|
-- Python
|
|
|
|
-- Python
|
|
|
|
vim.lsp.start({
|
|
|
|
vim.lsp.start({
|
|
|
|
name = "ilsp-python",
|
|
|
|
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]),
|
|
|
|
root_dir = vim.fs.dirname(vim.fs.find({ "pyproject.toml", ".git" }, { upward = true })[1]),
|
|
|
|
filetypes = { "python" },
|
|
|
|
filetypes = { "python" },
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|