ISSUE DESCRIPTION LSP doesn't provide completion for interfaces Lisette version: 0.2.11…
- User
ISSUE DESCRIPTION
LSP doesn't provide completion for interfaces Lisette version: 0.2.11 IDE: VSCode and Zed
The LSP isn't providing completions for interfaces from either stdlib or user-defined.
codeinterface Example { fn example(self, name: string) -> string } fn example_call(ex: Example) -> string { ex. }Interface
No new interfaces are introduced.
ADDITIONAL ADVICE
Since you are given a git repository, you can use git commands to simplify your work. For example, if you made a mistake and want to revert your changes, you can use
git checkout <file>to restore the file to its original state. You can also reset all changes in the repository usinggit reset --hardcommand. Additionally, you can usegit stashandgit stash popto temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you callsubmit) usinggit statusorgit diffcommands. However you don't need to usegit addorgit commitbefore submitting your changes. In fact,submitonly submits currently unstaged changes because it usesgit diffto get the changes that need to be submitted.CHECKLIST
Before submitting your solution, please go over the following checklist and make sure you've done everything:
- If an error was reported in the issue description, I have successfully reproduced it.
- If an error was reported in the issue description, I have confirmed that my fix resolves the error.
- I have thought about edge cases and made sure my fix handles them as well.
- I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass. I want you to list every bullet from this checklist and write your reasoning for why you think you did it or didn't need to.
Repository has been uploaded and your shell is currently at the repository root. Time to solve the issue!
(Current directory: /lisette, current file: none) bash-$
- Assistant
I'll start by exploring the repository structure and understanding how completions work for interfaces.
- Assistant
Let me look at the LSP crate and completion-related code.
- Assistant
rg is not found, let me use grep instead.
- Assistant
Let me look at the completion.rs file in the LSP crate.
- Assistant
Let me read the rest of the completion file.
- Assistant
Let me continue reading the get_instance_completions function.
- Assistant
Let me examine how interfaces and their methods are registered.
- Assistant
Let me inspect type_name and how interface types are resolved during completion.
- Assistant
Let me look at type_name in analysis.rs and completion-related tests.
- Assistant
Let me examine method registration and is_instance_method more closely.
- Assistant
The issue appears to be that interface methods strip the
selfreceiver, sois_instance_methodrejects them. Let me verify and check store helpers. - Assistant
Let me check the snapshot API and how methods are stored on Interface.
- Assistant
Let me look at more of snapshot and definitions API, and also the program::Interface structure.
- Assistant
Let me find the program module.
- Assistant
Let me read that file.
- Assistant
Checking how struct methods are registered versus interface methods.
- Assistant
Let me check how trailing-dot completion is handled in tests and parsing.
- Assistant
Let me look at how empty member is handled in parse_field_access
- Assistant
Let me also check the changelog and hover for interfaces for compared patterns.
- Assistant
Let me check Type helpers and whether method_ty Display is usable.
- Assistant
Let me check how receiver type appears in method type detail for structures.
- Assistant
I've confirmed the root cause: interface methods strip the
selfreceiver, sois_instance_methodrejects them. Implementing the fix. - Assistant
Let me implement the fix for get_instance_completions.
- Assistant
Let me verify with_receiver_placeholder and whether interface methods are always functions.
- Assistant
I'll write a quick temporary test to verify the fix.
- Assistant
I'll compile the LSP crate and run a temporary verification script.
- Assistant
Creating a temporary test to reproduce and verify the interface completion fix.
- Assistant
I'll append a temporary test, run it, then remove it.
- Assistant
User-defined interfaces work. Investigating parent embedding and stdlib interfaces next.
- Assistant
Let me look at Error in prelude and embedding parents representation.
- Assistant
Let me debug parent type qualified IDs and error interface naming.
- Assistant
Inspecting interface parent embedding syntax and type conversion.
- Assistant
Looking at docs and interface parse for embedding syntax.
- Assistant
Updating temporary tests for correct syntax and the stdlib
errorinterface. - Assistant
Let me remove temp tests and re-add corrected ones.
- Assistant
User-defined and prelude work. Investigating why Go stdlib interfaces return empty completions.
- Assistant
Let me check the Writer interface and whether imports work in the LSP test.
- Assistant
Updating the stdlib Go test with the correct import path.
- Assistant
Let me replace just the go test.
- Assistant
Verifying fallback for trailing incomplete dots and type aliases.
- Assistant
Checking completions for lazy type parameters with interface bounds — a common edge case.
- Assistant
Checking how type parameters with bounds are represented in types.
- Assistant
Removing temporary tests and running existing completion tests.
- Assistant
Confirming temp tests are fully removed and reviewing the final patch.
- Assistant
Restoring the tests file to drop the accidental blank line.
- Assistant
Running rustfmt and a final verification.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.