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

LSP is not suggesting some Kernel operators #832

Closed
krainboltgreene opened this issue Oct 11, 2024 · 3 comments · Fixed by #840
Closed

LSP is not suggesting some Kernel operators #832

krainboltgreene opened this issue Oct 11, 2024 · 3 comments · Fixed by #840

Comments

@krainboltgreene
Copy link

Screenshot 2024-10-11 at 2 28 02 PM
Screenshot 2024-10-11 at 2 28 09 PM

It looks like it only sees two operators with =?

@Moosieus
Copy link
Collaborator

Certain macros are currently ignored here:

@syntax_macros ~w(= == == === =~ .. ..// ! != !== &&)

def completion(%_callable_module{name: name}, _env)
    when name in @syntax_macros do
  :skip
end

This clause could be removed, or an exception could be made for Kernel.| like so:

def completion(%_callable_module{name: name} = callable, %Env{} = env)
    when name in @syntax_macros do
  if String.ends_with?(env.prefix, "Kernel.") do
    do_completion(callable, env)
  else
    :skip
  end
end

@krainboltgreene
Copy link
Author

That makes a ton of sense.

@scohen
Copy link
Collaborator

scohen commented Nov 20, 2024

@Moosieus PR for this?

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