From 278b0ba481fa29773e730552720b58ad0d381a3f Mon Sep 17 00:00:00 2001 From: notomo Date: Thu, 30 May 2024 22:59:48 +0900 Subject: [PATCH] feat(react-dev-overlay): Open nvim with line number (#66358) Co-authored-by: Jiachi Liu --- .../react-dev-overlay/internal/helpers/launchEditor.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/next/src/client/components/react-dev-overlay/internal/helpers/launchEditor.ts b/packages/next/src/client/components/react-dev-overlay/internal/helpers/launchEditor.ts index 0df2ff6d0521e..41b0fd5d925c8 100644 --- a/packages/next/src/client/components/react-dev-overlay/internal/helpers/launchEditor.ts +++ b/packages/next/src/client/components/react-dev-overlay/internal/helpers/launchEditor.ts @@ -32,6 +32,7 @@ function isTerminalEditor(editor: string) { switch (editor) { case 'vi': case 'vim': + case 'nvim': case 'emacs': case 'nano': { return true @@ -99,6 +100,7 @@ const COMMON_EDITORS_LINUX = { 'rubymine.sh': 'rubymine', sublime_text: 'sublime_text', vim: 'vim', + nvim: 'nvim', 'webstorm.sh': 'webstorm', 'goland.sh': 'goland', 'rider.sh': 'rider', @@ -160,6 +162,7 @@ function getArgumentsForLineNumber( return ['-n' + lineNumber, '-c' + colNumber, fileName] } case 'vim': + case 'nvim': case 'mvim': case 'joe': case 'gvim': {