Skip to content

fix(lsp): respect .stylua.toml on Windows file URIs#1079

Closed
SergioChan wants to merge 1 commit intoJohnnyMorganz:mainfrom
SergioChan:fix-lsp-windows-config-uri
Closed

fix(lsp): respect .stylua.toml on Windows file URIs#1079
SergioChan wants to merge 1 commit intoJohnnyMorganz:mainfrom
SergioChan:fix-lsp-windows-config-uri

Conversation

@SergioChan
Copy link

Summary

  • normalize LSP file URIs into filesystem paths before config and ignore resolution
  • strip the leading slash from Windows drive-letter paths (/C:/... -> C:/...) so .stylua.toml lookup works in --lsp mode
  • add URI-to-path regression tests (cfg-gated for unix/windows)

Testing

  • git diff --check
  • Could not run Rust tests in this environment because cargo is not installed (/bin/bash: cargo: command not found)

Related

Fixes #1051

@JohnnyMorganz
Copy link
Owner

Please do not open PRs if your automated system fails to verify the changes locally first, because it cannot access cargo. #1078 is already failing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stylua --lsp does not respect .stylua.toml

2 participants