You've already forked com.unity.ide.cursor
mirror of
https://github.com/boxqkrtm/com.unity.ide.cursor.git
synced 2026-06-29 16:33:43 +00:00
Compare commits
2 Commits
38fecf55e4
...
v2.0.26
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8c1a4ac3e0 | ||
|
|
84578b3b24 |
@@ -1,4 +1,10 @@
|
|||||||
# Code Editor Package for Visual Studio
|
# Code Editor Package for Cursor
|
||||||
|
|
||||||
|
## [2.0.26] - 2025-11-02
|
||||||
|
|
||||||
|
Integration:
|
||||||
|
|
||||||
|
- Add workspace support
|
||||||
|
|
||||||
## [2.0.22] - 2023-10-03
|
## [2.0.22] - 2023-10-03
|
||||||
|
|
||||||
|
|||||||
@@ -507,6 +507,15 @@ namespace Microsoft.Unity.VisualStudio.Editor {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static string TryFindWorkspace(string directory)
|
||||||
|
{
|
||||||
|
var files = Directory.GetFiles(directory, "*.code-workspace", SearchOption.TopDirectoryOnly);
|
||||||
|
if (files.Length == 0 || files.Length > 1)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
return files[0];
|
||||||
|
}
|
||||||
|
|
||||||
public override bool Open(string path, int line, int column, string solution) {
|
public override bool Open(string path, int line, int column, string solution) {
|
||||||
line = Math.Max(1, line);
|
line = Math.Max(1, line);
|
||||||
column = Math.Max(0, column);
|
column = Math.Max(0, column);
|
||||||
@@ -514,6 +523,10 @@ namespace Microsoft.Unity.VisualStudio.Editor {
|
|||||||
var directory = IOPath.GetDirectoryName(solution);
|
var directory = IOPath.GetDirectoryName(solution);
|
||||||
var application = Path;
|
var application = Path;
|
||||||
|
|
||||||
|
var workspace = TryFindWorkspace(directory);
|
||||||
|
workspace ??= directory;
|
||||||
|
directory = workspace;
|
||||||
|
|
||||||
var existingProcess = FindRunningCursorWithSolution(directory);
|
var existingProcess = FindRunningCursorWithSolution(directory);
|
||||||
if (existingProcess != null) {
|
if (existingProcess != null) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
"name": "com.boxqkrtm.ide.cursor",
|
"name": "com.boxqkrtm.ide.cursor",
|
||||||
"displayName": "Cursor Editor",
|
"displayName": "Cursor Editor",
|
||||||
"description": "Cursor editor integration for supporting Cursor as code editor for unity. Adds support for generating csproj files for intellisense purposes, auto discovery of installations, etc.",
|
"description": "Cursor editor integration for supporting Cursor as code editor for unity. Adds support for generating csproj files for intellisense purposes, auto discovery of installations, etc.",
|
||||||
"version": "2.0.25",
|
"version": "2.0.26",
|
||||||
"unity": "2019.4",
|
"unity": "2019.4",
|
||||||
"unityRelease": "25f1",
|
"unityRelease": "25f1",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.unity.test-framework": "1.1.9"
|
"com.unity.test-framework": "1.1.9"
|
||||||
},
|
},
|
||||||
"_upm": {
|
"_upm": {
|
||||||
"changelog": "Integration:\n\n- Add support for Cursor"
|
"changelog": "Integration:\n\n- Add workspace support"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user