Add support for hard tabs

* Add a `hard_tabs` setting that causes indentation to be performed
  using a tab instead of multiple spaces.
* Change Buffer's indentation-related APIs to return an `IndentSize`
  struct with a length and a kind, instead of just a single u32.
* Use hard tabs by default in Go.
This commit is contained in:
Max Brunsfeld 2022-06-08 18:08:07 -07:00
parent 129fc515ef
commit f62fd3cddd
8 changed files with 324 additions and 200 deletions

View file

@ -106,7 +106,7 @@ pub fn line_beginning(
let soft_line_start = map.clip_point(DisplayPoint::new(display_point.row(), 0), Bias::Right);
let indent_start = Point::new(
point.row,
map.buffer_snapshot.indent_column_for_line(point.row),
map.buffer_snapshot.indent_size_for_line(point.row).len,
)
.to_display_point(map);
let line_start = map.prev_line_boundary(point).1;