You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By 'workspace', I mean a working directory that has a pyproject.toml/ruff.toml configuration file. When hx is used outside of a workspace, the server simply does not work with any opened files. None of the functions the server provides work as expected.
These are the associated error logs:
2024-05-01T20:30:48.048 helix_lsp::transport [ERROR] ruff err <- "├─ 0.003277s 0ms WARN ruff_server::session::workspace Workspace not found for file:///<filepath>. Global settings will be used for this document\n"
2024-05-01T20:30:48.048 helix_lsp::transport [ERROR] ruff err <- " 0.003399s ERROR ruff_server::server::api An error occurred while running textDocument/didOpen: Unable to take snapshot for document with URL file:///<filepath>
My assumption is that we don't register a workspace on the server that can 'capture' the opened file, which means that the document is never registered as open (thus, we are unable to take a snapshot of it). We need a better way to handle documents outside of an existing workspace (the best solution may just be to instantiate a new workspace in the session when this happens).
Workaround
To work around this issue, create an empty configuration file from the directory where you launch the editor, using touch ruff.toml.
The text was updated successfully, but these errors were encountered:
snowsignal
changed the title
ruff server fails to work in Helix when outside of a workspaceruff server fails to work in Neovim or Helix when outside of a workspace
May 8, 2024
By 'workspace', I mean a working directory that has a
pyproject.toml
/ruff.toml
configuration file. Whenhx
is used outside of a workspace, the server simply does not work with any opened files. None of the functions the server provides work as expected.These are the associated error logs:
My assumption is that we don't register a workspace on the server that can 'capture' the opened file, which means that the document is never registered as open (thus, we are unable to take a snapshot of it). We need a better way to handle documents outside of an existing workspace (the best solution may just be to instantiate a new workspace in the session when this happens).
Workaround
To work around this issue, create an empty configuration file from the directory where you launch the editor, using
touch ruff.toml
.The text was updated successfully, but these errors were encountered: