Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-32595

LSP client does not set textDocument.languageId for .swift files

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • Qt Creator 16.0.0
    • Qt Creator 16.0.0-rc1
    • None
    • Linux/Wayland
    • e6751e664 (16.0)

    Description

      I have configured the LSP client for .swift files as follows:

      (Language is unset because there is no mime-type for Swift in the list)

       

      However, Qt Creator is sending LSP file open notifications that look like this:
      { "textDocument" : { "languageId" : "", "text" : "import CxxStdlib\nimport dpp\n\n\n@main\nstruct HelloWorld {\n static func main()

      {\n var botFactory = dpp.cluster_factory(\"token\")\n botFactory.ref_on_ready()\n botFactory.start()\n }

      \n}\n", "uri" : "file:///home/nils/SwiftLearn/HelloWorld/Sources/HelloWorld/main.swift", "version" : 0 }
      }
      As you can see, languageId is unset causing the LSP server to fail.

       

      The issue has previously been raised in the LSP's GitHub issues: https://github.com/swiftlang/sourcekit-lsp/issues/2028

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            davschul David Schulz
            niansa Nils Anton
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes