Skip to content

Support selection range in snippets #1220

@jdneo

Description

@jdneo

Here is a brief demonstration of the idea:
Kapture 2019-10-21 at 15 31 31

This feature might be used when the user forget to check null or something like that, and quickly wrap the code by a certain snippet.

The problem is that so far LSP does not support passing the selection information in code action param. So the server side cannot render the inserted text with the selections.

Can we first simply ignore the $TM_SELECTED_TEXT when rendering the insert text at the server side. Once the LSP supports it, we can then add them into it.

LSP related issue: microsoft/language-server-protocol#377 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions