Using puppet-editor-services with vimspector #55
Replies: 0 comments 11 replies
-
|
trying to fix the dependency issue by installing an older version of eslint I was able to get the install to go through: and now I can see a |
Beta Was this translation helpful? Give feedback.
-
|
running I found this that seems relevant: microsoft/vscode#2810 (comment) I've added this in the "scripts" section of the package.json file: and then when I run but the missing module 'vscode' error persists |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for reporting this @lelutin, it's great to see people trying to use our extension in new and different ways than we intended. Looking at your output and the errors you are seeing come from trying to run a VS Code extension without VS Code. The That being said, I reviewed the vimspector page and see most of the languages are command lines for the debuggers for the language being used. The Puppet language doesn't have a debugger, command line or otherwise to use like this, but the part of the Puppet Extension that provides a debugging experience is in the Puppet Editor Services project. You can see how VS Code calls it to debug a Puppet manifest here. In short, it starts a ruby process which responds to LSP requests from the VS Code Debugger. Since vimspector isn't a LSP client, I'm not sure this will help you very much, but that is how you would start the Puppet debugger we have in VS Code. An example of this working for vim/neovim for editing (not debugging) is at https://voxpupuli.org/blog/2019/04/08/puppet-lsp-vim. |
Beta Was this translation helpful? Give feedback.
-
|
thanks! this reponse was super informative :) I'll start with using that blog post to figure out how to use the language-server part, either with youcompleteme (which I currently use) as the LSP client or maybe switch over to coc.vim -- that should already be super useful in itself. I did not know about puppet-editor-services until now! for the debugger part, if I undestand correctly: the protocol specific to debugging is named differently and it would be DAP (https://microsoft.github.io/debug-adapter-protocol/overview)? If that's correct, than maybe I might be in luck since I if I'm not mistaken vimspector is specifically a DAP client. so from what I understand from this, I should switch my focus to puppet-editor-services since it seems to match more directly with what I need to use. cheers! |
Beta Was this translation helpful? Give feedback.
-
|
Wow! just to let you know: I ended up getting I'll need to cleanup all of my notes and cofiguration, but I intend to send some configuration snippets to the vimspector project soon so that others can start debugging puppet manifests with vim, too. cheers! |
Beta Was this translation helpful? Give feedback.
-
|
🎉🎉🎉 Excellent |
Beta Was this translation helpful? Give feedback.
-
|
@lelutin thats awesome! Would you be interested in contributing those notes as a doc on https://puppet-vscode.github.io or a blog post? |
Beta Was this translation helpful? Give feedback.
-
|
@jpogran that would indeed make this visible to more vim users out there fwiw I've already added this to the vimspector project: https://github.com/puremourning/vimspector/wiki/languages#puppet I wonder how it would fit on puppet-vscode.gh.io specifically though since that tool, as you pointed out to me, is specifically the VS Code glue plugin. but maybe ppl tend to look at puppet-vscode more directly than puppet-editor-services? idk. either way, I'll surely use that opportunity to write something up on my blog (that thing has been stagnating for too long). and if you think it would make sense to add something to puppet-vscode.gh.io, I don't mind republishing there, maybe in a format more suitable to the docs. I'll update when I have something published on my blog. maybe tonight |
Beta Was this translation helpful? Give feedback.
-
|
I'm going to move this issue to a discussion, and we can work out somewhere to publish. We have an umbrella page for all of the components that make up these things, I was thinking it could go there as we have a couple of other editors to document, but haven't finished making that yet. |
Beta Was this translation helpful? Give feedback.
-
|
wow sorry, I fell into a wormhole. coc.nvim is a massive thing and I jumped in there head first (thanks again for pointing out dhollinger's post, I made some huge changes to my vim setup with this. coc.nvim is pretty awesome :) ) depending on the format of the page, the section about vimspector + puppet-editor-services could be real quick. or I can write something that reads a bit more like a howto for setting things up with more detailed steps -- the latter will require more time to write of couse. |
Beta Was this translation helpful? Give feedback.
-
|
@lelutin Apologies for the delay. A short document about how to setup vimspector and puppet-editor services would be a great start. If you could open a PR in the lingua-pupuli/docs repo and add a new markdown file here, we can get started on something. The path should look like For the longer form how-to, I can get you linked up with the people who handle our blog, so we can get something on the official blog. Please send me an email at If you could put a pull request in the lingua-pupuli/docs repo that makes a new markdown file here we can work on the content and wording. When things are complete, I can move it to the correct place in the umbrella project. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What Versions are you running?
OS Version: Debian unstable (sid)
VSCode Version: N/A (trying to integrate puppet-vscode with vimspector)
Puppet Extension Version: 1.0.0
PDK Version: N/A
I currently don't have PDK installed, so I'm using the puppet agent 5.5.22
I've downloaded the extension from github as the .vsix file, and extracted it.
What You Are Seeing?
trying to start the extension with
node out/extension.js, I get an error message about thevscodemodule not being found.What is Expected?
I'm trying to figure out if it's possible to use the puppet-vscode extension in Debian with the vimspector debugging IDE. If I could be able to run the extension code, then maybe vimspector would be able to interact with it.
https://github.com/puremourning/vimspector
How Did You Get This To Happen? (Steps to Reproduce)
Output Log
To install this, I've first created a file for vimspector to injest. Then I get vimspector to download and extract the archive for me:
Then I try to execute the plugin to see if it's working:
Running npm install against the extracted .vsix gives this -- but this is probably expected, since the .vsix archive is supposed to be a pre-built version of the extension.
I've also tried cloning the extension from git and following the instructions in README_BUILD.md.
npm installcompletes successfully, but then the document says to runnode node_modules/vscode/bin/installbut this file is not present in the repository.Beta Was this translation helpful? Give feedback.
All reactions