@@ -92,13 +92,11 @@ require('lspconfig').pyright.setup {
9292}
9393```
9494
95- By default, Ruff will not show any logs. To enable logging in Neovim, you'll need to set the
96- [ ` trace ` ] ( https://neovim.io/doc/user/lsp.html#vim.lsp.ClientConfig ) setting to either ` messages ` or ` verbose ` , and use the
97- [ ` logLevel ` ] ( ./settings.md#loglevel ) setting to change the log level:
95+ By default, the log level for Ruff is set to ` info ` . To change the log level, you can set the
96+ [ ` logLevel ` ] ( ./settings.md#loglevel ) setting:
9897
9998``` lua
10099require (' lspconfig' ).ruff .setup {
101- trace = ' messages' ,
102100 init_options = {
103101 settings = {
104102 logLevel = ' debug' ,
@@ -107,10 +105,16 @@ require('lspconfig').ruff.setup {
107105}
108106```
109107
110- By default, this will write logs to stderr which will be available in Neovim's LSP client log file
108+ By default, Ruff will write logs to stderr which will be available in Neovim's LSP client log file
111109(` :lua vim.print(vim.lsp.get_log_path()) ` ). It's also possible to divert these logs to a separate
112110file with the [ ` logFile ` ] ( ./settings.md#logfile ) setting.
113111
112+ To view the trace logs between Neovim and Ruff, set the log level for Neovim's LSP client to ` debug ` :
113+
114+ ``` lua
115+ vim .lsp .set_log_level (' debug' )
116+ ```
117+
114118## Vim
115119
116120The [ ` vim-lsp ` ] ( https://github.com/prabirshrestha/vim-lsp ) plugin can be used to configure the Ruff Language Server in Vim.
@@ -274,26 +278,25 @@ preview = false
274278preview = true
275279```
276280
277- By default, Ruff does not log anything to Helix. To enable logging, set the ` RUFF_TRACE ` environment
278- variable to either ` messages ` or ` verbose ` , and use the [ ` logLevel ` ] ( ./settings.md#loglevel ) setting to change
279- the log level:
281+ By default, the log level for Ruff is set to ` info ` . To change the log level, you can set the
282+ [ ` logLevel ` ] ( ./settings.md#loglevel ) setting:
280283
281284``` toml
282285[language-server .ruff ]
283286command = " ruff"
284287args = [" server" ]
285- environment = { "RUFF_TRACE" = " messages" }
286288
287289[language-server .ruff .config .settings ]
288290logLevel = " debug"
289291```
290292
291293You can also divert Ruff's logs to a separate file with the [ ` logFile ` ] ( ./settings.md#logfile ) setting.
292294
293- !!! note
295+ To view the trace logs between Helix and Ruff, pass in the ` -v ` (verbose) flag when starting Helix:
294296
295- Setting `RUFF_TRACE=verbose` does not enable Helix's verbose mode by itself. You'll need to run
296- Helix with `-v` for verbose logging.
297+ ``` sh
298+ hx -v path/to/file.py
299+ ```
297300
298301## Kate
299302
0 commit comments