I'm working on an old erlang code that uses Makefiles to compile. The makefile defines some "include" paths:
# Erlang include directories.
HRL_INCLUDE_DIRS = \
../include
My module imports modules from that path and uses it:
-include("logger.hrl").
VS Code doesn't seem to find this file (red squiggly line under the include statement and function calls.), because logger should have relative or absolute path.
The Makefile does the magic behind the scenes but VS Code doesn't read it.
How to configure VS Code to read the makefile?
1条答案
按热度按时间lbsnaicq1#
问题是红色曲线从何而来。您使用的是erlang-ls扩展吗?如果是,您可能需要在项目根目录下的
erlang_ls.config
文件中配置include_dirs
。