-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
I'm using jsonnet-language-server
with the following startup args with helix-editor
[[language]]
name = "jsonnet"
file-types = ["jsonnet", "jsonnet.TEMPLATE", "libsonnet"]
formatter = { command = "jsonnetfmt", args = ["--stdio"]}
[language-server.jsonnet-lsp]
command = "jsonnet-language-server"
environment = { "JSONNET_PATH" = "~/universe" }
I have a few imports in my file that use relative paths from ~/universe
. However, I can't click through to definitions using the lsp. For example:
local foobar = import "relpath/jsonnet/export.libsonnet";
is a line at the top of my file. The LSP and helix, when I try to click to the symbol, emits the following diagnostics
910 │ 2025-03-14T18:19:17.128 helix_lsp::transport [INFO] jsonnet-language-server -> {"jsonrpc":"2.0","method":"textDocument/de
│ finition","params":{"position":{"character":66,"line":0},"textDocument":{"uri":"file:///<current_path>"}},"id":1}
911 │ 2025-03-14T18:19:17.129 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
912 │ 2025-03-14T18:19:17.378 helix_term::application [DEBUG] received editor event: IdleTimer
913 │ 2025-03-14T18:19:18.644 helix_lsp::transport [INFO] jsonnet-language-server <- {"jsonrpc":"2.0","result":[{"uri":"file://
│ /<path_to>/universe","range":{"start":{"line":0,"character":0},"end":{"line":0,"character":0}}}],"id":1}
914 │ 2025-03-14T18:19:18.644 helix_lsp::transport [INFO] jsonnet-language-server <- [{"range":{"end":{"character":0,"line":0},
│ "start":{"character":0,"line":0}},"uri":"file:///<path_to>/universe"}]
915 │ 2025-03-14T18:19:18.644 helix_view::editor [DEBUG] editor error: failed to open path: "/<path_to>/universe":
│ IrregularFile
It seems as though the LSP is saying that ~/universe is the correct path, rather than ~/universe/relpath/jsonnet/export.libsonnet
.
Additionally, this appears to crash the lsp, as helix reports a broken pipe afterward.
tenzinhl
Metadata
Metadata
Assignees
Labels
No labels