How to display alignment lines and spaces in kakoune?

Hello, I’m new to kakoune and I have two questions:

  1. How to display alignment lines, such as a vertical line in units of 4 spaces?
  2. How to display spaces in the form of “.”?
  1. Not sure what would be the best option for this. Can try using regex highlighter to color the nested spaces differently or if you want to draw say | character along the scope, use replace ranges and some custom script.

  2. Use show-whitespaces highlighter. For example, to render spaces as dots matching your default color:

add-highlighter global/ show-whitespaces -spc .
set-face global Whitespace Default

In the latest version of Kakoune, the show-whitespaces highlighter also supports drawing a character every %opt{indentwidth} characters of whitespace at the beginning of the line. Amending cipharius’ example above:

add-highlighter global show-whitespaces -spc . -indent |