stkb/Rewrap

Wrapping in Nix is broken in a remote SSH host

lilyball opened this issue · 3 comments

When editing Nix files locally (with the jnoortheen.nix-ide extension enabled), Rewrap wraps line comments correctly. When editing files in a Remote SSH session (with the same Nix extension enabled on the remote host), Rewrap isn't detecting the comment markers and is instead just wrapping the lines (or rather, it's treating all lines as though they're a comment but without a comment marker; when testing locally Rewrap doesn't do anything to non-comment lines but in the Remote SSH window it will happily wrap non-comment lines too).

I don't see anything that looks relevant in the various outputs.

The remote machine is a NixOS machine, although I don't believe NixOS vs any other Linux should affect Rewrap.

The only thing I can think of is the Nix extension needed to be explicitly installed into the remote host (when I look at the extension page it says "Extension is enabled on 'SSH: remotemachinename'") but Rewrap didn't (it just says it's enabled globally), which I assume is because the Nix extension runs a language server, but again I wouldn't expect that to affect Rewrap.

Checking my extension host logs, rewrap is definitely one of the few extensions that runs locally instead of remote. That feels like the only real difference here. Though again I don't know why that should matter.

osksa commented

I have issues with rewrap and remote SSH too in an offline environment. Other extensions I install by choosing "Install from vsix" and the extension installs on the remote end. Rewrap installed on the local machine instead, and it does not seem to work.

Same problem with devcontainers in WSL.