Skip to content

stylua --lsp should configure based on client rootUri, not the server CWD #1032

@rmuir

Description

@rmuir

In the LSP mode, stylua processes configuration relative to the CWD of stylua --lsp process, instead of the root directory passed by the LSP client in the initialize request.

This can lead to reformatting code with the wrong style: e.g. falling back to internal defaults. Unless we are lucky, often the CWD of the server process doesn't match and won't have the correct configuration files pertaining to the sources in question.

See neovim/nvim-lspconfig#4082

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions