Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

defmodule completion: Incorrect suggested module name when file contains a period #703

Closed
zachallaun opened this issue Apr 18, 2024 · 0 comments · Fixed by #705
Closed
Assignees
Labels
bug Something isn't working

Comments

@zachallaun
Copy link
Collaborator

It's a common practice to save mix tasks "flattened" in a lib/mix/tasks directory, so a custom task called Mix.Tasks.MyLib.MyTask would live in lib/mix/tasks/my_lib.my_task.ex, instead of being nested in a my_lib directory. When suggesting a module name during a defmodule completion, however, Lexical doesn't take this into account.

# in lib/mix/tasks/my_lib.my_task.ex
defmodule|

# currently expands to
defmodule Mix.Tasks.MyLib.myTask do
  |
end

# should expand to
defmodule Mix.Tasks.MyLib.MyTask do
  |
end
@scohen scohen added the bug Something isn't working label Apr 18, 2024
@scohen scohen self-assigned this Apr 18, 2024
scohen added a commit that referenced this issue Apr 18, 2024
…705)

* Fix: Module suggestion was incorrect for files with multiple periods

Fixes #703
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants