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

hover with context help: formatting issue #102

Closed
nimo23 opened this issue Nov 6, 2016 · 12 comments
Closed

hover with context help: formatting issue #102

nimo23 opened this issue Nov 6, 2016 · 12 comments
Milestone

Comments

@nimo23
Copy link

nimo23 commented Nov 6, 2016

When I hover over @component({, then this unformatted help is shown:

-af79b6576af5

Please improve formatting.

@angelozerr
Copy link
Owner

To improve this hover, typescript.java must support Markdown syntax. @nimo23 I'm working on this feature.

@angelozerr
Copy link
Owner

@nimo23 could you put in this issue the Angular2 comment that you have used to do the screenshot. Thanks!

@nimo23
Copy link
Author

nimo23 commented Dec 23, 2016

Angular2 comment? I only type this in ts-editor:

@Component({

and when hovering over it, then (unformatted) help is shown.

@angelozerr
Copy link
Owner

Angular2 comment?

Please copy/paste the full comment in this issue.

@nimo23
Copy link
Author

nimo23 commented Dec 23, 2016

This is the content of ts-file:

import { Component } from '@angular/core';

@Component({
  selector: 'my-app',
  template: `<h1>Hello {{name}}</h1>`
})
export class AppComponent { name = 'Angular'; }

And when hovering over '@component', then this unformatted comment is shown:

(alias) Component(obj: Component): TypeDecorator
import Component
@whatItDoes Marks a class as an Angular component and collects component configuration metadata. @howToUse {@example core/ts/metadata/metadata.ts region='component'} @description Component decorator allows you to mark a class as an Angular component and provide additional metadata that determines how the component should be processed, instantiated and used at runtime. Components are the most basic building block of an UI in an Angular application. An Angular application is a tree of Angular components. Angular components are a subset of directives. Unlike directives, components always have a template and only one component can be instantiated per an element in a template. A component must belong to an NgModule in order for it to be usable by another component or application. To specify that a component is a member of an NgModule, you should list it in the `declarations` field of that NgModule. In addition to the metadata configuration specified via the Component decorator, components can control their runtime behavior by implementing various Life-Cycle hooks. **Metadata Properties:** * **animations** - list of animations of this component * **changeDetection** - change detection strategy used by this component * **encapsulation** - style encapsulation strategy used by this component * **entryComponents** - list of components that are dynamically inserted into the view of this component * **exportAs** - name under which the component instance is exported in a template * **host** - map of class property to host element bindings for events, properties and attributes * **inputs** - list of class property names to data-bind as component inputs * **interpolation** - custom interpolation markers used in this component's template * **moduleId** - ES/CommonJS module id of the file in which this component is defined * **outputs** - list of class property names that expose output events that others can subscribe to * **providers** - list of providers available to this component and its children * **queries** - configure queries that can be injected into the component * **selector** - css selector that identifies this component in a template * **styleUrls** - list of urls to stylesheets to be applied to this component's view * **styles** - inline-defined styles to be applied to this component's view * **template** - inline-defined template for the view * **templateUrl** - url to an external file containing a template for the view * **viewProviders** - list of providers available to this component and its view children ### Example {@example core/ts/metadata/metadata.ts region='component'} @stable @Annotation

@angelozerr
Copy link
Owner

Sorry with my bad explanation.

I would like to have the real comment. So please do Ctrl+Click on "Component " to open the angular file where Component is declared and copy paste the comment in this issue.

@nimo23
Copy link
Author

nimo23 commented Dec 23, 2016

You mean this?:


/**
 * Component decorator and metadata.
 *
 * @stable
 * @Annotation
 */
export declare const Component: ComponentDecorator;

@angelozerr
Copy link
Owner

@nimo23 please retry this issue, I hav eimproved hower with markdown processor.

@nimo23
Copy link
Author

nimo23 commented Feb 6, 2017

I cannot check it because of #141.

When it is resolved, I will check it.

@nimo23
Copy link
Author

nimo23 commented Feb 6, 2017

I have tried it but only the following text is shown when hovering on "Component":

(alias) Component(obj: Component): TypeDecorator
import Component

It is formatted (not on one line). However, the API description itself is not shown.

@angelozerr
Copy link
Owner

I think it's because @waitIdDoes. VSCode has the same problem I think

@angelozerr
Copy link
Owner

I close this issue because now hover uses TextMate markdown liek VSCode.

@angelozerr angelozerr added this to the 1.3.0 milestone Jun 30, 2017
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

No branches or pull requests

2 participants