File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ The plugin follows [python-lsp-server's
6262configuration] ( https://github.com/python-lsp/python-lsp-server/#configuration ) . These are
6363the valid configuration keys:
6464
65- - ` pylsp.plugins.ruff.enabled ` : boolean to enable/disable the plugin. ` true ` by default.
65+ - ` pylsp.plugins.ruff.enabled ` : Boolean to enable/disable the plugin. ` true ` by default.
6666 - ` pylsp.plugins.ruff.config ` : Path to optional ` pyproject.toml ` file.
6767 - ` pylsp.plugins.ruff.exclude ` : Exclude files from being checked by ` ruff ` .
6868 - ` pylsp.plugins.ruff.executable ` : Path to the ` ruff ` executable. Uses ` os.executable -m "ruff" ` by default.
@@ -73,7 +73,8 @@ the valid configuration keys:
7373 - ` pylsp.plugins.ruff.select ` : List of error codes to enable.
7474 - ` pylsp.plugins.ruff.extendSelect ` : Same as select, but append to existing error codes.
7575 - ` pylsp.plugins.ruff.format ` : List of error codes to fix during formatting. The default is ` ["I"] ` , any additional codes are appended to this list.
76- - ` pylsp.plugins.ruff.unsafeFixes ` : boolean that enables/disables fixes that are marked "unsafe" by ` ruff ` . ` false ` by default.
76+ - ` pylsp.plugins.ruff.unsafeFixes ` : Boolean that enables/disables fixes that are marked "unsafe" by ` ruff ` . ` false ` by default.
77+ - ` pylsp.plugins.ruff.preview ` : Boolean that enables/disables rules & fixes that are marked "preview" by ` ruff ` . ` false ` by default.
7778 - ` pylsp.plugins.ruff.severities ` : Dictionary of custom severity levels for specific codes, see [ below] ( #custom-severities ) .
7879
7980For more information on the configuration visit [ Ruff's homepage] ( https://beta.ruff.rs/docs/configuration/ ) .
Original file line number Diff line number Diff line change @@ -533,6 +533,9 @@ def build_arguments(
533533 if settings .line_length :
534534 args .append (f"--line-length={ settings .line_length } " )
535535
536+ if settings .preview :
537+ args .append ("--preview" )
538+
536539 if settings .unsafe_fixes :
537540 args .append ("--unsafe-fixes" )
538541
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ class PluginSettings:
2323
2424 format : Optional [List [str ]] = None
2525
26+ preview : bool = False
2627 unsafe_fixes : bool = False
2728
2829 severities : Optional [Dict [str , str ]] = None
You can’t perform that action at this time.
0 commit comments