question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enhance language server spec

See original GitHub issue

For https://github.com/krassowski/jupyterlab-lsp/pull/81#issuecomment-548042214

The current spec is a little limited as revealed in #81 for really driving UI. A more complete spec might be something like (not suggesting YAML, just easier to write):

# from spec version 0
argv: 
  - pyls
languages:
  - python
# definitely want
display_name: pyls
mime_types: # could be the source-of-truth instead of guessing in client
  - text/python
  - text/x-ipython
urls:
  home: https://github.com/palantir/python-language-server
  issues: https://github.com/palantir/python-language-server/issues
debug_argv: # will be complicated with helpers, e.g. r
  - pyls
  - v
# nice-to-have
config_schema: # it would be better to have these on the ts side, but...
  pyls.plugins.pydocstyle.enabled:
    type: boolean
    # so much more...
    # https://github.com/palantir/python-language-server/blob/develop/vscode-client/package.json
install: # for docs only
  pip: pip install python-language-server[all]
  conda: conda install -c conda-forge python-language-server
extend: # at least a few other servers are extensible
  - display_name: mypy 
    install: ...
  - display_name: isort
    install: ...
  - display_name: black
    install: ...
environment: # just because kernels have them
  PYTHONUNBUFFERED: "1"

This would necessitate a bump to the entry_point spec version, e.g. jupyter_lsp_spec_v1, though it may be possible to maintain backwards compatibility…

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
bollwyvlcommented, Nov 4, 2019

It’s probably also worth generating some documentation from the schema: https://github.com/adobe/jsonschema2md

0reactions
bollwyvlcommented, Nov 5, 2019

I would imagine

/lsp/server/pyls

There’s no point to having the trailing python, as a single running server can handle multiple languages under the same process, to my understanding.

On Tue, Nov 5, 2019, 17:52 M. Krassowski notifications@github.com wrote:

there’s no reason not to have one socket per language server, and it will advertise to the client what file extensions, mime types, etc. it supports. This would normalize a lot of things.

so we are heading towards /lsp/<server>/<language> as in /lsp/plys/python for the next spec version?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/krassowski/jupyterlab-lsp/issues/89?email_source=notifications&email_token=AAALCRGZLOSFM6MMTVOXAJ3QSH2JZA5CNFSM4JHVUCOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDET4WA#issuecomment-550059608, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALCRALDINJZZMXN5CTLGLQSH2JZANCNFSM4JHVUCOA .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Language Server Protocol Specification - 3.17
The language server protocol defines a set of JSON-RPC request, response and notification messages which are exchanged using the above base protocol. This ......
Read more >
Extending a client with the language server protocol
This specification is called the language server protocol. In this post we will investigate how to use the language server protocol for ...
Read more >
Language Server Extension Guide - Visual Studio Code
This guide will teach you how to build a Language Client / Server using our Node SDK. The remaining document assumes that you...
Read more >
Spec should discourage abuse of initializationOptions and ...
I'm working on having Eclipse IDE adopting some language servers. ... IMO the spec should encourage all server providers to spec the ...
Read more >
Adding a Language Server Protocol extension - Visual Studio ...
0, used to provide language service features to various code editors. Using the protocol, developers can write a single language server to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found