Skip to content

Commit

Permalink
Autodetect GoLand editor (#3980)
Browse files Browse the repository at this point in the history
  • Loading branch information
ifedyukin authored and gaearon committed Feb 5, 2018
1 parent ea760ff commit 03604a4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/react-dev-utils/launchEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ const COMMON_EDITORS_OSX = {
'/Applications/WebStorm.app/Contents/MacOS/webstorm':
'/Applications/WebStorm.app/Contents/MacOS/webstorm',
'/Applications/MacVim.app/Contents/MacOS/MacVim': 'mvim',
'/Applications/GoLand.app/Contents/MacOS/goland':
'/Applications/GoLand.app/Contents/MacOS/goland',
};

const COMMON_EDITORS_LINUX = {
Expand All @@ -72,6 +74,7 @@ const COMMON_EDITORS_LINUX = {
sublime_text: 'sublime_text',
vim: 'vim',
'webstorm.sh': 'webstorm',
'goland.sh': 'goland',
};

const COMMON_EDITORS_WIN = [
Expand All @@ -93,6 +96,8 @@ const COMMON_EDITORS_WIN = [
'rubymine64.exe',
'webstorm.exe',
'webstorm64.exe',
'goland.exe',
'goland64.exe',
];

function addWorkspaceToArgumentsIfExists(args, workspace) {
Expand Down Expand Up @@ -155,6 +160,8 @@ function getArgumentsForLineNumber(
case 'rubymine64':
case 'webstorm':
case 'webstorm64':
case 'goland':
case 'goland64':
return addWorkspaceToArgumentsIfExists(
['--line', lineNumber, fileName],
workspace
Expand Down

0 comments on commit 03604a4

Please sign in to comment.