Hi,
i would like to display popup / hints / overlays at certain position in code, so I can show the error where the occur.
Is that somehow possible with the current plugin API? Maybe with dialog2 and custom nibs?
Thank you Fabian
https://github.com/bodnaristvan/JavascriptHinter.tmbundle
Leverages gutter indications (that can be hovered over to reveal the warning).
It also uses the HTML pane to show a rendered hints view, which leverages txmt:// links to make the messages' line numbers clickable.
I use the eslint bundle, which uses the HTML view too.
The gutter indicators are a step into the right direction, but they are not clickable, are they?
Best would be an overlay similar to spellcheck on OSX. Do you know if tmdialog accepts position parameters somehow?
fabian
On 27.03.2016, at 18:43 , Graham Heath graham.p.heath@gmail.com wrote:
https://github.com/bodnaristvan/JavascriptHinter.tmbundle
Leverages gutter indications (that can be hovered over to reveal the warning).
It also uses the HTML pane to show a rendered hints view, which leverages txmt:// links to make the messages' line numbers clickable.
-- Graham Heath
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On 2016-03-27 13:39, Fabian Zeindl wrote:
Hi,
i would like to display popup / hints / overlays at certain position in code, so I can show the error where the occur.
Is that somehow possible with the current plugin API? Maybe with dialog2 and custom nibs?
TextMate doesn't have a plugin API. It does support loading plugins but there's no API. One uses Objective-C method swizzling to implement TextMate plugins.
I have a fork [1] of TextMate that implements overlays that look and behave (mostly) like the overloads (errors and warnings) in XCode [2]. I did create a pull request for this but I need to rewrite it to use a different implementation strategy.
I don't use it myself anymore because it had some problems, so it's stalled.
[1] https://github.com/jacob-carlborg/textmate/tree/inline_marks [2] https://cloud.githubusercontent.com/assets/306980/7550570/34dd48f2-f667-11e4...
On 28.03.2016, at 13:06 , Jacob Carlborg doob@me.com wrote:
TextMate doesn't have a plugin API. It does support loading plugins but there's no API. One uses Objective-C method swizzling to implement TextMate plugins.
I have a fork [1] of TextMate that implements overlays that look and behave (mostly) like the overloads (errors and warnings) in XCode [2]. I did create a pull request for this but I need to rewrite it to use a different implementation strategy.
I don't use it myself anymore because it had some problems, so it's stalled.
Did you move on from TextMate or found some kind of different strategy for this?
On 2016-03-28 13:11, Fabian Zeindl wrote:
Did you move on from TextMate or found some kind of different strategy for this?
No, I'm still using TextMate. Basically the issue is that I need to add a way to hide the overlay. They way I was using it, another fork of TextMate which was running Rubocop (Ruby linter) as you type and showed the errors using this overlay. Since I never implemented word wrapping of the text in the overlays and when you got really long messages in the overlay it got a bit annoying. I also never implemented a way to hide an overlay for a single line. Also when a lot of the Ruby code I was using caused a lot for errors it got even more annoying.
On 28.03.2016, at 13:06 , Jacob Carlborg doob@me.com wrote:
I have a fork [1] of TextMate that implements overlays that look and behave (mostly) like the overloads (errors and warnings) in XCode [2]. I did create a pull request for this but I need to rewrite it to use a different implementation strategy.
I don't use it myself anymore because it had some problems, so it's stalled.
Oh, and which problems does it have or why do you have to change implementation strategy?
Thanks
On 2016-03-28 13:25, Fabian Zeindl wrote:
Oh, and which problems does it have or why do you have to change implementation strategy?
The current implementation renders the overlay using the Core Text primitives (I think) directly in the text view. A better approach would be to render an NSView on top the text view instead. You can see the comment by Allan in the pull request [1] where he suggests to use an NSView instead.
[1] https://github.com/textmate/textmate/pull/1297#issuecomment-134349974