Component: Editor

Open
#5,237 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
vscode

Research direction

This is an umbrella issue rather than a single implementation task, and it names no source files or tests. Start by choosing one unchecked item, such as the extension marketplace page or unresolved-name highlighting, then read its linked issue where provided and locate the VS Code extension entry points. Done criteria depend on the selected item and are not defined here.

Written by the indexing model from the issue text.

Description

This issue is to organize work not in-progress, related to our LSP-based VS Code extension.

This work is somewhat accessible, but requires some up-front learning about LSPs and our implementation of such. It might be best to wait a bit until things stabilize, but reach out if you're interested in tackling something here!

Highest-priority

  • Tidy up extension marketplace page
  • Unresolved references/names, incl fns, should be highlighted (see #2677)
  • set up config setting for darklang CLI path
  • connect extension to local cli, via config setting
  • Autocomplete
    • base work: figure out what 'context' we're in (are we about to write a fn name?)
    • function name autocomplete

Accessible and lower priority

  • display code run-time (i.e. 16ms) somewhere
  • onHover documentation
  • review VS Code Extension theme color document and provide a nice Darklang theme

Blocked and/or inaccessible

  • Each command should be triggerable by keyboard shortcuts
    • Ideally, we'd like to be able to have every command, refactoring, and editing action (i'll refer to them all as "commands" for now) available as a keyboard shortcut, as well as via the mouse, context menu, and eventually accessible by APIs for other commands to reuse.
    • There are a number of challenges here. The biggest is assigning keyboard shortcuts to commands, as windows has most of the keyboard shortcuts already allocated, and users have different keyboard layouts, especially for different locales. This is why there's three separate keyboard shortcuts to bring up the context menu: every shortcut we've tried to create has had issues for some users.
    • To solve this we need to do the following:
      • add a system of user-settable keyboard shortcuts
      • ensure all existing commands are made available in the system (eg triggering function or handler execution, while not a refactoring, is a valid and useful shortcut)
      • ensure new commands all go through this system
      • create a good set of shortcuts for existing commands, for different keyboards layouts/OSes/etc
  • Allow users to clone functions easily, especially relevant when publishing a new version of a fn (see #4175)
    • also handlers, types, etc.
  • support undo/redo again
  • Provide ability to file bug reports from within editor
    • Highlight various functions, record visual experience, collect relevant traces, big text input box, submit button
  • Same as ^, but for ideas or general feedback (maybe just a link to github issues)
  • Worker names should autocomplete
  • Analysis: bring back the basics
    • Analysis: stream back responses (see old #4008)
  • Show source code for builtin functions, constants, etc. in the UI (see #3322)
  • support "copy trace as cURL" for traces of outgoing and incoming http calls (see #4382)
  • allow viewing byte representation of a string
    • It can be challenging sometimes to understand what a string is, especially since sometimes different characters might look the same
  • test the editor with the equivalent of playwright
  • view package sources in-editor
  • user-configurable language server
    • in config, can reference fn of LSP server to use
    • official: Darklang.LanguageTools...
    • personal: Stachu.languageServer
  • Autocomplete
    • type name autocomplete
    • constant name autocomplete
    • keywords
    • generative AI (for fn implementation, etc)
  • view AST of thing in focus
  • really represent vs code's windows/layout situatino well, so we can control it ergonomically via a Darklang API which we expose to users
Dominant language
F#
Stars
2.2k
Forks
115
Avg merge
17h 28m
Merged PRs (30d)
50

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from darklang/dark

All issues in darklang/dark

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.