Skip to content

Commit

Permalink
add groovy mode
Browse files Browse the repository at this point in the history
  • Loading branch information
luozengbin committed Jun 14, 2015
1 parent e3bd613 commit a2ced68
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 53 deletions.
2 changes: 1 addition & 1 deletion lisp/auto-complete
Submodule auto-complete updated 1 files
+7 −0 README.md
2 changes: 1 addition & 1 deletion lisp/e2wm
Submodule e2wm updated 1 files
+42 −7 e2wm.el
2 changes: 1 addition & 1 deletion lisp/emacs-window-layout
2 changes: 1 addition & 1 deletion lisp/popup-el
Submodule popup-el updated 3 files
+6 −2 README.md
+20 −8 popup.el
+1 −1 tests/popup-test.el
2 changes: 1 addition & 1 deletion private
Submodule private updated from 763595 to 72926d
91 changes: 48 additions & 43 deletions site-start.d/init_java.el
Expand Up @@ -6,57 +6,62 @@

(message "init_java ...")

;;
;; auto-insert + yasnippet
;;______________________________________________________________________
;; auto-insert + yasnippet javaファイル作成時にclass codeを自動展開する
;; (define-auto-insert "\\.java$" (lambda (insert "class") (yas/expand)))
;; ;;
;; ;; auto-insert + yasnippet
;; ;;______________________________________________________________________
;; ;; auto-insert + yasnippet javaファイル作成時にclass codeを自動展開する
;; ;; (define-auto-insert "\\.java$" (lambda (insert "class") (yas/expand)))

;;
;; ajc-java-complete
;;______________________________________________________________________
;; http://www.emacswiki.org/emacs/AutoJavaComplete
;; git clone git://github.com/jixiuf/ajc-java-complete.git
;; http://www.emacswiki.org/emacs/ajc-java-complete-my-config-example.el
;; auto-complete-javaの設定
(require 'ajc-java-complete-config)
(add-hook 'java-mode-hook 'ajc-java-complete-mode)
(add-hook 'find-file-hook 'ajc-4-jsp-find-file-hook)
;; ;;
;; ;; ajc-java-complete
;; ;;______________________________________________________________________
;; ;; http://www.emacswiki.org/emacs/AutoJavaComplete
;; ;; git clone git://github.com/jixiuf/ajc-java-complete.git
;; ;; http://www.emacswiki.org/emacs/ajc-java-complete-my-config-example.el
;; ;; auto-complete-javaの設定
;; (require 'ajc-java-complete-config)
;; (add-hook 'java-mode-hook 'ajc-java-complete-mode)
;; (add-hook 'find-file-hook 'ajc-4-jsp-find-file-hook)

;;
;; java anotation support
;;______________________________________________________________________
;; アノテーションインデント
;; (install-elisp-from-emacswiki "java-mode-indent-annotations.el")
(require 'java-mode-indent-annotations)
(defun my-java-mode-hook()
(java-mode-indent-annotations-setup))
(add-hook 'java-mode-hook 'my-java-mode-hook)
;; ;;
;; ;; java anotation support
;; ;;______________________________________________________________________
;; ;; アノテーションインデント
;; ;; (install-elisp-from-emacswiki "java-mode-indent-annotations.el")
;; (require 'java-mode-indent-annotations)
;; (defun my-java-mode-hook()
;; (java-mode-indent-annotations-setup))
;; (add-hook 'java-mode-hook 'my-java-mode-hook)

;;
;; JDEE
;;______________________________________________________________________
;; Or enable more if you wish
(setq semantic-default-submodes '(global-semantic-idle-scheduler-mode
global-semanticdb-minor-mode
global-semantic-idle-summary-mode
global-semantic-mru-bookmark-mode))
(semantic-mode 1)
;; ;;
;; ;; JDEE
;; ;;______________________________________________________________________
;; ;; Or enable more if you wish
;; (setq semantic-default-submodes '(global-semantic-idle-scheduler-mode
;; global-semanticdb-minor-mode
;; global-semantic-idle-summary-mode
;; global-semantic-mru-bookmark-mode))
;; (semantic-mode 1)


;;
;; groovy mode
;;______________________________________________________________________
;;; use groovy-mode when file ends in .groovy or has #!/bin/groovy at start
(autoload 'groovy-mode "groovy-mode" "Major mode for editing Groovy code." t)
(add-to-list 'auto-mode-alist '("\\.groovy$" . groovy-mode))
(add-to-list 'interpreter-mode-alist '("groovy" . groovy-mode))

;;; make Groovy mode electric by default.
(add-hook 'groovy-mode-hook
'(lambda ()
(require 'groovy-electric)
(groovy-electric-mode)))
;;; elpaのgroovy-modeに一部機能がうまく動作しないので、オーバーライドします
(eval-after-load 'groovy-mode
'(progn
(defun groovy-load-file (file-name)
"Load a Groovy file into the inferior Groovy process."
(interactive (comint-get-source "Load Groovy file: " groovy-prev-l/c-dir/file
groovy-source-modes t)) ; T because LOAD
; needs an exact name
(comint-check-source file-name) ; Check to see if buffer needs saved.
(setq groovy-prev-l/c-dir/file (cons (file-name-directory file-name)
(file-name-nondirectory file-name)))
(comint-send-string (groovy-proc) (concat ":l "
file-name
"\n"))))
)

;;
;; Malabar Mode
Expand Down
4 changes: 2 additions & 2 deletions site-start.d/init_main.el
Expand Up @@ -112,8 +112,8 @@
;; python プログラミング
(require 'init_python)

;; ;; java プログラミング
;; (require 'init_java)
;; java プログラミング
(require 'init_java)

;; javascript プログラミング
(require 'init_javascript)
Expand Down
2 changes: 1 addition & 1 deletion site-start.d/init_package.el
Expand Up @@ -95,7 +95,7 @@
goto-chg ; goto last change [source: wiki]
grep-a-lot ; manages multiple search results buffers for grep.el [source: github]
grep-o-matic ; available auto grep word under cursor
;groovy-mode ; Groovy mode derived mode [source: bzr]
groovy-mode ; Groovy mode derived mode [source: bzr]
gtags ; gtags facility for Emacs
guide-key ; Guide the following key bindings automatically and dynamically [source: github]
helm ; Helm is an Emacs incremental and narrowing framework [source: github]
Expand Down
3 changes: 1 addition & 2 deletions site-start.d/init_tabbar.el
Expand Up @@ -19,8 +19,7 @@
;; wget http://www.emacswiki.org/emacs/download/tabbar-ruler.el

(require 'tabbar)
(setq tabbar-mode nil)

(tabbar-mode)

;; Ctrl-Tab, Ctrl-Shift-Tab でタブを切り替える
;; (dolist (func '(tabbar-mode tabbar-forward-tab tabbar-forward-group tabbar-backward-tab tabbar-backward-group))
Expand Down

0 comments on commit a2ced68

Please sign in to comment.