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 it possible to expose a public API that will return the Module that corresponds to the current line in the file? (i.e. if there are three modules defined in a file, this API will return the module whose body is on the specified line).
This would be a replacement for ElixirLS calling into ElixirSense.Core.Metadata.get_env:
I believe with the changes from #234 the need for that is lower.
The problem with our approach is that we use token_metadata from AST. This works well for standard elixir code but it will fail for anything macro generated. In elixir a code position moay correspond to many modules. There's no better standard lib API that returns code ranges for module as of 1.15. Compile tracer only returns begin line in macro env. Docs return begin line and column.
Is it possible to expose a public API that will return the Module that corresponds to the current line in the file? (i.e. if there are three modules defined in a file, this API will return the module whose body is on the specified line).
This would be a replacement for ElixirLS calling into
ElixirSense.Core.Metadata.get_env
:https://github.com/elixir-lsp/elixir-ls/blob/c9b095fc797613b33c7bc39ca72e9b48c69aedac/apps/debugger/lib/debugger/server.ex#L616
Related issue: elixir-lsp/elixir-ls#234
The text was updated successfully, but these errors were encountered: