Files
openidea/src-tauri/tauri.macos.conf.json
T
l0ng-ai 1d383e608c feat(workbench): Open files from Finder in the single-file window (#152)
On macOS, OpenIDEA is now listed under Finder's Open With for text and source files and for folders. It never becomes the default app for any of them: all document types are declared with rank Alternate, and only in tauri.macos.conf.json, so Windows and Linux installers register nothing.

Files opened from Finder, the Dock or a second instance share one routing path (plan_open). A file inside a local project that is already open, or still opening, goes to that project's window, choosing the deepest root when projects are nested. Any other file goes to the existing single-file window, or to a new one. A folder focuses the window that already has it open, otherwise it opens as a project. Paths that arrive before setup are queued and opened with the first launch.

The single-file window now closes with its last tab, restores its files the next time it opens, and only offers Open File and drop hints when empty. Also fixes a regression: reopening projects on startup no longer replaces a file opened at cold start.

Refs #128
2026-10-28 23:56:23 +08:00

100 lines
1.8 KiB
JSON

{
"bundle": {
"fileAssociations": [
{
"name": "Text and Source Code",
"ext": [],
"contentTypes": [
"public.text",
"public.plain-text",
"public.source-code",
"public.script",
"public.shell-script",
"public.json",
"public.xml",
"public.yaml",
"public.python-script"
],
"role": "Editor",
"rank": "Alternate"
},
{
"name": "Source Code",
"ext": [
"rs",
"go",
"py",
"pyi",
"pyw",
"cjs",
"scss",
"less",
"rst",
"tex",
"ps1",
"bat",
"fish",
"kt",
"kts",
"gradle",
"groovy",
"scala",
"sc",
"ts",
"mts",
"cts",
"jsx",
"vue",
"svelte",
"dart",
"cs",
"fs",
"fsx",
"hs",
"ex",
"exs",
"erl",
"clj",
"cljs",
"edn",
"lua",
"zig",
"nix",
"jl",
"ml",
"mli",
"tf",
"hcl",
"proto",
"graphql",
"gql",
"sql",
"http",
"properties",
"ini",
"cfg",
"conf",
"env",
"lock",
"log",
"diff",
"patch",
"gitignore",
"dockerignore",
"editorconfig",
"dockerfile"
],
"role": "Editor",
"rank": "Alternate"
},
{
"name": "Folder",
"ext": [],
"contentTypes": ["public.folder"],
"role": "Viewer",
"rank": "Alternate"
}
]
}
}