Skip to content

Instantly share code, notes, and snippets.

@machour
Created September 2, 2025 13:50
Show Gist options
  • Select an option

  • Save machour/28d0015ffa93fdf8ebe9357a7733d6da to your computer and use it in GitHub Desktop.

Select an option

Save machour/28d0015ffa93fdf8ebe9357a7733d6da to your computer and use it in GitHub Desktop.
devtools({
editor: {
name: 'WebStorm',
open: async (path, lineNumber, columnNumber) => {
const { exec } = await import('node:child_process')
// build args
const lineArg = lineNumber ? `--line ${lineNumber}` : ''
const columnArg = columnNumber ? `--column ${columnNumber}` : ''
// fire away
exec(
`open -na "WebStorm.app" --args ${lineArg} ${columnArg} "${path.replaceAll('$', '\\$')}"`,
)
},
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment