Skip to content

doctor should debug LSP issues #24

@draxxris

Description

@draxxris

Description

I can see from pstree that aft does not have a child LSP process, therefore lsp_diagnostics always returns "everything is fine". Would be nice if we could somehow debug LSP process spawning and language checking. Something like

bunx ... lsp_doctor ./python/mywebapp/main.py

and it would use the lsp stanza in aft.jsonc to see if it should even launch an LSP daemon based on the file extension, root_markers; then check the given file for errors.

aft.jsonc - attempt 1

  "lsp": {
    "python": "ty",  // enables ty AND disables Pyright in one go
   }

aft.jsonc - attempt 2

  "lsp": {
    "servers": {
      "python": {
        "extensions": [".py"],
        "binary": "ty",
        "args": ["server"],
        "root_markers": ["python/requirements.txt", "requirements.txt"]
      }
    }

Project layout

> ls -1 python/requirements.txt python/dns_editor/__init__.py
python/dns_editor/__init__.py
python/requirements.txt

Use case

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions