-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Environment
- OS: Windows 10
- Editor: VSCode
- Erlang LS version: [0.0.39]
- Erlang/OTP version: [OTP25]
Problem Description
I have a project with the following erlang_ls.config
:
include_dirs:
- "server/include"
- "server/src"
- "server/src/*"
- "server/src/*/*"
- "server/src/*/*/*"
I have a macro defined in server/include/adm.hrl
:
-define(adm_free, ...).
This macro is used in multiple .erl
files across different directories.
However, when I use "Find All References" or "Go to Definition" on ?adm_free
, Erlang LS only finds some references, or sometimes only the current file, but not all usages across the project.
I have confirmed that:
- All relevant directories are included in
include_dirs
. - The macro is used in files that are definitely within the indexed paths.
- I have deleted the
.erlang_ls
directory and restarted the editor, but the problem persists. - Other symbols (functions, records) work fine for "Find All References".
Expected Behavior
"Find All References" and "Go to Definition" should find all usages and the definition of the macro across the entire project, not just in the current file or a subset of files.
Additional Information
- There are no errors in the Erlang LS logs related to indexing or include paths.
- Using ripgrep/grep, I can find all macro usages as expected.
Steps to Reproduce
- Define a macro in a header file included in multiple modules.
- Use the macro in several
.erl
files in different subdirectories. - Use "Find All References" or "Go to Definition" on the macro.
- Observe that not all references are found.
Metadata
Metadata
Assignees
Labels
No labels