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

Method IndentLine

parse/lang.go:77–77  ·  view source on GitHub ↗

IndentLine returns the indentation level for given line based on previous line's indentation level, and any delta change based on e.g., brackets starting or ending the previous or current line, or other language-specific keywords. See lexer.BracketIndentLine for example. Indent level is in incremen

(fs *FileStates, src [][]rune, tags []lexer.Line, ln int, tabSz int)

Source from the content-addressed store, hash-verified

75 // Indent level is in increments of tabSz for spaces, and tabs for tabs.
76 // Operates on rune source with markup lex tags per line.
77 IndentLine(fs *FileStates, src [][]rune, tags []lexer.Line, ln int, tabSz int) (pInd, delInd, pLn int, ichr indent.Character)
78
79 // AutoBracket returns what to do when a user types a starting bracket character
80 // (bracket, brace, paren) while typing.

Callers 3

indentLineMethod · 0.65
keyInputMethod · 0.65
autoIndentMethod · 0.65

Implementers 3

MarkdownLangparse/languages/markdown/markdown.go
GoLangparse/languages/golang/golang.go
TexLangparse/languages/tex/tex.go

Calls

no outgoing calls

Tested by

no test coverage detected