GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — JSX tag autoclosing TSServer API · Issue #20811 · microsoft/TypeScript Closed Labels Domain: JSX/TSXRelates to the JSX parser and emitterRelates to the JSX parser and emitterDomain: LS: Completion ListsThe issue relates to showing completion lists in an editorThe issue relates to showing completion lists in an editorFixedA PR has been merged for this issueA PR has been merged for this issueSuggestionAn idea for TypeScriptAn idea for TypeScriptVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue Milestone DescriptionProblem As a basic example, typing out: const z = <div>| would auto close to: const z = <div>|</div> We can look into fixing this entirely on the VS Code side, but I think it may be worth adding this feature to the TSServer API so that other editors such as VS can also benefit Proposed API interface AutoCloseTagRequestArgs extends FileLocationRequestArgs { } interface AutoCloseTagRequest extends FileLocationRequest { command: 'autoCloseTag'; arguments: AutoCloseTagRequestArgs; } This request would take a file and a location within the tag to try to auto close. If applicable, it would return a text insertion that auto-closes that tag: interface AutoCloseResponse extends Response { body?: TextInsertion } Case 1 const z = <div>
Server returns insertion to create: const z = <div></div> Case 2 const z = <div /> or const z = <div></div>
Not result returned. Tag already closed Case 3
No result returned Case 4 const z = <div> <p> </div> </p>
Returns auto close for const z = <div> <p></p> </div> </p> Case 5 const z = <div>text
Returns insertion to add closing tag at end of the text content: const z = <div>text</div> Reacted by Daniel Rosenwasser, jwbay, Tony Skidmore, Jonas Anker Jahr, Bruno Fernandes, Igor Oleinikov, Manuel, William Cantin and Olmo del Corral Reacted by Manuel Activity
MetadataMetadataAssigneesLabelsDomain: JSX/TSXRelates to the JSX parser and emitterRelates to the JSX parser and emitterDomain: LS: Completion ListsThe issue relates to showing completion lists in an editorThe issue relates to showing completion lists in an editorFixedA PR has been merged for this issueA PR has been merged for this issueSuggestionAn idea for TypeScriptAn idea for TypeScriptVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| 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. |