@@ -34,9 +34,9 @@ func applyTextEdits(uri protocol.DocumentUri, edits []protocol.TextEdit) error {
3434 lines := strings.Split(string(content), lineEnding)
3535
3636 // Check for overlapping edits
37− for i := 0; i < len(edits); i++ {
37+ for i, edit1 := range edits {
3838 for j := i + 1; j < len(edits); j++ {
39− if rangesOverlap(edits[i].Range, edits[j].Range) {
39+ if rangesOverlap(edit1.Range, edits[j].Range) {
4040 return fmt.Errorf("overlapping edits detected between edit %d and %d", i, j)
4141 }
4242 }
@@ -54,7 +54,7 @@ func applyTextEdits(uri protocol.DocumentUri, edits []protocol.TextEdit) error {
5454
5555 // Apply each edit
5656 for _, edit := range sortedEdits {
57− newLines, err := applyTextEdit(lines, edit, lineEnding)
57+ newLines, err := applyTextEdit(lines, edit)
5858 if err != nil {
5959 return fmt.Errorf("failed to apply edit: %w", err)
6060 }
@@ -82,7 +82,7 @@ func applyTextEdits(uri protocol.DocumentUri, edits []protocol.TextEdit) error {
8282 return nil
8383}
8484
85−func applyTextEdit(lines []string, edit protocol.TextEdit, lineEnding string) ([]string, error) {
85+func applyTextEdit(lines []string, edit protocol.TextEdit) ([]string, error) {
8686 startLine := int(edit.Range.Start.Line)
8787 endLine := int(edit.Range.End.Line)
8888 startChar := int(edit.Range.Start.Character)