-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
Shared configuration (tasks/settings) #1435
Comments
We have gaps when it comes to managing many projects and sharing among them and the answer to your question is currently not supported, sorry, but we have it on the backlog to improve this. Are your tasks/problem matchers mostly for supporting build tasks for a particular language? Having support for workspace - extension dependencies is on our radar. When it comes to sharing across projects you can consider something similar as we do for extensions. A yeoman generator generates the initial setup and shared tooling code comes from a node module in our case the vscode node module. |
Yeah - currently we've got (using off the shelf problem matchers doesn't save much)
Awesome! |
What is CC @dbaeumer Currently you cannot contribute problem matchers through an extension, so if the problem matchers are generally useful we could add them to set. Could you consider a PR? |
|
[Addressed in new terminal runner] This will largely be addressed with the new runner. There extension can contribute tasks which makes creating a tasks.json file for standard tasks unnecessary. For example the C# extension can contribute a standard task to compile C# files. Since 1.10 extensions can also contribute probem patterns and problem matchers. Since a longer time workspaces can prereq extensions using extension recommendations. |
Has this been addressed already? My concern is defining "global" tasks in extensions, but in a broader sense is:
|
With the May release an extension can defined problem matchers and tasks (problem matchers is already available sine Feb.) |
I am not sure if this is the correct issue to post my comment but it seems pretty close. I am looking for something like what Sublime Text does. In Sublime Text, you can define a "build system" which may be associated with a file extension. The build system is a user-defined shell command. You can then build a file with your build system without having to have a project or workspace set up. However when I try to do the same thing in vscode using "build tasks", I get an error saying "Tasks are only available on a workspace folder". I don't want to have to create/open a workspace folder if I want to build a simple script. Could you possibly imitate the functionality of Sublime Text? |
@kodos84 Please follow https://github.com/Microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions to submit a new feature request. |
@kodos84 Did you file the feature request as suggested by @mikelward ? I'm also interested in this functionality, so I'd be grateful if you let me know. Thanks. |
@kodos84 thank you |
Is there any progress on this? |
16 updates from #9664. |
It would be nice to put a few common simple tasks in a tasks.json file located in the Users settings folder that could be merged with the workspace tasks.json file. An example would be to run a NodeJS script from anywhere using a common keystroke binding, e.g.
with a keybinding of:
BTW: It seems that VSCode does attempt to merge tasks from subfolders. I tried the dubious scenario of putting my .code-workspace file in my home directory on Windows, causing it to search through the symbolic links (yes, Windows has them) that I have in my Desktop and Documents folders. It took awhile to search many node_module folders, before it found this "task", i.e. file, .\build\assets\vendors\moment\typing-tests\tsconfig.json, 13 times as a result of it being embedded in a node module, named CleanUI from Mediatec Software, a few years back. When picking the Run Task... menu item, or running the task, "Run NodeJS Script", with "cmd-shift-n", it took over 2 minutes for VSCode to obey my command. |
@robinmattern: Yes, I agree. To support a global tasks.json file located in the Users settings folder would be very handy! |
I can think of several levels of configs:
|
I'd love to be able to define global tasks (such as the global launch.json) in the user settings as well. |
My use case is Rust development. I keep copying tasks.json in every crates I'm working on just to have |
Technically It can be made with VSCode Active Buttons extension (https://github.com/SeunLanLege/vscode-action-buttons.git) since settings.json is a global file. But you will get extra GUI buttons which maybe not cool for some developers. |
I really can't wait for it. Global tasks will be very useful. I miss this |
Maybe it would be a good idea? If not, maybe something similar? |
A tasks.json next to your user settings.json is now supported! No commands to create this for you yet, but I'll add something. It only supports tasks version 2.0.0 and type shell and process tasks. |
|
This will be available in the next VS Code Insiders build: https://code.visualstudio.com/insiders/ |
@daniladyabin thanks for trying this feature in insiders and reporting the problem! I've pushed a fix to master and it should be in the next insiders build. Let me know if you have any other issues with this! |
I have a suite of projects that I'd like to have a shared configuration (e.g. all the repos at my company).
Currently we have duplicate
.vscode/settings.json
files, and several common.vscode/tasks.json
tasks. Some projects have additional tasks defined beyond the common ones.I'm unsure what the right approach to take here is. I'd love some input
postinstall
script that symlinks the configuration in (and just over-defining tasks) - but it's pretty ugly.The text was updated successfully, but these errors were encountered: