Skip to content

Commit d4a9b6b

Browse files
Tell about auto-resolving lsp-sourcekit-executable (#13)
Co-authored-by: Daniel Martín <[email protected]>
1 parent 10d3842 commit d4a9b6b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ If you don't use `use-package`:
3838
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/sourcekit-lsp")))
3939
```
4040

41-
(On macOS, you can get the path to the SourceKit-LSP executable by running `xcrun --find sourcekit-lsp` in Terminal.)
41+
On 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:
42+
43+
```elisp
44+
(setq lsp-sourcekit-executable (string-trim (shell-command-to-string "xcrun --find sourcekit-lsp")))
45+
```
4246

4347
- Finally, if you want to enable `lsp` automatically whenever you visit a `.swift` file:
4448

0 commit comments

Comments
 (0)