-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Simplify and co-locate more completion abstractions in server #776
Conversation
51e344a
to
f5d70f9
Compare
Found this from a conversation a few months ago:
Not sure if the same applies to |
@Moosieus Hmm, I'm not sure I'm following that. |
It's the other way. The intention behind these behaviours was that we could then move things to |
While I think that's reasonable, I think that this simplification is worth doing for now for a few reasons:
|
Yes, i'm generally on board with this simplification, just giving you the context. |
f5d70f9
to
0333c7d
Compare
This PR attempts to make completion code easier to understand and work on.
Previously, code that explicitly referred to completions lived in common, server, and remote_control; after this PR, it all lives in server and remote_control. Because server can refer to protocol types, I was also able to dramatically simplify the types/specs used in the builder.
Additionally, two behaviours have been removed in favor of referring to their implementations directly:
Lexical.Ast.Environment
(which was only implemented byLexical.Ast.Env
), andLexical.Completion.Builder
(which was only implemented byLexical.Server.CodeIntelligence.Completion.Builder
). Removing some of this indirection also allowed Dialyzer to catch a few bugs in the types that lived inLexical.Ast.Environment
(nowLexical.Ast.Env
).