You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 contexterror in Neon TreeSitterClient. I solved (bypassed?) this issue by adding@MainActorto thestruct ContentView: Viewof the demo app.However, then the
TreeSitterResource/TreeSitterLanguage.swiftgivesNo such module 'tree_sitter'atimport tree_sitter, and if I replace this byimport TreeSitter(like what have been changed in SwiftTreeSitter commitb39502d, I'm not sure if I looked at the right thing though), the errorCannot find type 'TSLanguage' in scopeis shown atpublic 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.