mirror of
https://github.com/Myzel394/config-lsp.git
synced 2025-06-18 15:05:28 +02:00
fix(server): Improvements
This commit is contained in:
parent
ce7264aded
commit
5e535741d2
@ -177,7 +177,7 @@ func (v KeyEnumAssignmentValue) DeprecatedFetchCompletions(line string, cursor u
|
||||
)
|
||||
|
||||
if found {
|
||||
relativePosition := max(1, foundPosition) - 1
|
||||
relativePosition := min(foundPosition, len(line) - 1)
|
||||
selectedKey := line[:uint32(relativePosition)]
|
||||
line = line[uint32(relativePosition+len(v.Separator)):]
|
||||
cursor -= uint32(relativePosition)
|
||||
|
@ -50,7 +50,6 @@ func GetCompletion(
|
||||
optionsValue = fields.DefaultMountOptionsField
|
||||
}
|
||||
|
||||
|
||||
for _, completion := range optionsValue.DeprecatedFetchCompletions(line, cursor) {
|
||||
var documentation string
|
||||
|
||||
@ -68,7 +67,6 @@ func GetCompletion(
|
||||
completions = append(completions, completion)
|
||||
}
|
||||
|
||||
|
||||
return completions, nil
|
||||
case ast.FstabFieldFreq:
|
||||
value, cursor := getFieldSafely(entry.Fields.Freq, cursor)
|
||||
|
Loading…
x
Reference in New Issue
Block a user