Variable: projectile-other-file-alist
projectile-other-file-alist is a customizable variable defined in
projectile.el.
Value
(("cpp" "h" "hpp" "ipp") ("ipp" "h" "hpp" "cpp")
("hpp" "h" "ipp" "cpp" "cc") ("cxx" "h" "hxx" "ixx")
("ixx" "h" "hxx" "cxx") ("hxx" "h" "ixx" "cxx") ("c" "h") ("m" "h")
("mm" "h")
("h" "c" "cc" "cpp" "ipp" "hpp" "cxx" "ixx" "hxx" "m" "mm")
("cc" "h" "hh" "hpp") ("hh" "cc") ("ml" "mli")
("mli" "ml" "mll" "mly") ("mll" "mli") ("mly" "mli")
("eliomi" "eliom") ("eliom" "eliomi") ("vert" "frag") ("frag" "vert")
(nil "lock" "gpg") ("lock" "") ("gpg" ""))
Documentation
Alist of extensions to try when switching to a file's counterpart.
Keys and values are extensions without the leading dot; the key nil
stands for a file with no extension at all. Each value lists the
extensions projectile-find-other-file offers for a file with that
key's extension, in the order they are tried.
This variable was added, or its default value changed, in projectile version 0.12.0.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defcustom projectile-other-file-alist
'( ;; handle C/C++ extensions
("cpp" . ("h" "hpp" "ipp"))
("ipp" . ("h" "hpp" "cpp"))
("hpp" . ("h" "ipp" "cpp" "cc"))
("cxx" . ("h" "hxx" "ixx"))
("ixx" . ("h" "hxx" "cxx"))
("hxx" . ("h" "ixx" "cxx"))
("c" . ("h"))
("m" . ("h"))
("mm" . ("h"))
("h" . ("c" "cc" "cpp" "ipp" "hpp" "cxx" "ixx" "hxx" "m" "mm"))
("cc" . ("h" "hh" "hpp"))
("hh" . ("cc"))
;; OCaml extensions
("ml" . ("mli"))
("mli" . ("ml" "mll" "mly"))
("mll" . ("mli"))
("mly" . ("mli"))
("eliomi" . ("eliom"))
("eliom" . ("eliomi"))
;; vertex shader and fragment shader extensions in glsl
("vert" . ("frag"))
("frag" . ("vert"))
;; handle files with no extension
(nil . ("lock" "gpg"))
("lock" . (""))
("gpg" . (""))
)
"Alist of extensions to try when switching to a file's counterpart.
Keys and values are extensions without the leading dot; the key nil
stands for a file with no extension at all. Each value lists the
extensions `projectile-find-other-file' offers for a file with that
key's extension, in the order they are tried."
:group 'projectile
:type '(alist :key-type (choice (string :tag "Extension")
(const :tag "No extension" nil))
:value-type (repeat (string :tag "Extension")))
:package-version '(projectile . "0.12.0"))