The IDE you know, rebuilt in Rust. IntelliJ IDEA–style keymap, tool windows and search-everywhere in a fast native app: editor, code insight, debugger, Git, terminal, database and HTTP clients for 60+ languages.
TypeScript code-editorcross-platformdapdatabase-clientdebuggerdesktop-appdeveloper-toolsgithttp-clientideintellijlsprusttauriterminal
feat(keymap): bind Ctrl+Alt+click to Go to Implementation on Windows and Linux (#469)
arookieofc091c25351bf7
diff --git a/src/editor/lsp/navigationMouse.test.ts b/src/editor/lsp/navigationMouse.test.tsindex 25dc94218..3940c61df 100644--- a/src/editor/lsp/navigationMouse.test.ts+++ b/src/editor/lsp/navigationMouse.test.ts@@ -115,6 +115,14 @@ describe("mouse navigation", () => {expect(openFile).not.toHaveBeenCalled();});+ it.each(["windows", "linux"] as const)("opens the implementation with Ctrl+Alt+click on %s", async (os) => {+ usePlatform.setState({ os });+ useKeymap.setState({ preset: "intellij-windows", overrides: {} });+ click({ ctrlKey: true, altKey: true });+ await vi.waitFor(() => expect(openFile).toHaveBeenCalledOnce());+ expect(lspGoto).toHaveBeenCalledExactlyOnceWith(1, { line: 0, col: 9 }, "implementation");+ });+it("does not navigate with Option+Command when the binding is removed", async () => {useKeymap.setState({ overrides: { "navigate.implementation": ["Meta+Alt+B"] } });click({ metaKey: true, altKey: true });diff --git a/src/platform/keymaps/ideaParity.test.ts b/src/platform/keymaps/ideaParity.test.tsindex 839c98007..9cff980b6 100644--- a/src/platform/keymaps/ideaParity.test.ts+++ b/src/platform/keymaps/ideaParity.test.ts@@ -36,7 +36,7 @@ describe("IDEA keymap parity", () => {["window.previous", ["Meta+Alt+Shift+`"], ["Ctrl+Alt+["]],["code.commentBlock", ["Meta+Alt+/", "Ctrl+Shift+/"], ["Ctrl+Shift+/"]],["navigate.typeDeclaration", ["Meta+Shift+B", "Ctrl+Shift+B"], ["Ctrl+Shift+B"]],- ["navigate.implementation", ["Meta+Alt+B", "Meta+Alt+Button1"], ["Ctrl+Alt+B"]],+ ["navigate.implementation", ["Meta+Alt+B", "Meta+Alt+Button1"], ["Ctrl+Alt+B", "Ctrl+Alt+Button1"]],["find.next", ["Meta+G"], ["F3", "Ctrl+L"]],["find.previous", ["Meta+Shift+G"], ["Shift+F3", "Ctrl+Shift+L"]],["project.copy", ["Meta+C"], ["Ctrl+C", "Ctrl+Insert"]],diff --git a/src/platform/keymaps/intellij-windows.ts b/src/platform/keymaps/intellij-windows.tsindex 3fb590e77..68627ea1d 100644--- a/src/platform/keymaps/intellij-windows.ts+++ b/src/platform/keymaps/intellij-windows.ts@@ -20,7 +20,7 @@ export const intellijWindows: Record<string, string[]> = {"navigate.forward": ["Ctrl+Alt+Right", "Button5"],"navigate.gotoLine": ["Ctrl+G"],"navigate.declaration": ["Ctrl+B"],- "navigate.implementation": ["Ctrl+Alt+B"],+ "navigate.implementation": ["Ctrl+Alt+B", "Ctrl+Alt+Button1"],"navigate.typeDeclaration": ["Ctrl+Shift+B"],"navigate.fileStructure": ["Ctrl+F12"],"navigate.nextError": ["F2"],