Buffer.setLanguage

Associates a classLanguage with the buffer.

Note that a classLanguage affects not only the syntax highlighting, but also the context classes. If you want to disable just the syntax highlighting, see gtksource.buffer.Buffer.setHighlightSyntax.

The buffer holds a reference to language.

class Buffer
void
setLanguage

Parameters

language gtksource.language.Language

a #GtkSourceLanguage to set, or null.