Skip to content

SwiftUI Demo App not working. #13

Description

@Qubik65536

I am trying to port STTextView-Plugin-Neon to iOS, but there's an issue I encountered when working with SwiftUI.

Note

I first encountered this issue when trying to work with iOS SwiftUI, but I can confirm that this issue is also present in the macOS one (in this repo), and this issue IS NOT present in the other (non SwiftUI) demo app.

First, there is an Call to main actor-isolated initializer 'init(cursor:)' in a synchronous nonisolated context error in Neon TreeSitterClient. I solved (bypassed?) this issue by adding @MainActor to the struct ContentView: View of the demo app.

However, then the TreeSitterResource/TreeSitterLanguage.swift gives No such module 'tree_sitter' at import tree_sitter, and if I replace this by import TreeSitter (like what have been changed in SwiftTreeSitter commit b39502d, I'm not sure if I looked at the right thing though), the error Cannot find type 'TSLanguage' in scope is shown at public var parser: UnsafePointer<TSLanguage>.

I am not sure if this is also related to some issue in Neon and/or SwiftTreeSitter and/or other dependencies, and I hope that by posting this here you might be able to give some suggestions on which direction can I look for to solve this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions