Open
Description
Hello,
I am using the vite plugin for the devtools and have properly setup launchEditor: "cursor"
and added cursor to my path on macos.
When I click a component from the devtools to open it into cursor, it always opens two editors for the line and column of the corresponding html tag:
Apparently cursor requires the --goto
option with :line:column appended to the file name to properly go to a line/column:
cursor --goto /.../SomeVueFile.vue:22:1
If anyone else has an issue with this, here is a workaround:
- Create a
cursorgoto.sh
file in your project root with this content:
#!/bin/bash
cursor --goto "$1:$2:$3"
-
Make it executable
chmod +x cursorgoto.sh
-
Replace it in your vite config:
export default defineConfig({
plugins: [
vueDevtools({ launchEditor: './cursorgoto.sh' }),
]
});
Thank you!
Metadata
Metadata
Assignees
Labels
No labels