Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Apr 1, 2020. It is now read-only.
This repository was archived by the owner on Apr 1, 2020. It is now read-only.

Refactoring Support #474

@bryphe

Description

@bryphe

Initial refactoring support has landed in TypeScript:
microsoft/TypeScript#15569

This would be a great feature for Oni - this is sort of a next-tier IDE feature that has the potential for huge productivity boosts.

There are a couple of issues that need to be considered:

  • This isn't supported in a first class way by the language server protocol. There are still open issues in terms of how it may be handled: An operation for refactorings microsoft/language-server-protocol#61 The approach that I believe makes sense would be to create an Oni API that exposes some of this functionality - like we already do for completion, and then if the LSP supports it, the LanguageClient.ts could call back into that API. This would allow other plugins / languages to do support refactoring strategies as well - it's just a bummer that it doesn't come through the LSP at the moment. There will be similiar pieces of functionality like this down the road - live reload, debugging, where standards are still in flux.
  • Plugin API design for this - need to investigate and see the functionality the tsserver provides.
  • Applying the TextEdit - I'm hoping we can reuse the strategy for modifying code that things like formatting provides - the TextEdit object seems applicable for this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions