MCPcopy Create free account
hub / github.com/cogentcore/core / SetLanguage

Method SetLanguage

texteditor/buffer.go:289–292  ·  view source on GitHub ↗

SetFileType sets the syntax highlighting and other parameters based on the given fileinfo.Known file type

(ftyp fileinfo.Known)

Source from the content-addressed store, hash-verified

287// SetFileType sets the syntax highlighting and other parameters
288// based on the given fileinfo.Known file type
289func (tb *Buffer) SetLanguage(ftyp fileinfo.Known) *Buffer {
290 tb.Lines.SetLanguage(ftyp)
291 return tb
292}
293
294// FileModCheck checks if the underlying file has been modified since last
295// Stat (open, save); if haven't yet prompted, user is prompted to ensure

Callers 3

homePageFunction · 0.45
textEditorsFunction · 0.45
TestEditorSetLanguageFunction · 0.45

Calls

no outgoing calls

Tested by 1

TestEditorSetLanguageFunction · 0.36