ternjs / tern_for_sublime

Sublime Text package adding Tern support
MIT License
801 stars 52 forks source link

Hints Popup Custom Styling #68

Closed FreaKzero closed 9 years ago

FreaKzero commented 9 years ago

Hi thought about a Custom Popup styling Feature, since its just plain Textcontent maybe we can load that css content in the initialisation of the plugin and concat them together in the render_tooltip method. Did it hardwired for a Monokay flavour. screen

marijnh commented 9 years ago

Unless there is a sane way to automatically adjust to any theme, I think this is out of scope for this project (I certainly am not going to special-case individual themes).

linde12 commented 9 years ago

By default the popup will be run with a user style sheet matching the font size and font family that the View is using, but this can be overridden via regular CSS.

See: https://www.sublimetext.com/forum/viewtopic.php?f=2&t=17583

However default style is horrible imo, i like what you've done. Vintage(default) theme in ST3 has white borders so when i tried to replicate what you did it looked horribly though. Wish you could change everything, including the borders, with custom CSS.

FreaKzero commented 9 years ago

i have done a fork which uses styles from any selected theme - its just quite buggy/experimental right now (some things dont work on all themes...) and i didnt had the time yet to work further on this.

linde12 commented 9 years ago

Ah, i'll have to check it out!

PixelT commented 9 years ago

I don't know it exactly a bug, but:

Should the tooltip have auto width / height - or the long string (in example below is url to doc) should be wrap.

tansongyang commented 9 years ago

The most recent commit should address @PixelT 's issue. The URL has been shortened, so that the rest wraps normally.

Closing this issue now. @FreaKzero , if you get your fork in a good state, feel free to submit a pull request.

FreaKzero commented 8 years ago

@tansongyang I did a complete new fork since the codebase changed (renderer) the only thing i would need is someone who can test this in sublime 2 before i make a Pull Request ?

Tested that thing in Sublime 3 now with multiple Themes - also with colorsublime themes, 1 out of 10 isnt working (when it isnt working, it falls back to default colorscheme)

And the "returnarrow" isnt in the right color on many themes ... since i cant figure out whats the default name of the colorstyle in the theme xml ... Asked in alot of communities about this but noone can help me :[

https://github.com/FreaKzero/tern_for_sublime

win

tansongyang commented 8 years ago

@FreaKzero I just tried this in Sublime Text 2, and tern_for_sublime functionality is broken for me. Does the same thing happen to you?

ST2 doesn't support the panel at all, so make sure your code only gets run in ST3.