Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrated Development Environment support #1226

Open
vyzo opened this issue May 5, 2024 · 0 comments
Open

Integrated Development Environment support #1226

vyzo opened this issue May 5, 2024 · 0 comments

Comments

@vyzo
Copy link
Collaborator

vyzo commented May 5, 2024

There is already work in progress to support swank/slime and LSP, and it is becoming apparent that there is a lot of common structure between IDE support programs.

We propose an :std/ide package, where we provide coomon structures for all IDEs and packages for swank, lsp etc underneath.

Common Functionality

In general there are three main usage patterns we want to support for IDEs:

  • reading/navigating code
  • writing new code or editing existing modules
  • interactive evaluation in an appropriate context.

Supporting Code navigation and reading

This is the most fundamental interaction mode. We need to support:

  • navigation to definition of a symbol in source
  • documentation lookup and display in the user's IDE.
  • type signatures for all procedures from compiled modules; we already have the information in the compiler, so it is a matter of surfacing it.

Interactive Code Evaluation

This can happen in two contexts:

  • a top interacton context, where a user evaluates some code for exploratory or testing purposes.
  • a module context, where the user evaluates code they are working with, usually for testing purposes.

In order to facilitate interaction, the IDE server can be instructed to evaluate code in a specific module context. Furthermore all the symbols in the current code should support introspection, as in navigation above.

Code Editing

This is perhaps most important, but also the most complex to implement.
The server should keep track of the code as it is being edited, even though it cannot expand it yet.
It should create a shadow module context, where it can provide information and completions as the user is editing.
It should also provide interactive evaluation support in the partial module, provided it is syntactically correct and can expand.

Generally desirable features for interactive editing:

  • basic completions: imports and symbols should be completable on demand.
  • context dependent completions: type annotations and instances ofr using should be parsed so that the user can complete the dot, and even the types in annotations/using
  • when suggesting a completion or when processing arguments the IDE server should provide type signatures and links to documentation.

Related Issues and PRs

@vyzo vyzo added this to the Gerbil v0.19: Benko milestone May 5, 2024
@vyzo vyzo changed the title Intgrated Development Environment support Integrated Development Environment support May 5, 2024
@vyzo vyzo assigned vyzo and drewc May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants