Skip to content

Comments

Introduce completion to extension#13

Merged
KevinEady merged 4 commits intomasterfrom
completion
Aug 19, 2021
Merged

Introduce completion to extension#13
KevinEady merged 4 commits intomasterfrom
completion

Conversation

@KevinEady
Copy link
Contributor

No description provided.

if (document) {
const completion = document.completion(position);
if (completion) {
console.log('Completion', completion);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Comment on lines +438 to +459
beforeAll(() => {
const src = 'in-memory-file.src';
const getContents = (pathname: string) => {
if (pathname === src) {
return text;
}
return readFileSync(pathname, 'utf-8');
};

const workspace = new LSPWorkspace({
getContents
});
workspace.read(cfg);

document = new LSPDocument(workspace, src);
});

const getCompletion = (source: string, character: number) => {
text = source;
document.analyze();
return document.completion({ line: 1, character });
};
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe generalize this

@KevinEady KevinEady merged commit 16de9ba into master Aug 19, 2021
@KevinEady KevinEady deleted the completion branch August 19, 2021 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants