- Fix bug with Enable/Disable extension

- Support autocomplete in insert mode
- Add go to next change (in both editor mode and compare editor mode)
This commit is contained in:
jasonwilliams 2024-01-27 23:51:02 +00:00
parent d002439287
commit 148d9c661d
3 changed files with 22 additions and 2 deletions

View File

@ -39,11 +39,13 @@
"commands": [
{
"command": "extension.helixKeymap.enterDisabledMode",
"title": "Disable Helix"
"title": "Disable Helix",
"enablement": "!extension.helixKeymap.disabledMode"
},
{
"command": "extension.helixKeymap.enableHelix",
"title": "Enable Helix"
"title": "Enable Helix",
"enablement": "extension.helixKeymap.disabledMode"
}
],
"keybindings": [
@ -266,6 +268,11 @@
"key": "ctrl+h",
"command": "deleteLeft",
"when": "editorTextFocus && extension.helixKeymap.insertMode"
},
{
"key": "ctrl+x",
"command": "acceptSelectedSuggestion",
"when": "suggestWidgetHasFocusedSuggestion && suggestWidgetVisible && extension.helixKeymap.insertMode"
}
],
"configuration": {

View File

@ -20,6 +20,18 @@ export const unimparedActions: Action[] = [
commands.executeCommand('editor.action.marker.prevInFiles');
}),
parseKeysExact(['[', 'g'], [Mode.Normal], () => {
// There is no way to check if we're in compare editor mode or not so i need to call both commands
commands.executeCommand('workbench.action.compareEditor.previousChange');
commands.executeCommand('workbench.action.editor.previousChange');
}),
parseKeysExact([']', 'g'], [Mode.Normal], () => {
// There is no way to check if we're in compare editor mode or not so i need to call both commands
commands.executeCommand('workbench.action.compareEditor.nextChange');
commands.executeCommand('workbench.action.editor.nextChange');
}),
parseKeysExact([']', 'f'], [Mode.Normal], (helixState, editor) => {
const range = helixState.symbolProvider.getNextFunctionRange(editor);
if (range) {

View File

@ -68,6 +68,7 @@ function setModeContext(key: string) {
'extension.helixKeymap.searchMode',
'extension.helixKeymap.selectMode',
'extension.helixKeymap.viewMode',
'extension.helixKeymap.disabledMode',
];
modeKeys.forEach((modeKey) => {