MCPcopy
hub / github.com/micro-editor/micro / findRuntimeSyntaxDef

Function findRuntimeSyntaxDef

internal/buffer/buffer.go:764–774  ·  view source on GitHub ↗

findRuntimeSyntaxDef finds a specific syntax definition in the built-in syntax files

(name string, header *highlight.Header)

Source from the content-addressed store, hash-verified

762// findRuntimeSyntaxDef finds a specific syntax definition
763// in the built-in syntax files
764func findRuntimeSyntaxDef(name string, header *highlight.Header) *highlight.Def {
765 for _, f := range config.ListRuntimeFiles(config.RTSyntax) {
766 if f.Name() == name {
767 syndef := parseDefFromFile(f, header)
768 if syndef != nil {
769 return syndef
770 }
771 }
772 }
773 return nil
774}
775
776func resolveIncludes(syndef *highlight.Def) {
777 includes := highlight.GetIncludes(syndef)

Callers 1

UpdateRulesMethod · 0.85

Calls 3

ListRuntimeFilesFunction · 0.92
parseDefFromFileFunction · 0.85
NameMethod · 0.65

Tested by

no test coverage detected