VS代码不处理Erlang Makefile

lnvxswe2  于 2022-12-08  发布在  Erlang
关注(0)|答案(1)|浏览(172)

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?

lbsnaicq

lbsnaicq1#

问题是红色曲线从何而来。您使用的是erlang-ls扩展吗?如果是,您可能需要在项目根目录下的erlang_ls.config文件中配置include_dirs

include_dirs:
  - "path/to/include"

相关问题