Skip to content

feat: Provide reference lens data for VSCode - #284

Merged
artempyanykh merged 1 commit into
mainfrom
codelens-data-vscode
Dec 9, 2023
Merged

artempyanykh merged 1 commit into
mainfrom
codelens-data-vscode

Conversation

@artempyanykh

@artempyanykh artempyanykh commented Dec 9, 2023 •

Copy link
Copy Markdown
Owner

When client's experimental.codeLensFindReferences capability is set (only VSCode plugin now), Marksman will output extra data for the code lens command that can be used to implement client-side behavior to show references when clicking on the lens, e.g.:

"command": {
            "title": "1 reference",
            "command": "marksman.findReferences",
            "arguments": [
                {
                    "uri": "file:///<path>.md",
                    "position": {
                        "line": 62,
                        "character": 0
                    },
                    "locations": [
                        {
                            "uri": "file:///<path>.md",
                            "range": {
                                "start": {
                                    "line": 12,
                                    "character": 2
                                },
                                "end": {
                                    "line": 12,
                                    "character": 19
                                }
                            }
                        }
                    ]
                }
            ]
        }
    },...

where command's arguments are:

  1. uri and position is file + pos of the lens,
  2. locations is uri + range for each reference.

When client's experimental.codeLensFindReferences capability is set (only VSCode plugin now), Marksman will output extra data for the code lens command that can be used to implement client-side behavior to show references when clicking on the lens.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant