mirror of
https://github.com/carlstedt1/open-in-ide.git
synced 2026-07-22 06:41:02 +00:00
Release 1.1.2: sentence case fixes
This commit is contained in:
parent
be05dd1e89
commit
0eb3291d4f
8 changed files with 21 additions and 17 deletions
|
|
@ -1,5 +1,8 @@
|
|||
# Changelog
|
||||
|
||||
## 1.1.2 - 2026-01-02
|
||||
- Fixed sentence-case issues in UI text (command, settings, and notices) to satisfy Obsidian review automation.
|
||||
|
||||
## 1.1.1 - 2025-12-30
|
||||
- Compliance fixes for Obsidian review: updated command id/name, removed disallowed `console.log`, and corrected `onunload` typing.
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Open the current Obsidian file in your IDE of choice. Supports all file types in your vault (`.md`, `.base`, `.canvas`, and more). Cursor support reuses existing windows when possible and can optionally focus a configured Cursor workspace (`.code-workspace`) before jumping to the file.
|
||||
|
||||
**Current version: 1.1.1**
|
||||
**Current version: 1.1.2**
|
||||
|
||||
## ✨ Features
|
||||
- Command palette action + optional hotkey
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { openFileInCursor } from "../launcher/cursorLauncher";
|
|||
export function registerCommands(plugin: PluginWithSettings<PluginSettings>): void {
|
||||
plugin.addCommand({
|
||||
id: "open-in-cursor",
|
||||
name: "Open in Cursor",
|
||||
name: "Open in cursor",
|
||||
checkCallback: (checking) => {
|
||||
const file = plugin.app.workspace.getActiveFile();
|
||||
if (!file) {
|
||||
|
|
@ -33,14 +33,14 @@ export function registerCommands(plugin: PluginWithSettings<PluginSettings>): vo
|
|||
if (result.ok) {
|
||||
const absolute = resolveVaultAbsolutePath(plugin.app, file);
|
||||
const payload = absolute ?? `Vault-relative path: ${file.path}`;
|
||||
new Notice(result.message ?? `Opened in Cursor: ${payload}`);
|
||||
new Notice(result.message ?? `Opened in cursor: ${payload}`);
|
||||
} else if (result.message) {
|
||||
new Notice(result.message);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("[open-in-ide] failed to launch Cursor", error);
|
||||
new Notice("Failed to launch Cursor. Check console for details.");
|
||||
new Notice("Failed to launch cursor. Check the console for details.");
|
||||
});
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ export async function openFileInCursor(app: App, settings: PluginSettings, file:
|
|||
|
||||
try {
|
||||
await spawnDetached(workspaceCommand, workspaceArgs);
|
||||
return { ok: true, message: "Sent to Cursor workspace." };
|
||||
return { ok: true, message: "Cursor workspace request sent." };
|
||||
} catch (error) {
|
||||
console.warn("[open-in-ide] Failed to open Cursor workspace", error);
|
||||
}
|
||||
|
|
@ -119,7 +119,7 @@ export async function openFileInCursor(app: App, settings: PluginSettings, file:
|
|||
try {
|
||||
await spawnDetached(handlerCommand, args);
|
||||
const target = args.includes("--goto") ? args[args.length - 1] : filePath;
|
||||
return { ok: true, message: `Sent to Cursor (${target}).` };
|
||||
return { ok: true, message: `Cursor request sent (${target}).` };
|
||||
} catch (error) {
|
||||
if (isMissingExecutableError(error) && settings.allowSystemFallback) {
|
||||
const fallback = await launchViaSystem(filePath, vaultPath, settings);
|
||||
|
|
@ -203,18 +203,18 @@ async function launchViaSystem(filePath: string, vaultPath: string | null, setti
|
|||
const macArgs = buildMacArgs(filePath, vaultPath, settings);
|
||||
console.debug("[open-in-ide] macOS fallback", { macArgs });
|
||||
await spawnDetached("open", macArgs);
|
||||
return { ok: true, message: "Fallback: opened via macOS." };
|
||||
return { ok: true, message: "Fallback: opened via the system opener." };
|
||||
}
|
||||
|
||||
if (Platform.isWin) {
|
||||
const winArgs = buildWindowsArgs(filePath);
|
||||
console.debug("[open-in-ide] Windows fallback", { winArgs });
|
||||
await spawnDetached("cmd", winArgs);
|
||||
return { ok: true, message: "Fallback: opened via Windows shell." };
|
||||
return { ok: true, message: "Fallback: opened via the system opener." };
|
||||
}
|
||||
|
||||
await spawnDetached("xdg-open", [filePath]);
|
||||
return { ok: true, message: "Fallback: opened via xdg-open." };
|
||||
return { ok: true, message: "Fallback: opened via the system opener." };
|
||||
} catch (error) {
|
||||
return {
|
||||
ok: false,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "open-in-ide",
|
||||
"name": "Open in IDE",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"minAppVersion": "1.5.0",
|
||||
"description": "Open the active file in Cursor (supports all file types including .base, .canvas, and more) with optional workspace targeting.",
|
||||
"author": "Erik Carlstedt",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "open-in-ide",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"description": "Obsidian plugin that opens the active file in Cursor (and future IDEs).",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
10
settings.ts
10
settings.ts
|
|
@ -46,7 +46,7 @@ export class OpenInIDESettingTab extends PluginSettingTab {
|
|||
|
||||
new Setting(containerEl)
|
||||
.setName("Cursor executable path")
|
||||
.setDesc("Optional absolute path to the Cursor CLI. Leave blank to rely on the PATH lookup.")
|
||||
.setDesc("Optional absolute path to the cursor executable. Leave blank to rely on your system path.")
|
||||
.addText((text) =>
|
||||
text
|
||||
.setPlaceholder("/usr/local/bin/cursor")
|
||||
|
|
@ -72,7 +72,7 @@ export class OpenInIDESettingTab extends PluginSettingTab {
|
|||
|
||||
new Setting(containerEl)
|
||||
.setName("Reuse existing window")
|
||||
.setDesc("Request Cursor to reuse an open window for this vault when possible.")
|
||||
.setDesc("Request cursor to reuse an open window for this vault when possible.")
|
||||
.addToggle((toggle) =>
|
||||
toggle
|
||||
.setValue(this.plugin.settings.reuseExistingWindow)
|
||||
|
|
@ -84,7 +84,7 @@ export class OpenInIDESettingTab extends PluginSettingTab {
|
|||
|
||||
new Setting(containerEl)
|
||||
.setName("Open vault before file")
|
||||
.setDesc("Open the vault root in Cursor before targeting the active note.")
|
||||
.setDesc("Open the vault root in cursor before targeting the active note.")
|
||||
.addToggle((toggle) =>
|
||||
toggle
|
||||
.setValue(this.plugin.settings.openVaultBeforeFile)
|
||||
|
|
@ -96,7 +96,7 @@ export class OpenInIDESettingTab extends PluginSettingTab {
|
|||
|
||||
new Setting(containerEl)
|
||||
.setName("Allow system fallback")
|
||||
.setDesc("Use the OS opener if the Cursor CLI cannot be found.")
|
||||
.setDesc("Use the system opener if the cursor executable cannot be found.")
|
||||
.addToggle((toggle) =>
|
||||
toggle
|
||||
.setValue(this.plugin.settings.allowSystemFallback)
|
||||
|
|
@ -104,7 +104,7 @@ export class OpenInIDESettingTab extends PluginSettingTab {
|
|||
this.plugin.settings.allowSystemFallback = value;
|
||||
await this.plugin.saveSettings();
|
||||
if (!value) {
|
||||
new Notice("System fallback disabled. The command will fail if the Cursor CLI is unavailable.");
|
||||
new Notice("System fallback disabled. The command will fail if the cursor executable is unavailable.");
|
||||
}
|
||||
})
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"1.0.0": "1.5.0",
|
||||
"1.1.0": "1.5.0",
|
||||
"1.1.1": "1.5.0"
|
||||
"1.1.1": "1.5.0",
|
||||
"1.1.2": "1.5.0"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue