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

JS Plugin Hooks for the Code Editor #2094

Open
asg017 opened this issue Jul 1, 2023 · 0 comments
Open

JS Plugin Hooks for the Code Editor #2094

asg017 opened this issue Jul 1, 2023 · 0 comments

Comments

@asg017
Copy link
Collaborator

asg017 commented Jul 1, 2023

When #2052 merges, I'd like to add support to add extensions/functions to the Datasette code editor.

I'd eventually like to build a JS plugin for sqlite-docs, to add things like:

  • Inline documentation for tables/columns on hover
  • Inline docs for custom functions that are loaded in
  • More detailed autocomplete for tables/columns/functions

I did some hacking to see what this would look like, see here:

image image

There can be a new hook that allows JS plugins to add new "extension" in the CodeMirror editorview here:

Will need some more planning. For example, the Codemirror bundle in Datasette has functions that we could re-export for plugins to use (so we don't load 2 version of "@codemirror/autocomplete", for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant