Closed RaphaelDDL closed 10 years ago
You can try to modify completions_allowed()
method: https://github.com/emmetio/sublime-tern/blob/master/tern.py#L405
You can check view.file_name()
and return False
when you want to disable Tern.
I have no python knowledge but I'll try mess around a bit. Maybe I'll get it to work =D Thanks for pointing out, Sergey
Hello there Sergey,
short question I'd like to know how I specifically turn TernJS scan for other *.js in a specific file type (this case,
.cshtml
).On the emmet.io blog post ( emmet.io/blog/sublime-tern/ ) says this:
Seems it's still trying to load other *.js even outside a project, thus crashing ST2.
long explanation of why
Let me explain the problem i have:
I use projects like it's suggested on emmet.io blog post but sometimes I need to edit files that are inside a Visual Studio Project (no ST project). So I only open the
.cshtml
file inside ST2 without any project only to edit it (because has Emmet, ternjs, jshint, etc etc and VS is bad) but it has sometimes calls to .js files like so<script type="text/javascript" src="/Content/Resources/something/something.js"></script>
.I don't know exactly why but everytime there are scripts included on the
.cshtml
files, ST2 crashes when I'm writing javascript. I've tested and crashed twice when I tried write the same thing (just a$(selector).val()
crashes after pressingv
ofval
). I've removed ternJS and ST stopped crashing. I redownloaded pyV8 but still crashes.So I think that in this case, the ternJS script that tries to load and analyse other .js files is somewhat 'dying'.
The
"exclude": [ /**/ ],
seems to only accept folders, since i tried"exclude": ["**/*.cshtml"]
and had no luck.Thanks alot for another awesome plugin and your time reading.
Best Regards, RaphaelDDL