Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(lsp): basic support for textDocument/completion #8651

Merged
merged 4 commits into from
Dec 8, 2020

Conversation

lucacasonato
Copy link
Member

This adds basic textDocument/completion handling.

Currently text completions with TextEdits do not work. I have not managed to figure out why though. Until I find the cause I have disabled the includeCompletionsWithInsertText TS user preference which should mitigate this.

function str(s?: Deno.File) {
  s.
//  ^- complete here is not as nice as VSCode built in. (optional chaining)
}

In the future we should implement completionItem/resolve to support documentation and details field in the CompletionItem.

@lucacasonato lucacasonato changed the title feat: basic completions in lsp feat(lsp): basic support for textDocument/completion Dec 7, 2020
Copy link
Contributor

@kitsonk kitsonk left a comment

Choose a reason for hiding this comment

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

a couple thoughts...

cli/lsp/tsc.rs Outdated Show resolved Hide resolved
cli/tsc/99_main_compiler.js Outdated Show resolved Hide resolved
Copy link
Contributor

@kitsonk kitsonk left a comment

Choose a reason for hiding this comment

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

LGTM 🥳

@lucacasonato lucacasonato merged commit e94a182 into denoland:master Dec 8, 2020
@lucacasonato lucacasonato deleted the lsp-completions branch December 8, 2020 10:36
@kitsonk kitsonk mentioned this pull request Dec 9, 2020
43 tasks
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