Home Explore Blog CI



neovim

38th chunk of `runtime/doc/api.txt`
c9792ca145c0d60f7583a77034eda8daaf9189afd88d4bdf0000000100000fc9
 group used for the text range. This
                    and below highlight groups can be supplied either as a
                    string or as an integer, the latter of which can be
                    obtained using |nvim_get_hl_id_by_name()|.
                    Multiple highlight groups can be stacked by passing an
                    array (highest priority last).
                  • hl_eol : when true, for a multiline highlight covering the
                    EOL of a line, continue the highlight for the rest of the
                    screen line (just like for diff and cursorline highlight).
                  • virt_text : virtual text to link to this mark. A list of
                    `[text, highlight]` tuples, each representing a text chunk
                    with specified highlight. `highlight` element can either
                    be a single highlight group, or an array of multiple
                    highlight groups that will be stacked (highest priority
                    last).
                  • virt_text_pos : position of virtual text. Possible values:
                    • "eol": right after eol character (default).
                    • "eol_right_align": display right aligned in the window
                      unless the virtual text is longer than the space
                      available. If the virtual text is too long, it is
                      truncated to fit in the window after the EOL character.
                      If the line is wrapped, the virtual text is shown after
                      the end of the line rather than the previous screen
                      line.
                    • "overlay": display over the specified column, without
                      shifting the underlying text.
                    • "right_align": display right aligned in the window.
                    • "inline": display at the specified column, and shift the
                      buffer text to the right as needed.
                  • virt_text_win_col : position the virtual text at a fixed
                    window column (starting from the first text column of the
                    screen line) instead of "virt_text_pos".
                  • virt_text_hide : hide the virtual text when the background
                    text is selected or hidden because of scrolling with
                    'nowrap' or 'smoothscroll'. Currently only affects
                    "overlay" virt_text.
                  • virt_text_repeat_linebreak : repeat the virtual text on
                    wrapped lines.
                  • hl_mode : control how highlights are combined with the
                    highlights of the text. Currently only affects virt_text
                    highlights, but might affect `hl_group` in later versions.
                    • "replace": only show the virt_text color. This is the
                      default.
                    • "combine": combine with background text color.
                    • "blend": blend with background text color. Not supported
                      for "inline" virt_text.
                  • virt_lines : virtual lines to add next to this mark This
                    should be an array over lines, where each line in turn is
                    an array over `[text, highlight]` tuples. In general,
                    buffer and window options do not affect the display of the
                    text. In particular 'wrap' and 'linebreak' options do not
                    take effect, so the number of extra screen lines will
                    always match the size of the array. However the 'tabstop'
                    buffer option is still used for hard tabs. By default
                    lines are placed below the buffer line containing the
                    mark.
                  • virt_lines_above: place virtual lines above instead.
                  • virt_lines_leftcol: Place virtual lines in the leftmost
                    column of the window,

Title: nvim_buf_set_extmark Optional Parameters (Continued)
Summary
This section continues detailing the optional parameters for the `nvim_buf_set_extmark` function, specifically focusing on virtual text configurations. It explains `virt_text_pos` options (eol, eol_right_align, overlay, right_align, inline) to control virtual text placement. It covers `virt_text_win_col`, `virt_text_hide`, and `virt_text_repeat_linebreak`. Additionally, it explains `hl_mode` options (replace, combine, blend) for highlight combination and discusses the use of `virt_lines` and `virt_lines_above` for adding virtual lines above or below the marked line. Lastly, it mentions `virt_lines_leftcol` for placing virtual lines in the leftmost column of the window.