These are chat archives for ensime/ensime-sublime

27th
Aug 2015
Sam Halliday
@fommil
Aug 27 2015 08:24
although if they make Build.scala files obsolete then the 669 is also useless
Sam Halliday
@fommil
Aug 27 2015 08:36
probably 1050 could do with some input in particular
Rory Graves
@rorygraves
Aug 27 2015 13:43
@dickwall Code looks sane (if a bit hacky), although I could not get the tooltips working - do you ahve a bunch of keybindings/config thats not part of the defult?
Dick Wall
@dickwall
Aug 27 2015 13:48
I have mine set to alt-click
hang on - let me copy my sublime mousemap in here:
and you are too kind, that code is super-hacky
:-)
but I think it will do until we can get JSON working and do it right
Rory Graves
@rorygraves
Aug 27 2015 13:49
lol, I'm comparing to the rest so its not that bad.
exactly
Dick Wall
@dickwall
Aug 27 2015 13:49
[
    {
        "button": "button1", 
        "count": 1, 
        "modifiers": ["ctrl"],
        "press_command": "drag_select",
        "command": "ensime_go_to_definition"
    },
    {
        "button": "button1", 
        "count": 1, 
        "modifiers": [],
        "press_command": "drag_select",
        "command": "ensime_inspect_type_at_point_status"        
    },
    {
        "button": "button1", 
        "count": 1, 
        "modifiers": ["alt"],
        "press_command": "drag_select",
        "press_args": {"by": "columns"},
        "command": "ensime_inspect_type_at_point_tooltip"
    }
]
it's the third one that is bound to tooltip
alt click
on linux I have rebound alt-click in the window manager (move windows) to alt-super-click
cos I barely use that, but I do use this, a lot now
OK - dog walking time
BTW - the middle one provides text type info in the status bar every time you click around the window, which is quite useful as a quick check
I also believe ctrl-shift-t is bound to the tooltip popup by default, but I never use that :-)
Dick Wall
@dickwall
Aug 27 2015 19:53
sorry got distracted half way through PRs by damn work stuff
so - I see the first PR got merged - thanks Rory
second one (improved type info) is in there now. It is a super-hack, and I suggest a total re-write (which I will be happy to do) once we are on JSON. In the meantime I want this one out there for people to use in case I forgot anything (issue reports please) :-)
Rory Graves
@rorygraves
Aug 27 2015 20:01
I tried it a bit earlier (apparently my earlier failure was plain incompetence on my part, checked out in one place, ran the code from a second) - looks good - although first bug if the line has an error on it your get a hyperlinked 'error' text.
but happy to accept as is.
Dick Wall
@dickwall
Aug 27 2015 20:01
no - that's good feedback. How do I make that happen?
oh, I see - if the line in the code has an error?
hmm - didn't think of that :-)
aha - I see it now
interesting - where does that hyperlink go?
damn - I need to keep that but go to the wikipedia entry on errors or something :-)
a bit of flair
it's not heinous, but I will find something fun to do with that
Rory Graves
@rorygraves
Aug 27 2015 20:05
lol
Dick Wall
@dickwall
Aug 27 2015 20:05
incidentally - just found out that it did that before, so it's not actually my change. ;-)
but well found - didn't even occur to me to try that
Rory Graves
@rorygraves
Aug 27 2015 20:05
no its not serious just like a 'hmm, thats odd, wonder where it goes.
Dick Wall
@dickwall
Aug 27 2015 20:05
there's other stuff like that too
the info is not really enough to tell something like a String from a T (i.e. generic)
in the tooltip
Rory Graves
@rorygraves
Aug 27 2015 20:06
It was less a 'hmm can I break it and more 'whoops'
Dick Wall
@dickwall
Aug 27 2015 20:06
so they are linked up too, and they go nowhere useful :-)
Rory Graves
@rorygraves
Aug 27 2015 20:06
lol, fair enough
Dick Wall
@dickwall
Aug 27 2015 20:06
I thought about not linking single char types, but then what about T1, T2, etc.
plus Josh and Daniel have this thing about using long generic type names now too :-)
I figure if the link goes somewhere, bonus :-)
Rory Graves
@rorygraves
Aug 27 2015 20:07
yep - I think we need to revisit this at the protocol/server side
Dick Wall
@dickwall
Aug 27 2015 20:07
if not, well - we will refund your ensime money :-)
Rory Graves
@rorygraves
Aug 27 2015 20:07
yep, full refund
;)
Dick Wall
@dickwall
Aug 27 2015 20:07
I have been using the links like crazy though, partly cos they are new, but they really are useful
what I really want is to get those bounds linked up though
[J <: JsValue] would actually be useful if it took you to JsValue...
Rory Graves
@rorygraves
Aug 27 2015 20:09
yep - I'm sure its possible with a bit of fiddling too.
Dick Wall
@dickwall
Aug 27 2015 20:09
we could probably string parse it
but I am thinking this whole thing needs an overhaul with JSON anyway
however, Python could grab that string and parse out the path names in it
then link them up
Rory Graves
@rorygraves
Aug 27 2015 20:10
Yep - if we are going to do it lets do it right - fix the protocol and make it rock
Dick Wall
@dickwall
Aug 27 2015 20:10
maybe I will get determined enough to do that as a stopgap for now
Rory Graves
@rorygraves
Aug 27 2015 20:16
lol, fair enough
The scary part is how long my list of 'little/medium things I would like to fix is.
Dick Wall
@dickwall
Aug 27 2015 20:17
I don't let them overwhelm me - this week I decided I wanted better tooltip navigation
Rory Graves
@rorygraves
Aug 27 2015 20:17
If I'm out of contract Oct time I plan to knock off a lot of stuff.
Dick Wall
@dickwall
Aug 27 2015 20:17
probably other things I could work on, debugging is still this huge black hole
but everything is an improvement, right?
Rory Graves
@rorygraves
Aug 27 2015 20:18
Everything is improving - its pretty amazing really
Dick Wall
@dickwall
Aug 27 2015 20:18
I haven't really got going on debugging yet because I am not sure how to yet
I think the right answer is to make something in sbt that starts with remote debugging enabled
and just have ensime connect to that
rather than messing around with launch configs and stuff
Rory Graves
@rorygraves
Aug 27 2015 20:18
yes, I think that makes sense
Dick Wall
@dickwall
Aug 27 2015 20:18
apart from anything else, starting tests in debug is a real PIA like that
remembering the scalatest main method, and it brings up its own window, etc.
Rory Graves
@rorygraves
Aug 27 2015 20:19
Oh yeah, had forgotten about that one.
Dick Wall
@dickwall
Aug 27 2015 20:19
I think I need sbt targets run-debug and test-debug
or something like that
they drop into SBT and wait for the debugger to connect
a bit crappy, but better than not working at all
Rory Graves
@rorygraves
Aug 27 2015 20:20
Would you believe we already have a ticket for that ;)
ensime/ensime-server#801
Dick Wall
@dickwall
Aug 27 2015 20:20
cool
cvogt-gitter
@cvogt-gitter
Aug 27 2015 21:07
tried the debugger the other day. stopped at the breakpoint, but stepping through didn’t really work
is that expected to work?
Rory Graves
@rorygraves
Aug 27 2015 21:08
not very well, the step does a jvm step which is a bit meaningless in scala code - scala-ide has a whole bunch of code to make stepping smart enough to be useful. I'm hoping to borrow that code real soon.
cvogt-gitter
@cvogt-gitter
Aug 27 2015 21:09
Cool, that what I wanted to know essentially :)
I know they did quite some magic there.
Another question:
So code completion hooks into sublimes native mechanism, right?
Rory Graves
@rorygraves
Aug 27 2015 21:13
Yes, I believe so
cvogt-gitter
@cvogt-gitter
Aug 27 2015 21:14
I noticed the UI blocking while it is searching for completions. Have you experienced that?
I can see how that can happen, but I think one of the reasons people are interested in sublime is because intellij blocks the UI thread quite frequently. Seems like the one thing an editor should avoid at all cost. Any plan to change that?
Rory Graves
@rorygraves
Aug 27 2015 21:16
I haven't really seen that too badly. I sort of expect it to block if you have actively asked for a completion, but that means ensime must always be fast.
cvogt-gitter
@cvogt-gitter
Aug 27 2015 21:17
I saw it block for a second after I started typing a new identifier
not using it right nowm but will investigate further
Rory Graves
@rorygraves
Aug 27 2015 21:17
I agree, its actually one of the nicer things about the seperation, (i.e. it should be possible to always be responsive). I'm pretty sure that it will annoy me once I start using ensime-sublime full time (plan in the near future).
Yeah 1 second is far, far to long.
one of my todo items is to add some stats capture on the server side so we can see if it being slow on completion responses etc.
@fommil 's recent changes make adding the pages pretty easy
cvogt-gitter
@cvogt-gitter
Aug 27 2015 21:19
stats capture sounds awesome
not sure what you mean by page
Rory Graves
@rorygraves
Aug 27 2015 21:20
Ensime-server has a built in webserver - so you can put all of the stats up real-time.
as well as logging them somewhere
Dick Wall
@dickwall
Aug 27 2015 22:44
I would suspect re the blocking that it's actually processing time for the returned data
the call itself is async
but if it takes a second (this is python remember) to parse the returned data, populate the popup and all that, for a lot of returned data, that could block the UI
the other option is that the plugin does something boneheaded (quite possible) in blocking for the async callback
I also haven't noticed it, but I do tend to use a machine with ludicrous speed (because I do a lot of scala compiling)
so I rarely notice slowdowns on this beast :-)