Skip to content

getCompletionsAtPosition not triggering after emmet modifiers #5

Closed
@pushqrdx

Description

@pushqrdx

I am trying to implement emmet functionality inside typescript template literals however there's a strange behavior regarding getCompletionsAtPosition. with the following code from the demo completions aren't triggered if the position is after the number

            div*5
            div*5>li
    public getCompletionsAtPosition(context: TemplateContext, position: LineAndCharacter):
        CompletionInfo {
        const line = context.text.split(/\n/g)[position.line]
        return {
            isGlobalCompletion: false,
            isMemberCompletion: false,
            isNewIdentifierLocation: false,
            entries: [
                {
                    name: line,
                    kind: '',
                    kindModifiers: 'echo',
                    sortText: 'echo'
                }
            ]
        } as CompletionInfo
    }

To replicate, just use the demo EchoServer and test with emmet abbreviations above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions