jcberquist / sublimetext-cfml

CFML (ColdFusion and Lucee) package for Sublime Text
MIT License
115 stars 24 forks source link

Definitions #80

Closed thenitai closed 7 years ago

thenitai commented 7 years ago

Hi there,

This package doesn't honor the "show_definitions": false setting. Whatever, I do it shows me the definitions. Really annoying. Can you please fix this?

Thank you.

thenitai commented 7 years ago

At the moment I posted this I saw the CFML settings. To disable it I had to use "cfml_hover_docs": true

Would it be possible to honor the "show_definitions": false, too? Took me quite some time to find it....

Thank you

jcberquist commented 7 years ago

As I understand your request, you would like the CFML package to check the main settings file for the show_definitions setting and not show any popups if it is false? I hesitate to do that because that would mean one could not disable the definition popups from the Default ST package and still use the popups from this package.

I am sorry you had trouble finding out how to turn the CFML hover docs off, perhaps there is a way I could make that setting more visible?

thenitai commented 7 years ago

Well, by default when you set "show_definitions": false in the Sublime Text settings it disables it in all modules. It works in all packages (node, JS, etc.) just not in yours.

jcberquist commented 7 years ago

The setting "show_definitions" is used by the show_definitions command defined in the Default package to control whether that command shows a popup displaying where a symbol is defined when the mouse is hovered over that symbol. That command works globally because ST indexes symbols defined in all the files in a project. If you set cfml_hover_docs to false, and leave show_definitions enabled, you will see that it also works for CFML files. And if you set show_definitions to false, you will see that that popup stops showing up for the CFML files as well - the behavior is the same.

I created my own command to show popups on hover in CFML files. I don't see it as being the same, as I do different things with it such as loading and displaying documentation from cfdocs.org for built in functions. Consequently, I don't think it should be controlled by the same setting.

thenitai commented 7 years ago

Fine by me. However, my experience is that when I set "show_definitions": false your package still shows the popup. Hence the whole reason why I started this thread :)

Only setting "cfml_hover_docs": false AND "show_definitions": false worked.

jcberquist commented 7 years ago

The hover popup for the CFML package is is controlled by cfml_hover_docs, setting it to false stops the CFML package from showing popups on hover no matter what the show_definitions setting is, and the show_definitions setting controls whether the Default package shows its popup for symbol definitions on hover or not. These two settings and popups have nothing to do with each other - except that if both packages try to show you a popup you will see only one, the one that goes last, which will be the CFML package in this case.

I am not sure if we are on the same page or not 😄 . But I am glad you have it doing what you want now.