google / google/playground-elements

Add code actions to code editor

Open
#273 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
648
Forks
61
PR merge metrics
No merged PRs in 30d

Description

Just jotting some of the ideas down here and starting discussion on some of the further development utilizing the TypeScript Language Service. These things could be something I would be happy to work on after the code completion feature is finalized and shipped.

## What

A triggerable code actions prompt, which provides context aware actions, like "Import missing class LitElement from 'lit'".

Example image from a vim setup:
![image](https://user-images.githubusercontent.com/16068444/154630311-74b2a2b3-42ce-4453-8209-dfe629ca770f.png)

This is also something that vscode supports and the language service should be able to provide data for.

## Why

When writing code in the Playground elements editor, we already have diagnostics flowing in for some situations, for example for missing imports, so this would be the next sensible step in Developer Experience that the imports could be done through a code action.

-----

This is a feature I'd be happy to work on after the completion features are shipped

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.