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.

Register custom Document and Workspace classes

See original GitHub issue

pygls provides some basic Document and Workspace classes. However, in real you expect these classes to have more functionality, for example user may want Document class to store list of symbols. I was wondering what was your idea on user utilizing these classes. Should I inherit from them, or maybe use them as attributes?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
TiemenSchcommented, Sep 22, 2020

I would agree that is by far the easiest method to override specific classes in Python.

Still, for much of your “internal” code and logic, it might be wise to work with custom classes you maintain in your own package. Writing tokenizers/lexers/compilers often comes with its own specific need for storage of information. I’ve been using sly to do some of the hard work, which naturally results in mappings to and from sly and pygls.

You could write up a parallel (but probably highly LSP inspired) implementation and provide a small interface module to “talk” with editors through pygls. Such a module is probably just some mappings and conversions of trivial fields, which shouldn’t be too hard to maintain.

0reactions
tombhcommented, Dec 3, 2022

Closing just due to having been around for a long time without replies. Very happy to re-open if there is still a need.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure class settings - Classroom Help - Google Support
Sign in to your Google Admin console. Sign in using your administrator account (does not end in @gmail.com).
Read more >
registerWorkspaceReader - MathWorks
This MATLAB function registers the custom workspace reader specified by obj for the Simulation Data Inspector.
Read more >
Create and manage a workspace - Azure Cognitive Services
Workspaces are places to manage your documents, projects, and models. When you create a workspace, you can choose to use the workspace ......
Read more >
Create a custom WorkSpaces image and bundle
If you've launched a Windows or Linux WorkSpace and have customized it, you can create a custom image and custom bundles from that...
Read more >
How to Use Google Workspace: Training & Tips
Discover new ways to auto-organize your inbox, create shared team calendars, set up dynamic ... Edit Microsoft Office documents without installing Office.
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