Skip to content

Latest commit

 

History

History
73 lines (60 loc) · 1.34 KB

File metadata and controls

73 lines (60 loc) · 1.34 KB

CodeEditLanguages/TreeSitterModel

Overview

Since fetching queries can be expensive the queries are fetched lazily and kept in memory for the entire session.

Warning: Be aware that running the application in Debug configuration will lead to worse performance. Make sure to run it in Release configuration.

Usage

let language = CodeLanguage.swift

// this call might be expensive
let query = TreeSitterModel.shared.query(for: language.id)

Or access it directly

// this call might be expensive
let query = TreeSitterModel.shared.swiftQuery

Topics

Type Properties

  • shared

Instance Methods

  • query(for:)

Instance Properties

  • bashQuery
  • cQuery
  • cppQuery
  • cSharpQuery
  • cssQuery
  • dartQuery
  • dockerfileQuery
  • ejsQuery
  • elixirQuery
  • erbQuery
  • goQuery
  • goModQuery
  • haskellQuery
  • htmlQuery
  • javaQuery
  • javascriptQuery
  • jsdocQuery
  • jsonQuery
  • jsxQuery
  • kotlinQuery
  • luaQuery
  • markdownQuery
  • markdownInlineQuery
  • objcQuery
  • ocamlQuery
  • ocamlInterfaceQuery
  • phpQuery
  • pythonQuery
  • regexQuery
  • rubyQuery
  • rustQuery
  • scalaQuery
  • sqlQuery
  • swiftQuery
  • tomlQuery
  • tsxQuery
  • typescriptQuery
  • yamlQuery
  • zigQuery