mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 10:48:32 +00:00
ruff server
: Support the usage of tildes and environment variables in logFile
(#11945)
## Summary Fixes #11911. `shellexpand` is now used on `logFile` to expand the file path, allowing the usage of `~` and environment variables. ## Test Plan 1. Set `logFile` in either Neovim or Helix to a file path that needs expansion, like `~/.config/helix/ruff_logs.txt`. 2. Ensure that `RUFF_TRACE` is set to `messages` or `verbose` 3. Open a Python file in Neovim/Helix 4. Confirm that a file at the path specified was created, with the expected logs.
This commit is contained in:
parent
4c05d7a6d4
commit
c8ff89c73c
4 changed files with 41 additions and 10 deletions
|
@ -95,5 +95,7 @@ environment = { "RUFF_TRACE" = "messages" }
|
|||
|
||||
[language-server.ruff.config.settings]
|
||||
logLevel = "debug"
|
||||
logFile = "/Users/developer/.cache/helix/ruff.log"
|
||||
logFile = "~/.cache/helix/ruff.log"
|
||||
```
|
||||
|
||||
The `logFile` path supports tildes and environment variables.
|
||||
|
|
|
@ -85,8 +85,10 @@ require('lspconfig').ruff.setup {
|
|||
init_options = {
|
||||
settings = {
|
||||
logLevel = "debug",
|
||||
logFile = "your/log/file/path/log.txt"
|
||||
logFile = "~/.local/state/nvim/ruff.log"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The `logFile` path supports tildes and environment variables.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue