Struct nvimpam_lib::folds::FoldList[][src]

pub struct FoldList { /* fields omitted */ }

Holds the fold data of the buffer. A fold has the following data: Linenumbers start, end (indexed from 1), and a Keyword.

Methods

impl FoldList
[src]

Create a new FoldList. There does not seem to be a way to create one with a predetermined capacity.

Clear FoldList, by clearing the BTreeMap's individually

Insert a fold (start, end) into the FoldList. If the length of the fold is less than 2, or the card is a Comment, we silently return without doing anything. Otherwise, we call the internal insert function that returns an error if the fold is already in the list. In that case, it needs to be removed beforehand.

Remove a fold (start, end) from the foldlist. Only checks if the fold is in the FoldList, and returns an error otherwise.

Remove all the entries from the FoldList, and iterate over lines to populate it with new ones

Delete all folds in nvim, and create the ones from the FoldList TODO: Check if we're using the best method to send

Turn the FoldList into a Vec, containing the tuples (start, end, Keyword)

Parse an array of strings into a FoldList. The foldlist is cleared as a first step.

Creates only level 1 folds. Depending on the ownfold parameter in the definition of the card in the carddata module, each card will be in an own fold, or several adjacent (modulo comments) cards will be subsumed into a fold.

Trait Implementations

impl Default for FoldList
[src]

Returns the "default value" for a type. Read more

impl Debug for FoldList
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for FoldList

impl Sync for FoldList