penrose/penrose

Support context-sensitive autocompletion in `editor`

Open

#1,099 建立於 2022年9月16日

在 GitHub 查看
 (0 留言) (0 反應) (1 負責人)Haskell (4,756 star) (224 fork)batch import
good first issuepriority:feature requestsystem:ide

描述

Is your feature request related to a problem? Please describe.

The autocomplete service in editor doesn't understand where the cursor is in the Style program. For instance, in a shape block, autocomplete should show properties specific to the shape, not random constraint/objective names.

image

Describe the solution you'd like

Use the editing context to provide more accurate autocomplete suggestions. Ideally, the solution should be robust enough to work with partial Style programs. For example, the editor should incrementally parse the Style program and use the preceding tokens to construct a completion context.

More generally, it would be great to start migrating our editor services to a language service protocol

貢獻者指南

Support context-sensitive autocompletion in `editor` · penrose/penrose#1099 | Good First Issue