These are chat archives for ensime/ensime-sublime

16th
Jul 2015
Matt Hughes
@matthughes
Jul 16 2015 00:53
The default bindings for “Inspect type at point” don’t seem to work for me using the latest build. If I use the context menu and select Ensime -> Inspect type at point it works. What I really want is for Ensime to always show me the type of whatever is under the cursor; no key bindings, just always showing it. Anyone have that working?
Rory Graves
@rorygraves
Jul 16 2015 06:45
ST2 or 3?
@matthughes Continously displaying the type would certainly be possible - would need a few optimisations to make sure it does not slam the server continuously but I see no reason it would be an issue.
Ghost
@ghost~540393fe163965c9bc2018ce
Jul 16 2015 09:02
I think the emacs client does that (might just be when it detects the mouse is idle). But I don't use the mouse :-P
Matt Hughes
@matthughes
Jul 16 2015 13:48
@rorygraves ST3. As Dick mentioned above, I don’t know many Sublime users that are still on ST2 at this point.
Dick Wall
@dickwall
Jul 16 2015 19:59
OK - after being publicly shamed by the other scalawags on my lack of commitment to ensime sublime, I redoubled my efforts today
and I have pretty much everything working nicely, apart from ctrl-click and alt-click, which I think are something down to the Linux sublime
trying to get to the bottom of that, but binding the goto defn and inspect type to keys works nicely
going to try debugging shortly
what do you guys do about running stuff? Just run sbt in the terminal, or are there fancier options available in sublime?
Rory Graves
@rorygraves
Jul 16 2015 20:14
lol - like it
Ctrl-Click might be Linux or it might be a broken binding in ST3
Check out the old ST3 port commits here -https://github.com/rorygraves/ensime-sublime/commits/ST3_old
Its possible I've missed some parts, because effectively I redid the ST3 port
Generally I've just been using a console
Rory Graves
@rorygraves
Jul 16 2015 20:27
BTW @dickwall I found the the set breakpoint was being hidden by the git plugin (they were not sharing the gutter nicely). I had not got as far as working out why
Matt Hughes
@matthughes
Jul 16 2015 20:31
Ctrl-click doesn’t work in OS X either with ST3.
Rory Graves
@rorygraves
Jul 16 2015 20:34
might have a fix - give me a sec
Rory Graves
@rorygraves
Jul 16 2015 20:50
Hmm, ok - check your console I see zb_offset None Traceback (most recent call last): File "/Users/rorygraves/Library/Application Support/Sublime Text 3/Packages/Ensime/rpc.py", line 418, in callback on_complete(data) File "/Users/rorygraves/Library/Application Support/Sublime Text 3/Packages/Ensime/ensime.py", line 1394, in handle_reply zb_col = zb_offset - contents.rfind(newline, 0, zb_offset) - len(newline) if newline else zb_offset
Which is why its not working for me, probably not correctly decoding the reply msg.
Ok - I know what it is but I won't be able to fix it tonight - if somebody fancies a little challenge
Rory Graves
@rorygraves
Jul 16 2015 20:57
  • Cmd-Click works within your source files, but within libraries you get the above error - this is because the rpc.py SourcePosition.populate method does not understand this form of source position [:type, line, :file, '/workspace/ensime-test-project/.ensime_cache/dep-src/source-jars/java/io/PrintStream.java', :line, 697] and the callback code in EnsimeGoToDefinition.handle_reply does not understand it.
@matthughes @dickwall Always worth looking at hte Ensime Client log and the console when you see any issues (I basically have them open continously right now).
Ideally I want to try and get https://github.com/twolfson/sublime-plugin-tests so I can create proper tests for behaviour
Raised - ensime/ensime-sublime#44
Dick Wall
@dickwall
Jul 16 2015 21:31
even if I close the file and re-open it it's still there
Cool - it's mostly working nicely now :-). I think I remember maybe you saying this Rory, but one thing I have noticed is that when I get an error highlighted on a line and fix it, the error highlight never goes away
Dick Wall
@dickwall
Jul 16 2015 21:44
ah - there is an error in the console: dictionary changed size during iteration in message_clear_all_scala_notes, that sounds like it might affect the cleanup of those error highlights :-)
Dick Wall
@dickwall
Jul 16 2015 22:13
ha - I fixed one!
Dick Wall
@dickwall
Jul 16 2015 22:22
PR in - it's a tiny fix, but by gum it works :-)
#45