Skip to content
This repository was archived by the owner on Jan 3, 2024. It is now read-only.
This repository was archived by the owner on Jan 3, 2024. It is now read-only.

How to support snippets on code actions expansions. #74

@emi2k01

Description

@emi2k01

If I have the following code:

pub struct Foo;

impl std::fmt::Display for Foo {
}

fn main() {
}

and I use the code action Implement missing members, the generated code is:

pub struct Foo;

impl std::fmt::Display for Foo {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        ${0:todo!()} // I want my cursor to move here.
    }
}

fn main() {
}

I am using vim-vsnip for regular snippets.

I don't know if this is in the scope of rust-tools or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions