Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Support code actions not related to diagnostics #289

Open
Gert-dev opened this issue Jul 22, 2018 · 1 comment
Open

Support code actions not related to diagnostics #289

Gert-dev opened this issue Jul 22, 2018 · 1 comment

Comments

@Gert-dev
Copy link

Description

According to the code actions documentation of this package, code actions are only supported if they are related to diagnostics. According to the most recent specification, they can indeed resolve diagnostics, but they don't have to be related to them; they can also be used for broader code actions, such as refactoring operations.

If I understood correctly, code actions are a more specific form of commands (or: commands are a more generic variety of code actions) that provide a uniform request/response for the most common process of modifying one or more documents in some way (such as most refactoring operations) and thus alleviating the need for every client to implement handling commands manually.

A neat integrated button for these actions related to diagnostics is currently shown and a not-so-nice-one outside of them. Perhaps the intentions package might provide inspiration on how to present these to the user.

Expected Behavior

Code actions should also be supported when not related to diagnostics to perform operations on the code such as refactoring.

Actual Behavior

Only code actions related to diagnostics appears to currently supported - at least according to the documentation.

Versions

  • Atom: 1.28
  • Client OS: Linux 64-bit
  • atom-ide-ui: v0.13.0
@pelmers
Copy link
Contributor

pelmers commented Jul 25, 2018

We also trigger code actions on selection (after a short delay): https://github.com/facebook-atom/atom-ide-ui/blob/master/modules/atom-ide-ui/pkg/atom-ide-code-actions/lib/CodeActionManager.js#L122-L205

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants