blob: 77d39bf4de1b40ee7de381591de82754716979bc [file] [log] [blame]
Rui Chene63ff392024-02-26 11:11:041;; Chromium Java indentation is slightly different from Google java
2;; indentation this config should help you adjust the conflict add
3;; following to the init.el:
4;; (setq-default chrome-root "/path/to/chrome/src/")
5;; (add-to-list 'load-path (concat chrome-root "tools/emacs"))
6;; (require 'chromium_java_config)
7;; The depths 100 is critical to override some configurations
8(add-hook 'java-mode-hook (lambda ()
9 (setq c-basic-offset 4
10 tab-width 4
11 indent-tabs-mode t)) 100)
12
13;; If you prefer to have directory level configuation. You can
14;; consider using the below configuration instead.
15;; This define some local special settings which won't apply
16;; globally, the add-hook with lowest priority ensure it is
17;; lastly added, therefore will be applied regardless.
18;; (dir-locals-set-class-variables
19;; 'chromium-java-setting
20;; '((nil . ((fill-column . 100)))
21;; (java-mode . ((c-basic-offset . 4)
22;; (tab-width . 4)
23;; (indent-tabs-mode . t)))))
24
25;;
26;; This is part we apply the right directory for the directory
27;; settings. We take one level up in case you store your secondary
28;; chromium checkout in the parent directory
29;; (dir-locals-set-directory-class
30;; (file-name-directory
31;; (directory-file-name
32;; (concat
33;; (or (getenv "CLANKIUM_SRC") (getenv "CHROMIUM_SRC")))))
34;; 'chromium-java-setting)
35
36(provide 'chromium_java_config)