Some systems only have ancient versions of emacs available in repos, limiting packages I could install.
Maybe I should try again. Terminal mode works but requires a lot of workarounds and copy/paste integration isn't perfect.
The problem with getting lsp modes working in things like docker containers is:
- docker containers set PATH - tramp doesn't use PATH by default - even using `(add-to-list 'tramp-remote-path 'tramp-own-remote-path)` doesn't work
tramp-own-remote-path doesn't work because:
*Note* that this works only if your remote ‘/bin/sh’ shell supports
the login argument ‘-l’.
For whatever reason this doesn't work in many docker containers or perhaps is a NixOS issue... not totally sure.I need to revisit this at some point, because otherwise you have to update your tramp connections every time the PATH in the docker file changes, which for many make it a non-starter.
I'm sympathetic to the security first approach of why tramp doesn't just use PATH or the behavior of `tramp-own-remote-path` by default, but it makes working with the insecure by default rest of the IT ecosystem more difficult.
Related threads:
https://www.mail-archive.com/tramp-devel@gnu.org/msg05953.ht... https://github.com/NixOS/nixpkgs/issues/220187
The solutions are better these days for session handling in emacs with save-place-mode and one of:
persp-mode bufler (using bookmarks)
However one of the biggest advantages for me is also having things like eshell or vterm get restored. That's arguably a less emacs friendly way of doing things than say using a compile buffer or async-shell-command with proper history, but... can't change over everything all at once :)