haskell / haskell/haskell-language-server

Use custom `CodeActionKind`s to support client-side filtering

Open
#1,458 12 comments 2 reactions 0 assignees View on GitHub
component: hls-plugin-api component: plugins level: easy type: enhancement
Dominant language
Haskell
Stars
3k
Forks
455
Avg merge
3d 21h
Merged PRs (30d)
13

Description

The `CodeActionKind` enum is actually an open enumeration of strings. There's nothing stopping us from adding our own kinds.

The main advantage of this is if we want to do some client-side filtering this is a much nicer thing to use than, say, matching on the action title.

We might also want plugins to tell us about custom kinds they support so that we can return the set that we use in `CodeActionOptions`.

Real-world usecase: https://github.com/emacs-lsp/lsp-haskell/pull/112#discussion_r584291108

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the handling of CodeActionKind and CodeActionOptions, then inspect how plugins expose supported actions. Done means custom kinds can support client-side filtering and the kinds used in CodeActionOptions reflect plugin support where applicable.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
devtools, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.