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

Better support for .eex files ~E and ~L #25

Closed
msaraiva opened this issue Aug 7, 2019 · 6 comments
Closed

Better support for .eex files ~E and ~L #25

msaraiva opened this issue Aug 7, 2019 · 6 comments

Comments

@msaraiva
Copy link
Collaborator

msaraiva commented Aug 7, 2019

It seems that the following doesn't work when in a .eex files, ~E or ~L:

  • SIgnature
  • Docs
  • Suggestions for variables defined inside the template
@msaraiva msaraiva mentioned this issue Aug 7, 2019
@kenny-evitt
Copy link

I'm using ElixirSense via alchemist.vim and I opened an issue on its GitHub project related to this:

... but I didn't think it was possible, or feasible, given that the context in which an .eex template file is evaluated doesn't seem to be closely coupled to the file.

But I'm glad I seem to have been wrong!

@msaraiva
Copy link
Collaborator Author

msaraiva commented Sep 5, 2019

@kenny-evitt regarding ~E and ~L it's totally doable. However, you're right about .eex files. They can be "injected" in any file. Maybe, the best we could do would be to try to find the related view based on the folder/name of the template. But then it would not work when the developer does not follow the convention.

@axelson @lukaszsamson WDYT?

@kenny-evitt
Copy link

@msaraiva Maybe, for .eex files, the commands, or new similar commands, could accept both a line and column in the .eex file and a line and column in the relevant 'view' module file. The new commands could be named EexDoc and EexDef.

@axelson
Copy link
Member

axelson commented Sep 6, 2019

Yeah for plain ~E and ~L I think that they could be used in multiple contexts so it's impossible to know how it's going to be used. I do like what @kenny-evitt suggested, that seems like a practical compromise which will help in the majority of cases.

@lukaszsamson
Copy link
Collaborator

SIgnature and docs definitely work in (h)eex

@lukaszsamson
Copy link
Collaborator

Vars in templates tracked in elixir-lsp/vscode-elixir-ls#279

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants