Skip to content

Commit be1a488

Browse files
committed
Add about personal and directory-local settings in Japanese
1 parent 5edaae6 commit be1a488

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.ja.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,37 @@ GNU Emacs 24以降では、[package][]機能を使って[MELPA][]からPHPモー
3737

3838
報告の際には `php-mode-version` コマンドを実行して、その出力をバグレポートに含めてください。問題を再現するための手がかりになります。
3939

40+
Settings
41+
--------
42+
43+
### 個人設定
44+
45+
.emacsファイル(`~/.emacs.d/init.el`)にPHPモードでの設定を記述できます。
46+
47+
```lisp
48+
(defun my-php-mode-init ()
49+
(setq-local show-trailing-whitespace t)
50+
(setq-local ac-disable-faces '(font-lock-comment-face font-lock-string-face))
51+
(setq-local page-delimiter "\\_<\\(class\\|function\\|namespace\\)\\_>.+$")
52+
53+
;; If you feel phumped and phpcs annoying, invalidate them.
54+
(when (boundp 'flycheck-disabled-checkers)
55+
(add-to-list 'flycheck-disabled-checkers 'php-phpmd)
56+
(add-to-list 'flycheck-disabled-checkers 'php-phpcs)))
57+
58+
(add-hook 'php-mode-hook #'my-php-mode-init)
59+
```
60+
61+
### プロジェクトローカル設定
62+
63+
プロジェクトのトップディレクトリに`.dir-locals.el`を記述すると、プロジェクト単位の設定を追加することができます。このファイルはユーザー自身のEmacsにインストールされたパッケージに依存するため、バージョン管理の対象に含めないことを推奨します。
64+
65+
```lisp
66+
((nil
67+
(php-project-root . git)
68+
(php-project-coding-style . psr2)))
69+
```
70+
4071
実験的および作業中の機能
4172
-------------------------------------
4273

0 commit comments

Comments
 (0)