Stat gets info about the file, including the highlighting language.
()
| 258 | |
| 259 | // Stat gets info about the file, including the highlighting language. |
| 260 | func (tb *Buffer) Stat() error { |
| 261 | tb.fileModOK = false |
| 262 | err := tb.Info.InitFile(string(tb.Filename)) |
| 263 | tb.ConfigKnown() // may have gotten file type info even if not existing |
| 264 | return err |
| 265 | } |
| 266 | |
| 267 | // ConfigKnown configures options based on the supported language info in parse. |
| 268 | // Returns true if supported. |