Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

yveszoundi/grails-projectile-mode

Repository files navigation

Emacs Grails Projectile Mode

http://img.shields.io/badge/license-GNU%20GPLv3-blue.svg http://stable.melpa.org/packages/grails-projectile-mode-badge.svg http://melpa.org/packages/grails-projectile-mode-badge.svg

This project provides useful Grails support for Emacs in terms of navigation and commands execution.

Table of contents

Screenshot

Below is a screenshot of grails-projectile-mode in action. The menu is displayed via guide-key with the flag guide-key/recursive-key-sequence-flag.

./images/screenshot.gif

discover.el support

In order to improve usability, support has been added for discover.el when available. This makes it easier to use commands without resorting that much to muscle memory.

You can install discover.el via the package.el, el-get, Cask or whatever other package manager you may be using. When discover.el is found in the Emacs load-path, support for it will be enabled automatically. To use the default keybindings grails-projectile-keymap-prefix value, followed by the d character (C-c ; d is the original value), add this to your init file.

(require 'grails-projectile-discover)
(grails-projectile-discover-setup-keybindings)

Below is a screenshot of this feature.

./images/discover.png

Grails Code completion information

./images/completion.gif

Typical workflow

I use Eclim as it’s convenient in terms of code completion for both Java and Groovy projects.

  • Create a new application via M-x grails-projectile-wizard-new-app or M-x grails-projectile-wizard-new-plugin.
  • Import the project in Eclipse via M-x eclim-project-import.
  • Refresh dependencies just in case M-x grails-projectile-refresh-dependencies.
  • Use the main grails-projectile commands to compile, clean or run the application.
  • Use eclim commands for content assist among other things with company-mode or autocomplete-mode.

Dependencies installation

Package.el

It is recommended to use the package system to install dependencies. You’ll likely want to start with groovy-mode.

El-get

Add the following to your el-get-sources or user recipes

(:name grails-projectile-mode
 :website "https://github.com/yveszoundi/grails-projectile-mode/"
 :description "Grails support for Projectile."
 :type github
 :pkgname "yveszoundi/grails-projectile-mode")

Cask

Add the following entry to your Cask file within your .emacs.d folder.

(depends-on "grails-projectile-mode")

Set-up

After installation, enable this minor mode with the code below:

(require 'grails-projectile-mode)
(grails-projectile-global-mode t)

If you use discover.el and want to integrate with it also add the following to your setup.

(require 'grails-projectile-discover)
(grails-projectile-discover-setup-keybindings)

Projectile

Projectile is a nice way to manage projects in Emacs. M-x package-install projectile [RET]

Groovy mode

Groovy-mode brings you Groovy syntax highlighting. M-x package-install groovy-mode [RET]

Commands

Minor mode prefix

The default key prefix is C-c ;. This can be changed by customizing the grails-projectile-keymap-prefix variable.

Interactive commands

Below is the list of available interactive commands. If you have (grails-projectile-discover-setup-keybindings) in your init-file, you get the additional C-c ; d binding that will display a popup of available commands.

KeyBindingDescription
C-c ; r dRefresh dependencies
C-c ; c pCompile project
C-c ; c lClean
C-c ; eArbitrary Grails command
C-c ; i wIntegrate with other tools
C-c ; g aGenerate all artifacts for a domain
C-c ; g cGenerate controller
C-c ; g vGenerate views
C-c ; b aBrowse api docs
C-c ; b gBrowse latest guide
C-c ; b wBrowse wiki docs
C-c ; c dCreate domain
C-c ; c tCreate taglib
C-c ; c sCreate service
C-c ; c cCreate controller
C-c ; f dFind domain for file
C-c ; f tFind test for file
C-c ; f sFind service for file
C-c ; f cFind controller for file
C-c ; l dLocate domain
C-c ; l tLocate test
C-c ; l sLocate service
C-c ; l vLocate view
C-c ; l cLocate controller
C-c ; r aRun application
C-c ; n aCreate new application
C-c ; n pCreate new plugin
C-c ; p lList installed plugins
C-c ; p pPackage a plugin

About

Emacs Grails support with Projectile.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •