Closed kevindb closed 6 years ago
Thanks for the detailed report. The issue happens when the package tries to load completions for built in function parameters. Those are loaded from cfdocs data and it seems I don't currently have a way to turn them off. I will add a setting so that they can be disabled.
You may have seen this in the docs but if you can access the cfdocs repository on github and clone it locally, you can point this package to the local copy of the data folder (https://github.com/foundeo/cfdocs/tree/master/data/en) using the setting cfdocs_path
(e.g. "cfdocs_path": "C:/github/cfdocs/data/en/"
). With that in place no network requests will be made to the cfdocs.org repository.
Either way, I will add a setting to disable the network requests.
Incidentally, that return None
you edited is supposed to return a tuple, which is why you are still seeing an error after editing it - you could try return None, False
instead.
Haha, yeah, I did see the option to download a local copy of cfdocs. My company also doesn't like us cloning repos or downloading compressed ZIP files. I'm not all that interested in the autocomplete feature, so it didn't seem worth the fight with IT to download a copy of cfdocs.
I really appreciate your willingness to add an option to disable the network requests. It'll make things a lot easier for my team here.
Thank you again!
you could try
return None, False
instead
You are my hero! This change worked perfectly (for the limited purpose of canceling all the network requests). I'm not longer getting the errors in the console.
I have added a setting "cfdocs_enabled"
to the package settings which you can set to false
to disable the cfdocs integration.
Thank you for making this plugin. It makes ColdFusion development in Sublime Text sooooo much easier.
I am using the sublimetext-cfml v0.26.10 with Sublime Text 3.0 build 3143 on Windows 7. My corporate network blocks network requests that don't go through the corporate proxy, including requests sublimetext-cfml makes to cfdocs.org.
My
User/cfml_package.sublime-settings
file has both of thedocs
settings turned off:However, the entire Sublime Text application still freezes up for about 20 seconds when I am editing a CF function (tags do not cause a problem). When a freeze occurs, this is the error in my console:
I suspect the
cfml_completion_docs
setting is being ignored and a request to cfdocs.org is still being attempted. Is there anotherdocs
setting I should turn off in order to prevent the package from making requests to cfdocs.org?As a short-term fix, I have changed src/cfdocs/cfdocs.py Line 93 from
to
This has "fixed" the freezing issue, but I'm sure it's not an ideal solution. When I do edit a CF function, I get the following error in console (although the application does not freeze):
I'm sorry I can't write a real Pull Request to help address this issue, but I don't know Python at all.
Thank you