Tue. Jul 7th, 2020

Swift team announces that it will develop a new LSP-based language service

1 min read

The Swift development team recently announced in the forum that it will launch an open source project based on LSP (Language Server Protocol) for Swift and C-series languages, which is planned to be generated within one month.

The team stated that they are committed to providing high-quality tools to all Swift developers, including those working on non-Apple platforms. Therefore, they want to work with the open source community to focus on building a common infrastructure that can be shared between Xcode and other editors and platforms. The reason for choosing LSP is precisely because of its versatility and active community. By then, Visual Studio Code, Atom, Sublime Text, or other editors can use the same services as Xcode, and their improvements to the service will benefit everyone.

Swift 4

This new LSP-based language service will support:

  • Semantic functionality for Swift source files (code-completion, highlighting, etc.).
  • Semantic functionality for C/C++/ObjC files.
  • Cross-language indexing functionality, including but not limited to:
    • Jump-to-definition
    • Call-hierarchy
    • Search-symbols
  • Cross-language refactoring functionality, like global rename.

The development team will also make the necessary adjustments to Xcode to use this new language service.