m0smith / malabar-mode

EMCS JVM Integration for Java and other JVM based languages
GNU General Public License v2.0
330 stars 52 forks source link

When and how to launch groovy-server? #146

Open jgrzebyta opened 9 years ago

jgrzebyta commented 9 years ago

Hi,

I have no idea how to launch groovy-server. Itried both ways: by run-groovy and malabar-run-groovy.

My configuration file is here. For that particular file the server does not start:

*Messages*
.....
run malabar loader
Loading semantic/db-file...done
Contacting host: localhost:442

If I uncomment malabar-run-groovy in the place where it is currently the server starts but java file is not loaded properly. After time I need to kill emacs:

*Messages*

run malabar loader
Starting malabar server
File mode specification error: (wrong-type-argument stringp nil)
error in process filter: Wrong type argument: markerp, nil [16 times]

If I have in the config file:

  (setq malabar-groovy-grooysh "~/.gvm/groovy/current/bin/groovysh")
  (malabar-run-groovy)
  (java-mode)
  (malabar-mode)

Then groovy server starts but immediately emacs switches groovy buffer into java-mode and groovy-mode. Java source file is just open in the fundamental mode.

My core configuration is:

Thanks a lot, J

m0smith commented 9 years ago

Check in the groovy buffer to the see any errors.

I am using this to get malabar going:

(add-hook 'after-init-hook 
      (lambda ()
        (message "activate-malabar-mode")
        (add-hook 'malabar-java-mode-hook 'flycheck-mode)
        (add-hook 'malabar-groovy-mode-hook 'flycheck-mode)
        (activate-malabar-mode)))

After which I use malabar-run-groovy to start the groovy server. You can use run-groovy directly if that works better for you.