diff options
author | mitchell <unknown> | 2020-08-03 18:48:30 -0400 |
---|---|---|
committer | mitchell <unknown> | 2020-08-03 18:48:30 -0400 |
commit | 7e647657b0f95a4756b8aa714b0b3e4295272b81 (patch) | |
tree | aba57ef6f834d046fb0a0f19102418bf9f40652a /doc/LPegLexer.html | |
parent | 79621db631f816c375b91edd2491bfe4b0aee5fa (diff) | |
download | scintilla-mirror-7e647657b0f95a4756b8aa714b0b3e4295272b81.tar.gz |
lexlua: Deprecated `lexer.fold_line_comments()` in favor of `lexer.fold_consecutive_lines()`.
Also use `lexer.fold_line_groups` for option that enables this folding, avoiding
name clash that plagued the previous option.
Added "import" folding for Java.
Diffstat (limited to 'doc/LPegLexer.html')
-rw-r--r-- | doc/LPegLexer.html | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/doc/LPegLexer.html b/doc/LPegLexer.html index 2926ae13b..569b76925 100644 --- a/doc/LPegLexer.html +++ b/doc/LPegLexer.html @@ -1606,14 +1606,14 @@ operator 30 </ul> - <p><a id="lexer.fold_line_comments"></a></p> + <p><a id="lexer.fold_line_groups"></a></p> - <h3><code>lexer.fold_line_comments</code> (boolean)</h3> + <h3><code>lexer.fold_line_groups</code> (boolean)</h3> - <p>Whether or not to fold multiple, consecutive line comments and only show - the top-level comment. + <p>Whether or not to fold multiple, consecutive line groups (such as line + comments or import statements) and only show the top line. This option is disabled by default. - This is an alias for <code>lexer.property['fold.line.comments'] = '1|0'</code>.</p> + This is an alias for <code>lexer.property['fold.line.groups'] = '1|0'</code>.</p> <p><a id="lexer.fold_on_zero_sum_lines"></a></p> @@ -1928,27 +1928,26 @@ operator 30 </ul> - <p><a id="lexer.fold_line_comments"></a></p> + <p><a id="lexer.fold_consecutive_lines"></a></p> - <h3><code>lexer.fold_line_comments</code> (prefix)</h3> + <h3><code>lexer.fold_consecutive_lines</code> (prefix)</h3> - <p>Returns a fold function (to be passed to <code>lexer.add_fold_point()</code>) that folds - consecutive line comments that start with string <em>prefix</em>.</p> + <p>Returns for <code>lexer.add_fold_point()</code> the parameters needed to fold + consecutive lines that start with string <em>prefix</em>.</p> <p>Parameters:</p> <ul> - <li><code>prefix</code>: The prefix string defining a line comment.</li> + <li><code>prefix</code>: The prefix string (e.g. a line comment).</li> </ul> <p>Usage:</p> <ul> - <li><code>lex:add_fold_point(lexer.COMMENT, '--', - lexer.fold_line_comments('--'))</code></li> - <li><code>lex:add_fold_point(lexer.COMMENT, '//', - lexer.fold_line_comments('//'))</code></li> + <li><code>lex:add_fold_point(lexer.COMMENT, lexer.fold_consecutive_lines('--'))</code></li> + <li><code>lex:add_fold_point(lexer.COMMENT, lexer.fold_consecutive_lines('//'))</code></li> + <li><code>lex:add_fold_point(lexer.KEYWORD, lexer.fold_consecutive_lines('import'))</code></li> </ul> |