---
title: "apheleia-format-buffer 왜 다른 결과가 나오는가"
url: "https://notes.junghanacs.com/notes/20250217T153318"
author: "Junghan Kim"
date: "2025-02-17T15:33:00+09:00"
lastmod: "2025-02-17T15:33:00+09:00"
description: "Apheleia 포매팅 결과가 환경마다 달라지는 이유를 추적하는 기술 로그이다."
---

> [!abstract] 이 노트에 대하여
> 
> 둠이맥스와 스페이스맥스에서 apheleia-format-buffer 결과가 달라지는 이유를 설정과 버전 차이로 추적한다. 포매터 설정과 환경 변수의 중요성을 보여 주는 문제 해결 노트다.

## BIBLIOGRAPHY

## 히스토리

-   [2025-02-17 Mon 15:33]

## [2025-02-17 W07](https://notes.junghanacs.com/journal/20250217T000000)

@user 둠이맥스와 스페이스맥스에서 이맥스 리스프 코드를 코드를 포멧팅하는데 결과가 서로 달라. apheleia-format-buffer 똑같이 호출했는데. 관련 설정이 있을까?

@assistant 둠이맥스와 스페이스맥스에서 이맥스 리스프 코드 포매팅 결과가 다를 수 있는 이유는 여러 가지 설정 차이 때문일 수 있습니다. **Apheleia** 를 사용할 때, 포매팅 결과는 `apheleia-formatters` 와 `apheleia-mode-alist` 의 설정에 따라 달라질 수 있습니다.

1.  **Formatter 설정**: 각 이맥스 환경에서 `apheleia-formatters` 와 `apheleia-mode-alist` 의 설정이 다를 수 있습니다. 예를 들어, 둠이맥스에서는 특정 모드에 대해 `isort` 와 `black` 을 순차적으로 실행할 수 있는 설정이 있을 수 있습니다[1][3].

2.  **환경 변수 및 설정 파일**: `.doom.d` 와 `.spacemacs.d` 의 설정 파일에서 환경 변수나 커스터마이징된 설정이 다를 수 있습니다. 특히, `apheleia-formatters-respect-indent-level` 같은 변수가 설정된 경우, 포매팅 결과에 영향을 줄 수 있습니다[5].

3.  **Formatter 버전**: 사용하는 Formatter의 버전이 다를 수 있습니다. 최신 버전의 Apheleia는 이전 버전과 다르게 동작할 수 있습니다[5].

이러한 설정 차이를 확인하고 조정하여 포매팅 결과를 일치시킬 수 있습니다.

Citations: [1] <https://discourse.doomemacs.org/t/editor-format-refactor/2644> [2] <https://sangwoo-joh.github.io/doom-emacs> [3] <https://github.com/radian-software/apheleia> [4] <https://github.com/doomemacs/doomemacs/issues/8182> [5] <https://github.com/radian-software/apheleia/releases>

@user
