Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add code action support to the ruby-lsp #60

Open
vinistock opened this issue Mar 29, 2022 · 1 comment
Open

Add code action support to the ruby-lsp #60

vinistock opened this issue Mar 29, 2022 · 1 comment
Labels
enhancement New feature or request pinned This issue or pull request is pinned and won't be marked as stale

Comments

@vinistock
Copy link
Member

vinistock commented Mar 29, 2022

Code actions provide the ability to define any type of refactor that developers can manually apply. Some examples:

  • Extract to method: select a portion of the code and have it extracted into a private method with the right parameters
  • Make a method private
  • Move method to parent class
  • Change a block from do - end to {} Add switch block refactor #2372
  • Change a single line invocation to multiline
  • Change if to unless
  • Change while to until
  • Wrap class in module
  • Add attr_reader, attr_writer or attr_accessor for a given instance variable

Documentation: https://microsoft.github.io/language-server-protocol/specification#textDocument_codeAction

@vinistock vinistock transferred this issue from another repository Apr 8, 2022
@vinistock vinistock mentioned this issue Jul 15, 2022
@st0012
Copy link
Member

st0012 commented Oct 17, 2022

With locals information provides by ruby-syntax-tree/syntax_tree#157, we should be able to achieve inline local variables (example from RubyMine) relative easily.

@vinistock vinistock added enhancement New feature or request pinned This issue or pull request is pinned and won't be marked as stale labels Jul 20, 2023
andyw8 referenced this issue in andyw8/ruby-lsp Mar 2, 2024
* Create telemetry class

* Hook up telemetry class to the language server client

* Document how to add telemetry on the Ruby LSP

* Improve types for telemetry

* Add possible URI to telemetry event
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pinned This issue or pull request is pinned and won't be marked as stale
Projects
None yet
Development

No branches or pull requests

2 participants