elixir-lsp / elixir-lsp/elixir-ls

eex/heex file specific suggestions for if, case, cond etc.

Open
#786 1 comment 3 reactions 0 assignees View on GitHub
Dominant language
Elixir
Stars
1.8k
Forks
227
Avg merge
31m
Merged PRs (30d)
2

Description

Hey,

I have been using the atom https://github.com/elixir-editors/language-elixir package for years.
Recently I have been looking at alternative editors,and using the language server.

I noticed that in the atom package there are "context" aware snippets, while in the language server based ones there aren't.
In a .ex file you get regular if, else, case etc. and in .heex or other .eex files you get them with `<%= =>`.
From here: https://github.com/elixir-editors/language-elixir/blob/dd18b5d712044edc0a6c68fadc5aaf2ef3ed7efc/snippets/language-elixir.cson#L162

I was wondering if that is omitted here on purpose?
In every editor I tried the language server it offers the regular version in .eex files.

I looked around in the code [here](https://github.com/elixir-lsp/elixir-ls/blob/master/apps/language_server/lib/language_server/providers/completion.ex), and I see that we have special cases for `|>` for example.

Would it be possible to add the .eex variants where relevant?

Thank you

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.