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

Function findRealRuntimeSyntaxDef

internal/buffer/buffer.go:750–760  ·  view source on GitHub ↗

findRealRuntimeSyntaxDef finds a specific syntax definition in the user's custom syntax files

(name string, header *highlight.Header)

Source from the content-addressed store, hash-verified

748// findRealRuntimeSyntaxDef finds a specific syntax definition
749// in the user's custom syntax files
750func findRealRuntimeSyntaxDef(name string, header *highlight.Header) *highlight.Def {
751 for _, f := range config.ListRealRuntimeFiles(config.RTSyntax) {
752 if f.Name() == name {
753 syndef := parseDefFromFile(f, header)
754 if syndef != nil {
755 return syndef
756 }
757 }
758 }
759 return nil
760}
761
762// findRuntimeSyntaxDef finds a specific syntax definition
763// in the built-in syntax files

Callers 1

UpdateRulesMethod · 0.85

Calls 3

ListRealRuntimeFilesFunction · 0.92
parseDefFromFileFunction · 0.85
NameMethod · 0.65

Tested by

no test coverage detected