All Projects → kishikawakatsumi → Sourcekitforsafari

kishikawakatsumi / Sourcekitforsafari

Licence: mit
SourceKit for Safari is a Safari extension for GitHub, that enables Xcode features like go to definition, find references, or documentation on hover.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Sourcekitforsafari

Remove Google Redirection
Remove redirection and click-tracking in Google search results.
Stars: ✭ 111 (-82.68%)
Mutual labels:  chrome-extension, safari-extension
Npmhub
🔎 A browser extension to explore npm dependencies on GitHub repos
Stars: ✭ 542 (-15.44%)
Mutual labels:  chrome-extension, safari-extension
Simplified Twitter
Remove distractions from the new Twitter layout. Extension for Chrome, Firefox, Safari, Edge & More
Stars: ✭ 111 (-82.68%)
Mutual labels:  chrome-extension, safari-extension
Github Hovercard
Neat hovercards for GitHub.
Stars: ✭ 1,655 (+158.19%)
Mutual labels:  chrome-extension, safari-extension
Spotify Lyrics
🎉 Desktop Spotify Web Player Instant Synchronised Lyrics
Stars: ✭ 162 (-74.73%)
Mutual labels:  chrome-extension, safari-extension
Piper
Browser extension that adds Picture in Picture support to YouTube, Netflix, Amazon Video, Twitch, Plex, and more!
Stars: ✭ 227 (-64.59%)
Mutual labels:  chrome-extension, safari-extension
Ghosttext
👻 Use your text editor to write in your browser. Everything you type in the editor will be instantly updated in the browser (and vice versa).
Stars: ✭ 2,614 (+307.8%)
Mutual labels:  chrome-extension, safari-extension
Minimal Twitter
Minimal Theme for the new Twitter UI 🐦
Stars: ✭ 247 (-61.47%)
Mutual labels:  chrome-extension, safari-extension
Rust Search Extension
🦀 The ultimate search extension for Rust
Stars: ✭ 540 (-15.76%)
Mutual labels:  chrome-extension
Chrome Utm Stripper
Browser extension that strips Google Analytics (UTM) parameters, and various other click tracking tokens, from URL query strings
Stars: ✭ 590 (-7.96%)
Mutual labels:  chrome-extension
Web Search Navigator
Chrome/Firefox extension that adds keyboard shortcuts to Google, YouTube, Github, Amazon, and others
Stars: ✭ 532 (-17%)
Mutual labels:  chrome-extension
Nighttab
A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.
Stars: ✭ 598 (-6.71%)
Mutual labels:  chrome-extension
Fontawesome Iconpicker
Font Awesome Icon Picker component for Bootstrap.
Stars: ✭ 519 (-19.03%)
Mutual labels:  chrome-extension
Burlesco
Leia notícias sem ser assinante, burle o paywall (WebExtension)
Stars: ✭ 528 (-17.63%)
Mutual labels:  chrome-extension
Soulsign Chrome
魂签,一款用于自动签到的chrome插件
Stars: ✭ 611 (-4.68%)
Mutual labels:  chrome-extension
Vue Chrome Extension Template
vue chrome extension template
Stars: ✭ 532 (-17%)
Mutual labels:  chrome-extension
Premid
🧬 Source code of the PreMiD application.
Stars: ✭ 621 (-3.12%)
Mutual labels:  chrome-extension
Chrome Extension Typescript Starter
Chrome Extension TypeScript Starter
Stars: ✭ 601 (-6.24%)
Mutual labels:  chrome-extension
Chromium Web Store
Allows adding extensions from chrome web store on ungoogled-chromium. Also adds semi-automatic extension updating.
Stars: ✭ 574 (-10.45%)
Mutual labels:  chrome-extension
Chrome Extension Udemy Translate
Translate Udemy's subtitles into Chinese、English etc(Disneyplus+netflix+udemy+lynda+hulu+hbo now+primevideo)
Stars: ✭ 553 (-13.73%)
Mutual labels:  chrome-extension

SourceKit for Safari

SourceKit 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.

Warning

This 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.

Features

Show Document Items

Bring up a list of document items, then select your desired document item to jump to the respective source code location.

Quick Help popup

Hovering the mouse cursor over a symbol shows documentation.

Jumps to Definition

If the text at the mouse cursor is a symbol defined in another file, turn it into a link navigating to the file.

Find References

Resolve project-wide references for the symbol denoted by the given text document position.

Highlights References

Highlights all references to the symbol scoped to this file.

Installation

Safari

  • Download the latest SourceKit for Safari.app from GitHub Releases, run it once to install the extension.
  • Open Safari - Preferences - Extension, make sure SourceKit for Safari is checked on the left panel.

Chrome

  • Download the latest SourceKit for Safari.app from GitHub Releases, run it once to install the helper app and the native messaging manifest.

  • Install the extension from Chrome Web Store

(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.)

(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.)

Getting Started

SourceKit for Safari depends on SourceKit-LSP. In order to use SourceKit for Safari, you need to install SourceKit-LSP and set the installation location.

If 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.

If you are using a toolchain from Swift.org, the SourceKit-LSP server is included and can be run with xcrun --toolchain swift sourcekit-lsp.

If your toolchain did not come with SourceKit-LSP, you should build it from source.

SourceKit for Safari uses SourceKit-LSP that comes with Xcode 11.4 by default.

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/sourcekit-lsp

If you want to use other SourceKit-LSP binary, click the toolbar icon and set its full path to the settings text field.

(for Chrome users)

Hover 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).

How it works

SourceKit for Safari will automatically clone a GitHub repository to your local filesystem (~/Library/Group Containers/$(TeamIdentifierPrefix).com.kishikawakatsumi.SourceKitForSafari) when you access there.

Then, 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.

SourceKit for Safari does not automatically update local repositories.

If the local repository is outdated, click the toolbar icon and press the Sync button to update it.

Troubleshooting

Chrome extension doesn't work

Make sure the host application (SourceKit for Safari.app) is running. Chrome extension requires the host application to communicate to the language server.

Development

To use Node Packaged Modules in injected scripts, it requires to combine multiple modules and JavaScript files into one JavaScript file using Browserify.

To do that, run the following commands in Terminal.app. (Node.js development environment such as npm command must be set up in advance.)

cd ./SafariExtension/js
npm install
npm run build

Please make sure to perform clean build when you change injected JavaScript or CSS files. Otherwise, the changes will not install correctly.

References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].