jupyter-lsp / jupyterlab-lsp

Coding assistance for JupyterLab (code navigation + hover suggestions + linters + autocompletion + rename) using Language Server Protocol
https://jupyterlab-lsp.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.81k stars 148 forks source link

Add color-picker capabilities #277

Open krassowski opened 4 years ago

krassowski commented 4 years ago

Elevator Pitch

LSP specifies a colour support capability which can be implemented as a textDocument/documentColor request. Quite a few language servers (CSS/R) support it well already.

Motivation

This is very useful for CSS, but also for plot tuning in data science area (right colours make the visualisations much better!).

Design Ideas

The easylogic/codemirror-colorpicker makes it easy to implement the colour picker in the CodeMirror editor (which is what we already use). It can look like this:

image

This can be implemented as a new CodeMirror adapter feature, see: /packages/jupyterlab-lsp/src/adapters/codemirror/features

krassowski commented 6 months ago

This is now supported without LSP via https://github.com/krassowski/jupyterlab-color-picker. I would be nice to support it via LSP to avoid the problem of having to special-case the logic for each language.