These are chat archives for ensime/ensime-atom

22nd
Aug 2015
Viktor Hedefalk
@hedefalk
Aug 22 2015 18:03

@dickwall cont from server: Or how old are your reports? It might have changed again…?

Actually we don't even highlight errors - should be really easy to fix but it's not top prio for personally, I'm fine with an error panel with links for now. Implicits, auto-import, and search type are my top prio's.

status now:

Features:

  • [x] Jump to definition (alt-click or f4)
  • [x] Hover for type info
  • [x] Errors and warnings (Cmnds for typecheck file, typecheck buffer, typecheck all). Also setting for typecheck current file on save or while typing.
  • [x] Basic autocompletion
  • [x] Format source file
  • [x] mark applied implicits (conversions and params)
  • [ ] Import type at point
  • [ ] show/explicify applied implicits
  • [ ] Goto definition by simple typing prefix (like cmd-N in Idea or cmd-shift-T in Eclipse?)
  • [ ] Better errors and warnings with markings in gutter
Dick Wall
@dickwall
Aug 22 2015 18:06
well - it was a guy I work with, I don't think he had tried for a week, so I'll let him know to try again
that was almost certainly it - I just had it on my todo list to let you know, just in case you weren't aware, although I thought that unlikely
I was very vague on what he said was wrong anyway - just something about scrolling and stuff not moving with the text
from my sublime work, I figured it might be the error highlights :-)
I asked him if he had reported the issue, and of course he had not. I think our entire industry is used to being ignored by companies we pay, so they assume no one in open source is going to listen either :-)
Viktor Hedefalk
@hedefalk
Aug 22 2015 18:13
Yeah well, jump to definition and hover for type was broken all summer while I was afk unfortunately…
Dick Wall
@dickwall
Aug 22 2015 18:13
hey - question about your jump to definition
in sublime, if you do it on, say, toString on a class, it's a bit useless
likely (I am hoping) due to the way we are calling it, it lists ever toString it knows about in the project and all its libraries
Viktor Hedefalk
@hedefalk
Aug 22 2015 18:14
Let me try! Probably has the same issues since it's all server…
Dick Wall
@dickwall
Aug 22 2015 18:14
well, I am guessing this is more context you can supply to the server as well though
maybe we are shoving a token up there instead of a file location or something
so all it has is the name of the method to work from
makes it useless for common methods with lots of impls
since you can't even see the class you want in the list
what I really want is one that understands the current class heirarchy
so you can jump to any super or subclass of the current one, as well as the class itself
but not every damn thing with a toString :-)
I just updated my atom, taking a quick poke around myself right now
Viktor Hedefalk
@hedefalk
Aug 22 2015 18:16
I just tried a trait with override def toString and a subclass calling super.toString and clicking on that worked fine…
Dick Wall
@dickwall
Aug 22 2015 18:17
OK - so maybe we are calling it stupidly
that's what I was hoping
Viktor Hedefalk
@hedefalk
Aug 22 2015 18:17

outgoing: 000093{"req": {"typehint":"SymbolAtPointReq","file":"/Users/viktor/dev/projects/ensime-test-project/src/main/scala/Foo.scala","point":453}, "callId": 13}

incoming: {"callId":13,"payload":{"name":"se.foo.bar.Thang","localName":"Thang","typehint":"SymbolInfo","declPos":{"typehint":"OffsetSourcePosition","file":"/Users/viktor/dev/projects/ensime-test-project/src/main/scala/se/foo/bar/Thang.scala","offset":31},"type":{"name":"Thang","fullName":"se.foo.bar.Thang","pos":{"typehint":"OffsetSourcePosition","file":"/Users/viktor/dev/projects/ensime-test-project/src/main/scala/se/foo/bar/Thang.scala","offset":31},"typehint":"BasicTypeInfo","typeId":11,"typeArgs":[],"members":[],"declAs":{"typehint":"Class"}},"isCallable":false,"ownerTypeId":12}}

Dick Wall
@dickwall
Aug 22 2015 18:17
yeah - so you are calling with a location
I would bet we are calling with a token or something
I didn't write that one - I think it was brought across from the old sublime project
the one that was almost abandoned
so maybe we just need to improve how it calls - I'll take a look now
Viktor Hedefalk
@hedefalk
Aug 22 2015 18:19
Yeah, ok. Hm, just noticed that atom doesn't send the file content. I'm going to try to see we can always use unsaved files also. There are some api calls that just takes file but there's this SourceFileInfo structure that can contain contents too which basically provides means to sen unsaved buffers.
Dick Wall
@dickwall
Aug 22 2015 18:20
you know the other part of this, and maybe this was it
Viktor Hedefalk
@hedefalk
Aug 22 2015 18:20
Fixing these in server might be pretty trivial. Just change File to SourceFileInfo and send contents to pres.compiler first.
Dick Wall
@dickwall
Aug 22 2015 18:20
I was trying to see the toString on a java library class
that's probably the missing piece
it probably doesn't do such a great job on java, so just falls back on everything
I have been working with the AWS java client a lot, so this was checking the toString on one of the AWS client classes when I noticed it
I bet it's something to do with that
if that's the case, I can deal
Viktor Hedefalk
@hedefalk
Aug 22 2015 18:22
Hm, yeah maybe. It takes some getting used to using ensime when coming from trad. Ide's. Seems you need to have an sbt ~compile on the side always since it indexues .class-files but doesn't produce them itself.
Dick Wall
@dickwall
Aug 22 2015 18:22
cos you can always go to the definition of the actual class instead and then search for toString
Viktor Hedefalk
@hedefalk
Aug 22 2015 18:22
Ah, ok.
Dick Wall
@dickwall
Aug 22 2015 18:23
yeah - I tend to keep sbt compiling, however, have you noticed any contention between ensime's builder and sbt?
about maybe 10% of the time I get sbt build errors, and I think that ensime and sbt are fighting over compilation of the file when I save
cos another save clears it right up
Viktor Hedefalk
@hedefalk
Aug 22 2015 18:23
Not really. Thing is ensime doesn't build anything really? I think.
Dick Wall
@dickwall
Aug 22 2015 18:23
OK - maybe that's something else then
still a few niggles, on the other hand, I have already replaced intellij with this
I can work around the few issues I see without much effort :-)
Viktor Hedefalk
@hedefalk
Aug 22 2015 18:24
afk. putting son to sleep.
Dick Wall
@dickwall
Aug 22 2015 18:25
no worries man - going to play with atom for a bit :-)
like to keep an eye on the opposition ;-)
Viktor Hedefalk
@hedefalk
Aug 22 2015 18:32
Back!
Yeah, I'm gonna try out sublime again too for reference. I actually tried it a few years ago before it broke with sublime 2. But for me atom is the way to go. FOSS man.
Dick Wall
@dickwall
Aug 22 2015 18:46
yeah - atom is very tempting, doesn't work well on my hidpi linux laptop right now though
plus - not sure what the git/github support is like in atom (I would guess pretty good since it's theirs), but the combination of git-sublime, gitgutter and github support in sublime is pretty compelling
Viktor Hedefalk
@hedefalk
Aug 22 2015 18:57
Yeah, I think it's probably comparable. Don't know about those sublime packages, but atom has a git-gutter by default and I just started using this for merge: https://atom.io/packages/merge-conflicts which works pretty nice. Would be super-cool if someone made a real three-way merger like kdiff3 though.
Viktor Hedefalk
@hedefalk
Aug 22 2015 19:02
Sucky that it doesn't work on your linux laptop though. Reported? I thought web would take care of those things…