Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

single file mode: root directory not found with Netrw "scp://" buffer #3371

Open
mattthhh opened this issue Oct 14, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@mattthhh
Copy link

Description

Hello, i'm using a lot scp to open and editing my files remotely. To open them, I always precise the path of the remote file in the CLI as : nvim scp://remoteserv/file.txt

But when I do this, my LSP doesn't load and I think this is because it cannot find the root directory (or getting to single file mode). That is the output of my LspInfo :

lspconfig: require("lspconfig.health").check()

LSP configs active in this session (globally)
- Configured servers: pylsp
- OK Deprecated servers: (none)

LSP configs active in this buffer (id=1)
- Language client log: ~/.local/state/nvim/lsp.log
- Detected filetype: python
- 0 client(s) attached to this buffer
- Other clients that match the "python" filetype:
- Config: pylsp
  filetypes:         python
  root directory:    ~/Not found.
  cmd:               ~/.local/bin/pylsp
  cmd is executable: true
  autostart:         true
  custom handlers:

Is there a way to fix that ?

@mattthhh mattthhh added the bug Something isn't working label Oct 14, 2024
@justinmk
Copy link
Member

Possibly could be handled by single-file mode.

The larger topic of remote handling is tracked in neovim/neovim#21635

@justinmk justinmk changed the title Root directory not found opening single file with Netrw single file mode: root directory not found with Netrw "scp://" buffer Oct 14, 2024
@slaweallx
Copy link

hmm. to enable LSP to detect the root directory when opening files with scp:// in Neovim, activate single-file mode or manually set the root_dir parameter...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants