GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add autoCloseTag language service · Pull Request #24543 · microsoft/TypeScript

Conversation

@ghost

@ghost Deleted user (ghost) commented May 31, 2018

Copy link
Copy Markdown

Fixes #20811

The editor can call this service to get closing text for the current tag, or undefined if not currently in a position to close a tag (or tag already closed).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Andy Hanson
Add autoCloseTag language service
f76f10b
@ghost
ghost force-pushed the autoCloseTag branch from 1bb95bf to f76f10b Compare June 1, 2018 15:17
mhegazy
Mohamed Hegazy (mhegazy) reviewed Jun 1, 2018
View reviewed changes
Comment thread src/services/services.ts Outdated
return true;
}

function getAutoCloseTagAtPosition(fileName: string, position: number): string | undefined {

@mhegazy Mohamed Hegazy (mhegazy) Jun 1, 2018

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

i would make the return type an object with a newText: string property to allow us to add more info as we need in the future.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
mhegazy
Mohamed Hegazy (mhegazy) reviewed Jun 1, 2018
View reviewed changes
Comment thread src/services/types.ts Outdated
getDocCommentTemplateAtPosition(fileName: string, position: number): TextInsertion | undefined;

isValidBraceCompletionAtPosition(fileName: string, position: number, openingBrace: number): boolean;
getAutoCloseTagAtPosition(fileName: string, position: number): string | undefined;

@mhegazy Mohamed Hegazy (mhegazy) Jun 1, 2018

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

i would rather this had JSX in the name.. like getJSXClosingTagAtPosition also we need to add a comment on it when it should be called.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Andy Hanson
Change name to getJsxClosingTagAtPosition and return an object
f7247f7
@ghost
ghost force-pushed the autoCloseTag branch from 4d18f93 to f7247f7 Compare June 1, 2018 17:35
mhegazy
Mohamed Hegazy (mhegazy) approved these changes Jun 3, 2018
View reviewed changes
@ghost
ghost merged commit 886377f into master Jun 4, 2018
@ghost
ghost deleted the autoCloseTag branch June 4, 2018 17:08
@ghost ghost mentioned this pull request Jun 7, 2018
Add completions for closing tag name #24532
Closed
@microsoft Microsoft (microsoft) locked and limited conversation to collaborators Aug 3, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

JSX tag autoclosing TSServer API

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@mhegazy
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.