emacs-lsp / lsp-sourcekit

lsp-mode :heart: Apple's sourcekit
https://emacs-lsp.github.io/lsp-sourcekit
GNU General Public License v3.0
103 stars 13 forks source link

tell about auto-resolving lsp-sourcekit-executable #13

Closed DivineDominion closed 3 years ago

DivineDominion commented 3 years ago

I think I'm actually resolving the path lazily with my settings so that this doesn't increase startup time:

(use-package swift-mode
  :hook (swift-mode . lsp-deferred))
(use-package lsp-sourcekit
  :after (swift-mode lsp-mode)
  :config
  (setq lsp-sourcekit-executable (string-trim-right (shell-command-to-string "xcrun --find sourcekit-lsp") "\n")))
DivineDominion commented 3 years ago

@danielmartin Thanks for the fix! You're right about the default trim behavior. Not sure what I did wrong that led me to the oddly specialized call.

danielmartin commented 3 years ago

@DivineDominion Thanks for your contribution!