eclipse-che / che

Kubernetes based Cloud Development Environments for Enterprise Teams
http://eclipse.org/che
Eclipse Public License 2.0
6.96k stars 1.19k forks source link

Automatical mapping keybindings.json #23139

Open yaroslavkasatikov opened 1 week ago

yaroslavkasatikov commented 1 week ago

Summary

Hi team,

I have the task to automatically map custom keybindings.json on checode loading. I tried to put the file into ~/.config/Code/User or other default paths for vscode, but checode didn't load it. I found and configured embedded keybindings.json via checode comand line ( Open Keyboard Shortcuts (JSON)), it opens the keybindings.json file which can be edited and applied, but I couldn't find its location on the FS. I tried to grep text and find by the name, but unsuccessfully :( When I selected to copy path of the file it returned me (Settings): /User/keybinding.json. Could you please tell me where this file located? may be it is stored in the internal storage?

Thanks in advance!

Relevant information

No response

aelbarkani commented 1 week ago

The use case: we want to have reproducible dev environments (including the settings, extensions and the key bindings). That seems possible with settings and extensions (through workspace settings.json and extensions.json), but we couldn't do it it for keybindings.json.

AObuchow commented 1 week ago

When I selected to copy path of the file it returned me (Settings): /User/keybinding.json.

IIRC, files stored under /User/ are stored in the browser's local storage. This may be achievable somehow through a patch to CheCode, but I'm not sure how feasible it is. @azatsarynnyy @vitaliy-guliy and @RomanNikitenko would have a better idea.

From the looks of https://github.com/Microsoft/vscode/issues/4504 & https://github.com/Microsoft/vscode/issues/23757, this is not supported in upstream VSCode either (seemingly by design).

I did find a hacky workaround that may be worth a try, but this seems less than ideal and would be unsupported.

CC: @azatsarynnyy @vitaliy-guliy and @RomanNikitenko please take a look :)