Open scottming opened 1 month ago
I would also like organize aliases to show up if you're inside of a scope with aliases, for example
defmodule WithAliases do
alias Foo.Bar
alias Baz.Quux
|
end
I would also like organize aliases to show up if you're inside of a scope with aliases, for example
Do you have any suggestions regarding the implementation for it? It seems to conflict somewhat with the goals of this PR. @scohen
the implementation would be something like:
determine if the immediate parent is a module
Checking this is a bit cumbersome because its ancestors include these before reaching defmodule
.
{:__block__, [],
{{:__block__, [line: 1, column: 17], [:do]},
{{:__block__, [line: 1, column: 17], [:do]},
so I think maybe we could just check that both before and after the current cursor are blanks.
Checking this is a bit cumbersome because its ancestors include these before reaching
This feels like a problem that can be solved.
(also, blocks are annoying)
This feels like a problem that can be solved.
Please take a look when you have a chance. The block is really annoying, but I think the last commit has limited room for improvement.
When I'm writing functions, I occasionally need to handle unused variables, but I find that organizing aliases still returns results. This causes a lot of interference, especially when there's a bug in nvim, as pressing keys quickly can mess up my code.
We should not return the results of organizing aliases when the cursor is not on a line with an alias or when the current token is not an alias.