Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

[WIP] Generate an "Apply all hints" hlint code action#1450

Open
alanz wants to merge1 commit intohaskell:master
base:master
Choose a base branch
Loading
fromalanz:apply-all

Conversation

alanz
Copy link
Collaborator

This commit generates it all the time, without checking if we actually have any hints.

This is a possible alternative tohaskell/vscode-haskell#168

But it may be better to update theCodeActionProvider interface to provide all the diagnostics for the given Uri/plugin combo, which can then be checked. Except that it may be too much processing, given the frequency of request.

This commit generates it all the time, without checking if we actuallyhave any hints.
@lukel97
Copy link
Collaborator

This seems to be affecting stand alone hints? Just from looking at the diff it’s not obvious how exactly though

hlintActions = do
actions <- mapM mkHlintAction (filter validCommand diags)
applyAll <- mkApplyAllAction
return (catMaybes $ applyAll:actions)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Some clients like coc.vim have keybindings to apply the first code action, so would it make sense to return this last?

Suggested change
return (catMaybes$applyAll:actions)
return (catMaybes$ actions++ [applyAll])

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@lukel97lukel97lukel97 left review comments

@jneirajneiraAwaiting requested review from jneira

@mpickeringmpickeringAwaiting requested review from mpickering

@cocreaturecocreatureAwaiting requested review from cocreature

@fendorfendorAwaiting requested review from fendor

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@alanz@lukel97

[8]ページ先頭

©2009-2025 Movatter.jp