You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
In our project there are a couple of platforms to build and release. And the erlang modules are organized something like this:
src/foo.erl, containing all common code.
src/platformA/foo_spec.erl, containing all platform A specific code.
src/platformB/foo_spec.erl, containing all platform B specific code.
and so on
The foo_spec modules are containing the same functions with the same signatures but they are working different as required by their respective platforms. The erlang_ls language server parses and indexes all of the _spec modules which makes code navigation (go to definition or references) painful or impossible.
The project does not use rebar or erlang.mk files. The build system is based on bob and bazel.
Describe the solution you'd like
I'd like to start the erlang_ls server in a platform specific mode by adding a different config_path option via InitOptions for each platform. This is already working. And I would like to have an 'excludes' option in the erlang_ls.config file so paths and files matching these exclude patterns are not parsed and indexed.
Describe alternatives you've considered
I've added each and every include directory to the include_dirs config option without wildcards. But I can't do that with application files because they are searched recursively.
Additional context
I've already made a working prototype with the following examples:
Is your feature request related to a problem? Please describe.
In our project there are a couple of platforms to build and release. And the erlang modules are organized something like this:
src/foo.erl
, containing all common code.src/platformA/foo_spec.erl
, containing all platform A specific code.src/platformB/foo_spec.erl
, containing all platform B specific code.The foo_spec modules are containing the same functions with the same signatures but they are working different as required by their respective platforms. The erlang_ls language server parses and indexes all of the _spec modules which makes code navigation (go to definition or references) painful or impossible.
The project does not use rebar or erlang.mk files. The build system is based on bob and bazel.
Describe the solution you'd like
I'd like to start the erlang_ls server in a platform specific mode by adding a different config_path option via InitOptions for each platform. This is already working. And I would like to have an 'excludes' option in the erlang_ls.config file so paths and files matching these exclude patterns are not parsed and indexed.
Describe alternatives you've considered
I've added each and every include directory to the include_dirs config option without wildcards. But I can't do that with application files because they are searched recursively.
Additional context
I've already made a working prototype with the following examples:
I don't know if my solution is ready for a PR or not, but here it is:
main...gergaly:erlang_ls:excludes
The text was updated successfully, but these errors were encountered: