Erlang LS Does not Identify Nitrogen Elements

Hey everyone, I am just starting with Erlang and I am going through the “Build it with Nitrogen” book. But after installing the framework and generating the project, I noticed that Erlang LS keeps complaning on the Elements that generated HTML, example:

inner_body() -> 
    [
        #h1{ text="Erlingo! WEBSPINNERS" },       `Erlang LS: record h1 undefined`
        #h1{ text="WELCOME!" },                             `Erlang LS: record h1 undefined`
        #h2{ text="Rusty Klophaus" },                        `Erlang LS: record h2 undefined`
        #h2{ text="Jesse Gumm" },                            `Erlang LS: record h2 undefined`
        #p{}, 	                                                        `Erlang LS: record p undefined`
        #button { id=button, text="Click me!", postback=click }.        `Erlang LS: record button undefined`
    ].

Does it require some extra config to find the sources/dependencies? How do I fix this issue?

Hi, I had a similar issue while using Nitrogen 2.4 (2.x branch), and I resolved it by creating an erlang_ls.config file in the root directory with the following content:

deps_dirs:
  - "lib/*"

include_dirs:
  - "site/include"
  - "lib"

I’m not entirely sure if this is the correct or recommended approach, but after adding this configuration, all the warnings related to Nitrogen records disappeared.