Emacs - Elixir Setup Configuration Wiki

Hey folks, I can’t manage how to make my lsp config works with jump to definition… I don’t know if I’m doing anything wrong… I can jump to definition in the same file, but I can’t jump to other files or even jump to modules on the aliases section.

This is my configuration:

(use-package elixir-mode
  :hook ((elixir-mode . flycheck-mode))
  :bind (:map elixir-mode-map
              ("C-c i" . elixir-format))
  :config (add-hook 'before-save-hook 'elixir-format))

;; (use-package alchemist
;;   :hook ((elixir-mode . alchemist-mode)
;;          (elixir-mode . flycheck-mode))
;;   :bind (:map elixir-mode-map
;;               ("C-c i" . elixir-format))
;;   :init (setq alchemist-key-command-prefix (kbd "C-c ,"))
;;   :config (add-hook 'before-save-hook 'elixir-format))

(use-package flycheck-credo
  :after (flycheck elixir-mode)

  :custom
  (flycheck-elixir-credo-strict t)

  :hook
  (elixir-mode . flycheck-credo-setup))

(use-package exunit
  :hook (elixir-mode . exunit-mode)

  :bind
  (:map elixir-mode-map
        ("C-c , a" . exunit-verify-all)
        ("C-c , A" . exunit-verify-all-in-umbrella)
        ("C-c , s" . exunit-verify-single)
        ("C-c , v" . exunit-verify)
        ("C-c , r" . exunit-rerun)
        ("C-c , f" . exunit-toggle-file-and-test)))

(use-package lsp-mode
  :hook ((clojure-mode . lsp)
         (elixir-mode . lsp)
         (typescript-mode . lsp)
         (rustic-mode . lsp)
         (lsp-mode . lsp-enable-which-key-integration))
  :bind (("M-." . lsp-find-definition))
  :commands lsp
  :init
  (setq lsp-keymap-prefix "C-c l")
  (setq gc-cons-threshold 100000000)
  (setq read-process-output-max (* 1024 1024)) ;; 1mb
  (setq lsp-file-watch-threshold 1500)
  :config
  (add-to-list 'lsp-language-id-configuration '(nix-mode . "nix"))
  (lsp-register-client
   (make-lsp-client :new-connection (lsp-stdio-connection '("rnix-lsp"))
                    :major-modes '(nix-mode)
                    :server-id 'nix))
  :custom
  (lsp-rust-analyzer-cargo-watch-command "clippy")
  (lsp-rust-analyzer-server-display-inlay-hints t)
  (lsp-eldoc-render-all t))

There’s a lot of configs here, because I use the lsp-mode to other languages as well

I looked at the lsp-log but didn’t find anything useful :confused:

Can you folks help me to debug this issue?