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

Use mime types from server spec for language detection #190

Closed
bollwyvl opened this issue Feb 8, 2020 · 2 comments
Closed

Use mime types from server spec for language detection #190

bollwyvl opened this issue Feb 8, 2020 · 2 comments
Labels
enhancement New feature or request package:jupyterlab-lsp schema changes to contract between server, client, and extensions

Comments

@bollwyvl
Copy link
Collaborator

bollwyvl commented Feb 8, 2020

Elevator Pitch

If available, use the mime types provided by specs to detect languages rather than (just) string parsing or lookup tables.

Motivation

#189 points out a case where a language doesn't (yet) have a well-defined language type (robots-from-jupyter/robotkernel#40).

Design Ideas

In addition to the lookup table of languages, detection should also consult the server spec mime types.

It may be that we need to open this up even wider, and allow for server specs to offer the full rosetta stone of mimetype, codemirror_mode and name, depending on how much information might be available.

@krassowski
Copy link
Member

Agreed, this the right thing to do. However, we need to adjust the schema slightly as we need mimetype → language mapping, as one server can handle multiple languages.

@krassowski
Copy link
Member

I believe we already do that, so closing as completed. Any future enhancements to the logic would need to be done in @jupyterlab/lsp package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request package:jupyterlab-lsp schema changes to contract between server, client, and extensions
Projects
None yet
Development

No branches or pull requests

2 participants