-
Notifications
You must be signed in to change notification settings - Fork 175
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
[Feature Request]: Default configs #270
Comments
This is certainly aspirational in a sense. FYI you can configure your debug configs once centrally rather than per-project using the parameterised configs: https://puremourning.github.io/vimspector/configuration.html#debug-configurations and the powerful replacement vars and defaults: https://puremourning.github.io/vimspector/configuration.html#replacements-and-variables I do this a lot, but here are some examples: https://github.com/puremourning/.vim-mac/tree/master/vimspector-conf/configurations/macos |
There is some stuff in progress here https://github.com/puremourning/vimspector/tree/setup-guide but it's only very much WIP |
The main problem with this is maintenance. It's basically a job for life and I'm not sure that I can manage on my own to maintain all of these things. Will need more community involvement to produce and maintain the gadget configs I think and perhaps a way to pull them out of vimspector core and distribute them differently. not sure, but already the number of gadgets I am supporting is too much to keep up to date on my own. |
here's a demo of the WIP stuff https://asciinema.org/a/xpSMFSn0GSEFTPNYSfcf0HEIA I have started to work on a way to separate out the gadget specs to allow the community to more easily contribute them |
This is a bit old but I think there's an existing solution to this: creating a global debug config in vimspector installation directory, under However, I couldn't get the global config to work. vimspector complains that it couldn't find the config and I need to tell vimspector how to launch the application. I've created vimspector_root/configurations/linux/rust/.vimspector.json with following config: {
"$schema": "https://puremourning.github.io/vimspector/schema/vimspector.schema.json",
"configurations": {
"Launch": {
"adapter": "CodeLLDB",
"filetypes": ["rust"],
"configuration": {
"request": "launch",
"program": "${workspaceRoot}/target/debug/${fileBasenameNoExtension}",
"args": [],
"cwd": "${workspaceRoot}",
"externalConsole": false,
"stopOnEntry": true,
"MIMode": "lldb"
}
},
"Attach": {
"adapter": "CodeLLDB",
"filetypes": ["rust"],
"configuration": {
"request": "attach",
"program": "${workspaceRoot}/target/debug/${fileBasenameNoExtension}",
"PID": "${PID}",
"args": [],
"MIMode": "lldb"
}
}
}
}
|
rename to ‘rust.json’. Or some other non-hidden file name in that directory |
Thanks! for rust vimspector seems to think that the Typically |
I don't understand the question (and it seems not relevant to this issue), but the behaviour of determining the workspace root is documented in the reference guide https://puremourning.github.io/vimspector/configuration.html#project-and-global-configurations one alternative is to not use ${workspaceRoot} and use, say ${MY_PROJECT_ROOT} (or anything else, which you can then set in vim with |
thanks; I'll have a read and I've updated my comment above; hope it clarify the issue I have a little bit. |
Ah that's a good one; I just tried and it worked well. |
What about something like: https://github.com/sharksforarms/vimspector-gen |
Maybe it's already there but I really couldn't find it.
How about built-in templates for the most commonly used configurations? It's a bit annoying to have to setup .vimspector.json for every new project I get my hands on.
Ideally, when starting the debugger in a project where a configuration couldn't be found, the Vimspector would ask permission to create a .vimspector.json with the most common / recommended settings for that language and open the file so the user could make small adjustments as needed. After the user saved the file, Vimspector would try starting the debug session again.
The text was updated successfully, but these errors were encountered: