artempyanykh / marksman

Write Markdown with code assist and intelligence in the comfort of your favourite editor.
MIT License
1.93k stars 35 forks source link

Feature request: refactor.extract to new file #150

Open pacien opened 1 year ago

pacien commented 1 year ago

Some LSP servers allow moving code around with the refactor.extract code action. For example: extracting some functions to a new class file.

I believe this would be handy for markdown files as well: it could be used to easily split a growing note file into multiple ones, extracting some paragraph or section to a new file and inserting a wiki link in place.

I see that there is a type definition in the project, but I could not find whether this is already implemented: https://github.com/artempyanykh/marksman/blob/662682b/LanguageServerProtocol/Types.fs#L544

artempyanykh commented 1 year ago

Hi @pacien! There's currently no extract refactor implemented. I see how this can be done to extract e.g. sections under a heading into a separate file. That'd be nice!