Skip to content

Commit a680236

Browse files
committed
debug log getWordLengthAndStart()
1 parent b14424d commit a680236

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

internal/ls/completions.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55
"errors"
66
"fmt"
7+
"os"
78
"slices"
89
"strings"
910
"sync"
@@ -2207,6 +2208,7 @@ var wordSeparators = collections.NewSetFromItems(
22072208
// e.g. for "abc def.ghi|jkl", the word length is 3 and the word start is 'g'.
22082209
func getWordLengthAndStart(sourceFile *ast.SourceFile, position int) (wordLength int, wordStart rune) {
22092210
// !!! Port other case of vscode's `DEFAULT_WORD_REGEXP` that covers words that start like numbers, e.g. -123.456abcd.
2211+
fmt.Fprintln(os.Stderr, "position", position, "sourceFile.FileName()", sourceFile.FileName(), "sourceFile.Text()", sourceFile.Text(), "END")
22102212
text := sourceFile.Text()[:position]
22112213
totalSize := 0
22122214
var firstRune rune

0 commit comments

Comments
 (0)