Skip to content

Unexpected relative path handling in native server mode #16041

@richtea

Description

@richtea

[Edit - see my comment below for problem description]

I just had a notification that ruff-lsp is deprecated, so I removed my setting "ruff.nativeServer": "off". Now, I don't get any highlighting in Python documents, however when I run poetry run ruff check it lists violations.

When native server is enabled, I've checked the logs and can't see any obvious suggestions as to why nothing gets highlighted. In the Ruff output window, it displays Server: Start requested. and nothing more. In the Ruff Language Server output window it displays

WARN ruff:main ruff_server::server::api: Received notification $/setTrace which does not have a handler.

multiple times.

If I switch back to "ruff.nativeServer": "off" then the highlighting is restored.

The related settings in settings.json are:

  "[python]": {
    "editor.defaultFormatter": "charliermarsh.ruff",
    "editor.codeActionsOnSave": {
      "source.fixAll": "never",
      "source.organizeImports": "never",
      "source.organizeImports.ruff": "always"
    },
    "editor.insertSpaces": true,
    "editor.formatOnSave": false,
    "editor.formatOnPaste": true,
    "editor.formatOnType": false
  },

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingserverRelated to the LSP server

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions