{"id":13495220,"url":"https://github.com/emacs-lsp/lsp-sourcekit","last_synced_at":"2025-10-12T12:07:05.483Z","repository":{"id":34073154,"uuid":"158664714","full_name":"emacs-lsp/lsp-sourcekit","owner":"emacs-lsp","description":"lsp-mode :heart: Apple's sourcekit","archived":false,"fork":false,"pushed_at":"2024-03-27T22:36:40.000Z","size":2100,"stargazers_count":102,"open_issues_count":7,"forks_count":12,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-04-13T20:52:28.920Z","etag":null,"topics":["apple","emacs","emacs-lsp","language-server-protocol","lsp-sourcekit","sourcekit","sourcekit-lsp","swift","swift-toolchain"],"latest_commit_sha":null,"homepage":"https://emacs-lsp.github.io/lsp-sourcekit","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emacs-lsp.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-11-22T08:14:54.000Z","updated_at":"2024-04-12T15:25:41.000Z","dependencies_parsed_at":"2023-01-15T04:25:38.746Z","dependency_job_id":"c1814404-a8b7-4116-8a25-38db4f4d5932","html_url":"https://github.com/emacs-lsp/lsp-sourcekit","commit_stats":{"total_commits":26,"total_committers":9,"mean_commits":2.888888888888889,"dds":0.6153846153846154,"last_synced_commit":"e765d90a16cd29df0e217e6da38c50d55c38c063"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emacs-lsp%2Flsp-sourcekit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emacs-lsp%2Flsp-sourcekit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emacs-lsp%2Flsp-sourcekit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emacs-lsp%2Flsp-sourcekit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emacs-lsp","download_url":"https://codeload.github.com/emacs-lsp/lsp-sourcekit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222395764,"owners_count":16977619,"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":["apple","emacs","emacs-lsp","language-server-protocol","lsp-sourcekit","sourcekit","sourcekit-lsp","swift","swift-toolchain"],"created_at":"2024-07-31T19:01:32.582Z","updated_at":"2025-10-12T12:07:05.478Z","avatar_url":"https://github.com/emacs-lsp.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"readme":"[![CI](https://github.com/emacs-lsp/lsp-sourcekit/actions/workflows/test.yml/badge.svg)](https://github.com/emacs-lsp/lsp-sourcekit/actions/workflows/test.yml)\n[![MELPA](https://melpa.org/packages/lsp-sourcekit-badge.svg)](https://melpa.org/#/lsp-sourcekit)\n\n# lsp-sourcekit\n\nlsp-sourcekit is a client for [SourceKit-lsp](https://github.com/apple/sourcekit-lsp), a Swift/C/C++/Objective-C language server created by Apple.\n\nUses [lsp-mode](https://github.com/emacs-lsp/lsp-mode), but it's also open to be extended with additions outside of the LSP protocol, like semantic highlighting, if the server supports that.\n\n## Screenshot\n\n![alt text](https://github.com/emacs-lsp/lsp-sourcekit/raw/master/images/main_screenshot.png \"Screenshot of SourceKit-lsp in Emacs\")\n\n## Quickstart\n\nThe SourceKit-LSP language server is included by default in Xcode 11.4+, so the simplest way to get started is the following:\n\n- Download and install Xcode 11.4+ from the Mac App Store or from [the Apple developer portal](https://developer.apple.com).\n- In Emacs, install `lsp-sourcekit`: `M-x package-install lsp-sourcekit RET`.\n- Then you need to configure the package to point to the `sourcekit-lsp` executable:\n\nIf you use `use-package`:\n\n```elisp\n(use-package lsp-sourcekit\n  :after lsp-mode\n  :config\n  (setq lsp-sourcekit-executable \"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/sourcekit-lsp\"))\n```\n\nIf you don't use `use-package`:\n\n```elisp\n(eval-after-load 'lsp-mode\n  (progn\n    (require 'lsp-sourcekit)\n    (setq lsp-sourcekit-executable\n          \"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/sourcekit-lsp\")))\n```\n\nOn macOS, you can get the path to the SourceKit-LSP executable by running `xcrun --find sourcekit-lsp` in Terminal. This also works to populate the path, if your emacs shell is configured correctly: \n\n```elisp\n(setq lsp-sourcekit-executable (string-trim (shell-command-to-string \"xcrun --find sourcekit-lsp\")))\n```\n\n- Finally, if you want to enable `lsp` automatically whenever you visit a `.swift` file:\n\n```elisp\n(use-package swift-mode\n  :hook (swift-mode . (lambda () (lsp))))\n```\n\nIf you don't use `use-package`:\n\n```elisp\n(add-hook 'swift-mode-hook (lambda () (lsp)))\n```\n\n## Advanced Setup\n\nIf you are using a custom Swift toolchain, a toolchain you compiled from source, or simply want to run SourceKit-LSP on a platform different from macOS, the above steps are almost the same, but you may need to set a different value for `lsp-sourcekit-executable`, or set a special environment variable to search for the corresponding toolchain. You can get further details in the [SourceKit-LSP](https://github.com/apple/sourcekit-lsp) repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femacs-lsp%2Flsp-sourcekit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femacs-lsp%2Flsp-sourcekit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femacs-lsp%2Flsp-sourcekit/lists"}