Skip to content

Commit

Permalink
fix typo in the comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangsy committed Nov 15, 2024
1 parent bb1b20e commit 2848df7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/State/State__Response.res
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,13 @@ let rec handle = async (
await State__Goal.removeBoundaryAndDestroy(state, goal)
| GiveString(content) =>
let (indentationWidth, _text, _) = State__Goal.indentationWidth(state.document, goal)
// 1. ideally, we want to add a "\t" or equivalent spaces before the indent based on
// "editor.tabSize" and "editor.insertSpaces"
// but we cannot load the "editor.tabSize" here
// so as a workaround we use a default value of 2
// maybe consider storing these attributed in the state
// 1. ideally, we want to add "\t" or equivalent spaces based on
// "editor.tabSize" and "editor.insertSpaces"
// but we cannot load the "editor.tabSize" here
// so as a workaround, we use a default value of 2
// maybe consider storing these attributes in the state in the future
// 2. the Emacs plugin seems to use len(text) as the indent, which could be a
// safet choice
// safer choice
let defaultIndentation = 2
await State__Goal.modify(state, goal, _ =>
Parser.unescapeEOL(content)->indent(defaultIndentation + indentationWidth)
Expand Down

0 comments on commit 2848df7

Please sign in to comment.