LanguageManager

open class LanguageManager(pointer: <Error class: unknown class><<Error class: unknown class>>)

Provides access to class@Languages.

GtkSourceLanguageManager is an object which processes language description files and creates and stores class@Language objects, and provides API to access them.

Use func@LanguageManager.get_default to retrieve the default instance of GtkSourceLanguageManager, and method@LanguageManager.guess_language to get a class@Language for given file name and content type.

Skipped during bindings generation

  • method search-path: Property TypeInfo of getter and setter do not match

Constructors

Link copied to clipboard
constructor()

Creates a new language manager.

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val gtksourceLanguageManagerPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open val languageIds: List<String>?

Functions

Link copied to clipboard
open fun appendSearchPath(path: String)

Appends @path to the list of directories where the @manager looks for language files.

Link copied to clipboard
open fun getLanguage(id: String): Language?

Gets the class@Language identified by the given @id in the language manager.

Link copied to clipboard
open fun getLanguageIds(): List<String>?

Returns the ids of the available languages.

Link copied to clipboard

Gets the list directories where @lm looks for language files.

Link copied to clipboard
open fun guessLanguage(filename: String? = null, contentType: String? = null): Language?

Picks a class@Language for given file name and content type, according to the information in lang files.

Link copied to clipboard
open fun prependSearchPath(path: String)

Prepends @path to the list of directories where the @manager looks for language files.

Link copied to clipboard
open fun setSearchPath(dirs: List<String>? = null)

Sets the list of directories where the @lm looks for language files.