{"id":13495825,"url":"https://github.com/kishikawakatsumi/SourceKitForSafari","last_synced_at":"2025-03-28T17:33:57.741Z","repository":{"id":40847140,"uuid":"247506704","full_name":"kishikawakatsumi/SourceKitForSafari","owner":"kishikawakatsumi","description":"SourceKit for Safari is a Safari extension for GitHub, that enables Xcode features like go to definition, find references, or documentation on hover.","archived":false,"fork":false,"pushed_at":"2022-12-12T13:03:12.000Z","size":1710,"stargazers_count":691,"open_issues_count":8,"forks_count":23,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-10-13T14:17:29.454Z","etag":null,"topics":["chrome-extension","safari-extension","sourcekit-lsp"],"latest_commit_sha":null,"homepage":"https://chrome.google.com/webstore/detail/sourcekit-for-chrome/ndfileljkldjnflefdckeiaedelndafe","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kishikawakatsumi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-15T16:35:59.000Z","updated_at":"2024-08-01T07:51:55.000Z","dependencies_parsed_at":"2023-01-27T19:45:46.878Z","dependency_job_id":null,"html_url":"https://github.com/kishikawakatsumi/SourceKitForSafari","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kishikawakatsumi%2FSourceKitForSafari","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kishikawakatsumi%2FSourceKitForSafari/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kishikawakatsumi%2FSourceKitForSafari/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kishikawakatsumi%2FSourceKitForSafari/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kishikawakatsumi","download_url":"https://codeload.github.com/kishikawakatsumi/SourceKitForSafari/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246059336,"owners_count":20717085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chrome-extension","safari-extension","sourcekit-lsp"],"created_at":"2024-07-31T19:01:38.626Z","updated_at":"2025-03-28T17:33:57.701Z","avatar_url":"https://github.com/kishikawakatsumi.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Developer"],"sub_categories":[],"readme":"# SourceKit for Safari\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/40610/79199237-a7ce3480-7e6f-11ea-95b1-f836549717e1.png\" width=\"240\" /\u003e\n\u003c/p\u003e\n\nSourceKit for Safari is a browser extension for GitHub, that enables IDE features on your browser such as symbol navigator, go to definition and documentation on hover.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/40610/77254137-87f98580-6ca2-11ea-96db-6d01d9df6c5d.gif\" width=\"600\" /\u003e\n\n## Warning\n\nThis is really proof of concept code--functional proof of concept, but proof of concept nonetheless--and has not been thoroughly tested. Use at your own risk.\n\n## Features\n\n### Show Document Items\n\nBring up a list of document items, then select your desired document item to jump to the respective source code location.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/40610/77447255-d2aa0780-6e32-11ea-98cc-0f49aa63d9b8.png\" width=\"400\" /\u003e\n\n### Quick Help popup\n\nHovering the mouse cursor over a symbol shows documentation.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/40610/77447411-fd945b80-6e32-11ea-8844-85270be38b91.png\" width=\"400\" /\u003e\n\n### Jumps to Definition\n\nIf the text at the mouse cursor is a symbol defined in another file, turn it into a link navigating to the file.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/40610/77447572-2caacd00-6e33-11ea-9f65-aa67dc89e639.png\" width=\"400\" /\u003e\n\n### Find References\n\n\u003cimg src=\"https://user-images.githubusercontent.com/40610/78826099-eef59900-7a1b-11ea-973c-0f07bc52ff4f.png\" width=\"400\" /\u003e\n\nResolve project-wide references for the symbol denoted by the given text document position.\n\n### Highlights References\n\nHighlights all references to the symbol scoped to this file.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/40610/77877664-5e87bd80-7291-11ea-96c3-22759391afa3.png\" width=\"400\" /\u003e\n\n## Installation\n\n\u003cimg src=\"https://user-images.githubusercontent.com/40610/77444575-5feb5d00-6e2f-11ea-9926-9102245b9afd.png\" width=\"64\" /\u003e\u003cimg src=\"https://user-images.githubusercontent.com/40610/77444792-a17c0800-6e2f-11ea-9c52-8911a3acee1a.png\" width=\"64\" /\u003e\n\n### Safari\n\n* Download the latest `SourceKit for Safari.app` from [GitHub Releases](https://github.com/kishikawakatsumi/SourceKitForSafari/releases), run it once to install the extension.\n* Open Safari - Preferences - Extension, make sure SourceKit for Safari is checked on the left panel.\n\n### Chrome\n\n* Download the latest `SourceKit for Safari.app` from [GitHub Releases](https://github.com/kishikawakatsumi/SourceKitForSafari/releases), run it once to install the helper app and the native messaging manifest.\n\n* Install the extension from [Chrome Web Store](https://chrome.google.com/webstore/detail/sourcekit-for-chrome/ndfileljkldjnflefdckeiaedelndafe)\n\n__(From version 0.6.0, Native Messaging is used to communicate with Language Protocol Server. Therefore, no longer needed to keep the host application running. The extension will automatically launch the helper application. To install the helper application, launch SourceKit for Safari.app once. Then the helper application will be installed.)__\n\n~~(Unlike Safari Extension, Chrome Extension communicates with the language server through the host application. Therefore, the host application must be running while using the extension.)~~\n\n## Getting Started\n\nSourceKit for Safari depends on [SourceKit-LSP](https://github.com/apple/sourcekit-lsp). In order to use SourceKit for Safari, you need to install SourceKit-LSP and set the installation location.\n\nIf you have installed Xcode 11.4+ or the corresponding Command Line Tools package, the SourceKit-LSP server is included and can be run with `xcrun sourcekit-lsp`.\n\nIf you are using a toolchain from Swift.org, the SourceKit-LSP server is included and can be run with `xcrun --toolchain swift sourcekit-lsp`.\n\nIf your toolchain did not come with SourceKit-LSP, you should [build it from source](https://github.com/apple/sourcekit-lsp/blob/master/Documentation/Development.md).\n\nSourceKit for Safari uses SourceKit-LSP that comes with Xcode 11.4 by default.\n\n```\n/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/sourcekit-lsp\n```\nIf you want to use other SourceKit-LSP binary, click the toolbar icon and set its full path to the settings text field.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/40610/78082996-5180e080-73ef-11ea-8bf7-0034720489ec.png\" width=\"600\" /\u003e\n\n(for Chrome users)\n\n\u003cimg src=\"https://user-images.githubusercontent.com/40610/78083215-cbb16500-73ef-11ea-92a4-5759c496b811.png\" width=\"400\"\u003e\n\nHover over symbols in the source code; then, the documentation for that symbol a popup will show or turn it link to the definition (The first may take some time).\n\n## How it works\n\nSourceKit for Safari will automatically clone a GitHub repository to your local filesystem (`~/Library/Group Containers/$(TeamIdentifierPrefix).com.kishikawakatsumi.SourceKitForSafari`) when you access there.\n\nThen, when the source file is displayed on the browser, it automatically communicates with SourceKit-LSP to get information about the source code. Then show them with a popup on the browser.\n\nSourceKit for Safari does not automatically update local repositories.\n\nIf the local repository is outdated, click the toolbar icon and press the Sync button to update it.\n\n## Troubleshooting\n\n### Chrome extension doesn't work\n\nMake sure the host application (`SourceKit for Safari.app`) is running. Chrome extension requires the host application to communicate to the language server.\n\n## Development\n\nTo use [Node Packaged Modules](https://www.npmjs.com/) in injected scripts, it requires to combine multiple modules and JavaScript files into one JavaScript file using [Browserify](http://browserify.org/).\n\nTo do that, run the following commands in `Terminal.app`. (Node.js development environment such as `npm` command must be set up in advance.)\n\n```shell\ncd ./SafariExtension/js\nnpm install\nnpm run build\n```\n\nPlease make sure to perform clean build when you change injected JavaScript or CSS files. Otherwise, the changes will not install correctly.\n\n## References\n\n- [SourceKit-LSP](https://github.com/apple/sourcekit-lsp)\n- [Safari App Extensions](https://developer.apple.com/documentation/safariservices/safari_app_extensions)\n- [Language Server Protocol Specification](https://microsoft.github.io/language-server-protocol/specifications/specification-current/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkishikawakatsumi%2FSourceKitForSafari","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkishikawakatsumi%2FSourceKitForSafari","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkishikawakatsumi%2FSourceKitForSafari/lists"}