A frontend-independent IDE "smartness" server for Elixir. Implements the "Language Server Protocol" standard and provides debugger support via the "Debug Adapter Protocol"
When doing go-to definition/references for modules, I get inconsistent behavior based on the syntax the module is being used in and whether my cursor is on the last character of the module name.
defmodule Test do
def test, do: nil
end
defmodule OtherModule do
def test do
# Module name (all characters working)
Test
# Remote call (last character references function instead of module)
Test.test()
# Remote capture (last character references function instead of module)
_ = &Test.test/0
# Module name in list
[
# Comma after (last character not working)
Test,
# Space after (all characters working)
Test ,
# Nothing after (all characters working)
Test
]
# Module name in arguments (last character not working)
List.wrap(Test)
end
end
It's worth noting that this is different from https://github.com/elixir-lsp/elixir-ls/issues/1038. I'm using Elixir 1.15, and function go-to/references are working properly when the cursor is at the end of the symbol.
Expected behavior
I expect the behavior of go-to definition/references to be the same regardless of where the cursor is positioned in all of the examples shown.
Environment
Current behavior
When doing go-to definition/references for modules, I get inconsistent behavior based on the syntax the module is being used in and whether my cursor is on the last character of the module name.
Here's a video demonstrating the inconsistencies:
https://github.com/elixir-lsp/elixir-ls/assets/6618434/09aa1327-d5dd-4959-ae72-eae09feb09bd
And here's the code used in the video:
It's worth noting that this is different from https://github.com/elixir-lsp/elixir-ls/issues/1038. I'm using Elixir 1.15, and function go-to/references are working properly when the cursor is at the end of the symbol.
Expected behavior
I expect the behavior of go-to definition/references to be the same regardless of where the cursor is positioned in all of the examples shown.