Spacemacs ========== # .spacemacs.d 2026-06-07 04:38:13 $HOME/.spacemacs の代わりに $HOME/.spacemacs.d/init.el に使用できる。 $HOME/.spacemacs.env も同様に $HOME/.spacemacs.d/.spacemacs.env を使用できる。 # safe-local-variable-values の設定は user-init に書く 2026-06-07 04:38:11 問題 .dir-locals.el が存在する場所でコマンドラインでファイルやディレクトリを起動するとき、safe-local-variable-values でマークしてあるにもかかわらずプロンプトが表示される。 custom-set-variables や dotspacemacs/user-config では、それがロードされる前にチェックが走るでプロンプトが表示されてしまう。 **dotspacemacs/user-init** に書いておけば解決する。 チェック custom-file のパス 大体 $HOME/.emacs.d/.cache/.custom-settings になっている。 プロンプトで ! を選択して permanently save にすると .spacemacs ではなくこのファイルに書き込まれる。 # アイコンがかけているとき 2026-06-07 10:08:33 `M-x all-the-iconsM-x all-the-icons-install-fonts` # c-c++ LSPのインデントがおかしい 2026-06-07 10:58:00 lsp-enable-on-type-formatting を無効にすると解決した。 ``` dotspacemacs/user-config ;; workaround for bad newline auto-indent (with-eval-after-load 'lsp-mode (setq lsp-enable-on-type-formatting nil)) ``` # c-c++ のflycheckがおかしい 2026-06-09 09:26:32 clangd を Spacemacs のものではなく、システムにインストールされているものを使用するようにすると解決した。 lsp-unisntall-server → clangd もしバイナリのパスを明示的に設定するのなら customize-group を使う楽。 # dired-quick-sort 2026-07-16 20:08:49 Ubuntu 26.04 の問題。 Spacemacsの起動時にwarningが出るようになった。 あるいは、dired-quick-sort-setup を実行したとき。 ⛔ Warning (dired-quick-sort): `insert-directory-program' does not point to GNU ls. Please set `insert-directory-program' to GNU ls. The package `dired-quick-sort' will not work and thus is not set up by `dired-quick-sort-setup'. Alternatively, set `dired-quick-sort-suppress-setup-warning' to suppress warning and skip setup silently. customize から insert-directory-program のパスを指定してみたが、効果はなし。 insert-directory-program is a variable defined in ‘files.el’. Its value is "/bin/ls" Original value was "ls" dired-quikc-sort-setup は`ls --version` に GNU の文字列が含まれているかどうかで判定しようとしている。 しかし、Rust版の uutils coreutils が使われているので、失敗する。 ❯ ls --version ls (uutils coreutils) 0.8.0 実害があるのかどうか不明。 もし何か問題があれば、APTパッケージ coreutils-from-gnu をインストールすることも検討する。 とりあえず放置。 # vterm が起動しない 2026-07-16 20:09:04 .elc を削除する。 その後、起動確認して byte compile する。 # 環境変数を固定しない 2026-07-20 21:22:33 起動時の環境変数は .spacemacs.env に記録されている。 これが原因で不具合が起こることがある。 既存の項目で固定されるのが不適切なものは、削除しておく。 .spacemacs.env が再生成されるとき、それらを無視する(記録しない)ように spacemacs-ignored-environment-variables にセットしておく。 ```lisp (defun dotspacemacs/user-init () (add-to-list 'spacemacs-ignored-environment-variables "^GNOME_TERMINAL_SCREEN=") (add-to-list 'spacemacs-ignored-environment-variables "^GNOME_TERMINAL_SERVICE=")) ``` regexp でも良い。