RSense.tmbundle icon indicating copy to clipboard operation
RSense.tmbundle copied to clipboard

Doesn't do anything

Open cmer opened this issue 15 years ago • 10 comments

I installed the prerequisites and the bundle as instructed, but there's no autocompletion at all. I also tried :

/usr/bin/ruby ./RSense.tmbundle/Support/rsense-0.2/bin/rsense code-completion --file='/Users/carl/Desktop/xxx.rb' --location=7:21

And it just hangs there. Not sure if it's a bundle or RSense issue...

cmer avatar Mar 23 '10 15:03 cmer

On the first command rsense starts a server in the background and sends all subsequent commands to the server. It seems like the server is not starting correctly.

If you run rsense server what is the output?

eandrejko avatar Mar 24 '10 02:03 eandrejko

I had to chmod a+x it, but once that's done:

~/Library/Application Support/TextMate/Bundles/RSense.tmbundle/Support/rsense-0.2/bin (master) $ ./rsense server start: /tmp/rsense-socket (8422) warn: Load-path not found: /Library/Ruby/Site/1.8/powerpc-darwin10.0 warn: Load-path not found: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/powerpc-darwin10.0 message: project opened: (sandbox)

Even after starting the server manually, nothing happens. I checked and TM doesn't seem to start the server on its own at all.

cmer avatar Mar 24 '10 03:03 cmer

More info... after manually starting the server, I tried to get completion info from Terminal and it worked:

~/Library/Application Support/TextMate/Bundles $ /usr/bin/ruby ./RSense.tmbundle/Support/rsense-0.2/bin/rsense code-completion --file='/Users/carl/Desktop/xxx.rb' --location=7:21 completion: to_enum Object#to_enum completion: succ! String#succ! completion: swapcase! String#swapcase! completion: instance_variable_defined? Object#instance_variable_defined? completion: crypt String#crypt completion: center String#center completion: equal? Object#equal? completion: public_methods Object#public_methods completion: untaint Object#untaint completion: _dump Object#_dump completion: rjust String#rjust completion: hex String#hex ...

cmer avatar Mar 24 '10 03:03 cmer

If that command is working then it should also work from within TextMate. If not, do you have any tooltip that appears when you press ctrl + esc?

eandrejko avatar Mar 24 '10 04:03 eandrejko

I don't see anything in TM, but in the server, I see:

recv: code-completion --file=/Users/carl/Desktop/xxx.rb --location=7:20

cmer avatar Mar 24 '10 07:03 cmer

Ok! I got it to work! CTRL-ESC doesn't do anything if the last character is . however, it needs to be a letter. This should be fixed imo. What if I have no idea what the method is called?

Also, would it be possible to have auto-completion show everytime I do "object."? Having to hit ctrl-esc everytime is annoying. Back in the days when I was using Visual Studio .Net, I liked how Intellisense worked.

Great work anyhow, very happy to finally have Ruby auto-completion in TM :)

cmer avatar Mar 24 '10 07:03 cmer

Ok I've got a strange problem, the RSense server is running, but all the command does is save the file I'm working on. I've tried assigning the complete method command to a different key combo to make sure, and it was definitely the complete method command.

jarinudom avatar Mar 27 '10 20:03 jarinudom

well I have the same problem. I've manually started the server and it seems to pickup the messages however no suggestions are shown in textmate. if I manually execute the received messages, rsense outputs proper suggestions. Is there any way of debugging what's happening?

knoopx avatar Sep 22 '10 22:09 knoopx

What happens when you try to run the rsense command from directly from the command line?

Try running:

ruby Support/rsense-0.2/bin/rsense

from within the RSense.tmbundle directory and see if this fails with any kind of error.

eandrejko avatar Sep 27 '10 14:09 eandrejko

Started server manually after chmod a+x, got same output as cmer, getting same recv: code-completion logged on server when invoking from TextMate. No tooltip or any visual feedback; the only event after invoking with ctrl + esc seems to be that the file is saved. Running the above command lists out all the rsense options.

What's the next step for diagnosing the cause? I'd really like to see this working.

sohocoke avatar Feb 18 '11 21:02 sohocoke