Skip to content

Feature Request: Allow Selective Disabling of Language Services #1410

@kv9898

Description

@kv9898

Describe the Bug

First off — huge thanks for developing Pyrefly! It’s a fast, modern Python language server and a breath of fresh air for those of us juggling multiple tooling setups.

Problem

Currently, Pyrefly offers a single setting:

"python.pyrefly.disableLanguageServices": true

This disables all LSP-provided language features such as completions, hovers, definitions, document symbols, etc. While that’s useful for running Pyrefly in “type checker only” mode, it’s a bit too all-or-nothing.

In many setups (especially editors with built-in Python extensions or alternative LSPs), users may want to:

Keep certain Pyrefly features (e.g. type checking, diagnostics, inlay hints)

  • Disable others (e.g. hover, outline/documentSymbols, completions)
  • to avoid duplicate or conflicting outputs.

For example, in a VS Code-based environment like Positron, users might want to run both:

  • The built-in Python extension (for console, variable pane), and
  • Pyrefly (for type checking, squiggles, and inlay hints).

At present, both LSPs provide overlapping features, leading to duplicate hovers, outlines, and symbols.

Feature Request

It would be great to have granular control over which language service capabilities Pyrefly registers. For example:

"python.pyrefly.enableCompletions": true,
"python.pyrefly.enableHover": false,
"python.pyrefly.enableDocumentSymbols": false,
"python.pyrefly.enableDefinitions": false,
"python.pyrefly.enableInlayHints": true,
"python.pyrefly.enableDiagnostics": true

This would let users compose Pyrefly cleanly with other servers — keeping its excellent type checking and inlay hints without UI duplication or feature clashes.

Why it matters

  • Improves interoperability with other LSPs and editor extensions.
  • Reduces UI clutter (no duplicate outlines or hovers).
  • Makes Pyrefly more flexible for advanced/mixed setups.
  • Provides a simpler alternative to disabling the entire language-service layer.

Bonus

If technically feasible, exposing these options through the CLI (pyrefly lsp --disable-hover --disable-symbols) or the LSP Arguments field in the VS Code extension would also be welcome.

Sandbox Link

No response

(Only applicable for extension issues) IDE Information

Positron Version: 2025.11.0 (system setup) build 197
Code - OSS Version: 1.105.0
Commit: a4f9d35101d79e58e99d757d710da1ff2fdfcef0
Date: 2025-10-28T07:33:50.875Z
Electron: 37.6.0
Chromium: 138.0.7204.251
Node.js: 22.19.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26100

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions