elixir_sense icon indicating copy to clipboard operation
elixir_sense copied to clipboard

Get the module for the current line of a file

Open axelson opened this issue 5 years ago • 0 comments

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: https://github.com/elixir-lsp/elixir-ls/issues/234

axelson avatar May 11 '20 06:05 axelson