Replies: 5 comments 12 replies
-
I like this idea. The two times I started a pygls project, I ended up copying the json example, trying to strip away the things I didn't need, and going from there. What if we created a new repo that was a truly bare bones implementation with NotImplemented exceptions everywhere you must replace stuff. Then it would be as simple as cloning the repo to get started. If we wanted to get fancy, we could implement the json server in a branch of that repo. If you like this idea, I'm happy to create the repo and give appropriate permissions. maybe |
Beta Was this translation helpful? Give feedback.
-
This might be crazy, but it could be really cool to create a pygls server for pygls. that would make it incredibly easy to start a new project, and add features like autocomplete, progress notifications, etc? Might be a much more fun and actually useful tutorial project, instead of/in addition to json? |
Beta Was this translation helpful? Give feedback.
-
I'm not sure to what extent you want "glue" for VS Code, but we are working on a GitHub repo template to make it easy to stamp out VS Code extensions which wrap Python CLI tools. It's built on top of pygls as we are using LSP to drive the tools. We are hoping to take it public in a month or so, but it's already being used for our Pylint, Black, and isort extensions. |
Beta Was this translation helpful? Give feedback.
-
Wow, I love the idea of a Pygls Pygls server. I think it's always good to have the virtuous cycle of "dogfooding", not all projects can consume themselves, and so any that can should strive to do so. Though, from what @brettcannon is saying (in #257 as well), and if I'm understanding correctly, we could actually go a step further, or rather a step deeper, and make what would be perhaps better described as a Pygls-flavoured LSP LSP server. I'm imagining something that would be used more as a suped-up LSP in debug mode. So in the JSON example the list of code actions for a given token wouldn't just be what's already been implemented (with links to the custom LSP code that does implement it) but also what could be implemented (with links to the parent Pygls code that generalises it) according to the LSP standard. I don't know how feasible or ultimately useful all this is, but at the very least I love the thought experiment of it. Anyway, back to the original topic! I've never actually used VSCode, so my only experience of LSP is from Neovim, which also has native LSP support. Here's how you setup esbonio in Neovim for example. How similar is that to VSCode? Is the nvim-lspconfig plugin roughly equivalent to your suggestion of a glue library? Also, I'm not familiar enough with Python packaging to know what the consensus is on solving dependency issues like we had with Pydantic (namely overly strict version requirements that conflicted with common system versions of Pydantic, discussed in #221). Could such issues be addressed by a glue library? |
Beta Was this translation helpful? Give feedback.
-
Quite similar, the Esbonio VSCode extension is passing similar arguments to a
Not quite… perhaps a closer analogue would be the |
Beta Was this translation helpful? Give feedback.
-
I have a fair amount of code in
esbonio
dedicated to just managing Python envs and installing/updating the language server - it would be good to get more eyes on this and it's a problem anypygls
powered language server would be looking to solve.Another common problem to solve would be standing up a pyodide environment - assuming projects are interested in supporting VSCode web extensions.
I just thought I'd ask and see if there was any interest in creating a common library for this sort of thing? Also if such a library was made, could it live in the
pygls
repo? Or would we prefer it to be something separate?Beta Was this translation helpful? Give feedback.
All reactions