swiftlang / sourcekit-lsp

Language Server Protocol implementation for Swift and C-based languages
Apache License 2.0
3.34k stars 280 forks source link

"Add macro implementation" code action triggered from a macro declaration #1242

Open DougGregor opened 6 months ago

DougGregor commented 6 months ago

Description

Given a macro declaration like:

@freestanding(expression)
macro stringify(_ value: Int) -> (Int, String) = #externalMacro(module: "MyMacros", type: "StringifyMacro")

Introduce a code action "Add macro implementation" that stubs out the implementation of this macro so it's ready to go in your project.

Ideally, this would do a couple of things:

ahoppen commented 6 months ago

Synced to Apple’s issue tracker as rdar://128016679

mateusrodriguesxyz commented 3 months ago

Hi @ahoppen! Could you assign this to me, please?