Skip to content

lua lsp uses always current work dir when LSP initalized when editing file #512

@Konfekt

Description

@Konfekt

According to the LSP logs, the root directory is always that of the current working directory when the LSP was added:
In /path/to/lua-language-server/log/ a log file for this working directory shows up containing

  rootPath = "/home/konfekt",
  rootUri = "file:///home/konfekt/",

after Vim was started in ~/, editing a file in a project dir below ~/, throwing an error that more than 100000 files were scanned.

Instead, one would expect the rootPath to be set to the current working directory.

According to https://luals.github.io/wiki/faq/#why-is-the-server-scanning-the-wrong-folder

When not using Visual Studio Code, check the rootUri field in your configuration - some clients allow users to customize this value. If the value is correct or cannot be modified, please report the issue to the developer of the client you are using.

I am using latest LSP master and Vim 9.1.369 on Ubuntu 22.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions