feat(whitespace): add leading, eol, tabs modes and highlight leading/trailing errors
This changes whitespace rendering to use a map of the visible viewport. The view map makes it easy and fast to implement various whitespace highlighting and rendering features.
This commit is contained in:
parent
233e881f95
commit
919d5ee9bb
2 changed files with 251 additions and 80 deletions
|
@ -685,7 +685,15 @@ const cmds = struct {
|
|||
self.config.whitespace_mode = if (std.mem.eql(u8, self.config.whitespace_mode, "none"))
|
||||
"indent"
|
||||
else if (std.mem.eql(u8, self.config.whitespace_mode, "indent"))
|
||||
"leading"
|
||||
else if (std.mem.eql(u8, self.config.whitespace_mode, "leading"))
|
||||
"eol"
|
||||
else if (std.mem.eql(u8, self.config.whitespace_mode, "eol"))
|
||||
"tabs"
|
||||
else if (std.mem.eql(u8, self.config.whitespace_mode, "tabs"))
|
||||
"visible"
|
||||
else if (std.mem.eql(u8, self.config.whitespace_mode, "visible"))
|
||||
"full"
|
||||
else
|
||||
"none";
|
||||
try self.save_config();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue