   :mode
   (("\\.js\\'" . js-mode)
    ("\\.json\\'" . js-mode)))
+
+;; basic setup for java code
+(use-package java-mode
+  :ensure nil
+  :init
+  (add-hook 'java-mode-hook
+            (lambda ()
+              (setq c-basic-offset 4                             ; use common convention
+                    tab-width 8                                  ; 4 spaces indentation
+                    evil-shift-width 4                           ; no tabs
+                    indent-tabs-mode nil)))
+  :config
+  :mode
+  (("\\.java\\'" . java-mode)))
 
 (use-package cc-mode
   :init

  :commands (smart-tabs-mode)
  :init
  (progn
    (add-hook 'c-mode-common-hook #'smart-tabs-mode)
    (add-hook 'python-mode-hook #'smart-tabs-mode))
  :config
  (progn

          rtags-tooltips-enabled nil
          rtags-display-current-error-as-message nil
          rtags-completions-enabled t)
    (add-hook 'c++-mode-hook #'rtags-start-process-unless-running)
    (add-hook 'c-mode-hook #'rtags-start-process-unless-running)
    (add-hook 'c++-mode-hook #'me:flycheck-rtags-setup)
    (add-hook 'c-mode-hook #'me:flycheck-rtags-setup)
    (add-hook 'company-mode-hook  #'me:company-rtags-setup))
  :config
  (progn
