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.
interface 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 to understand the codebase and locate the LSP completion logic related to interfaces.
- Assistant
Let me explore the LSP crate and semantics related to completions and interfaces.
- Assistant
rg is not available, I'll use grep instead.
- Assistant
Let me examine the completion logic and existing LSP tests.
- Assistant
Let me read the rest of the completion.rs file.
- Assistant
Continue reading the rest.
- Assistant
Let me read the end of the file and search tests for interface completions.
- Assistant
Let me inspect how interface methods are registered and look at related completion tests.
- Assistant
Let me examine how interface methods are registered and how definitions store them.
- Assistant
Let me check how interface method receiver types are represented and how type_name works.
- Assistant
The bare
selfis stripped on interface methods — that explains whyis_instance_methodfails. Let me inspect the Interface structure and definition helpers. - Assistant
Let me read the rest of definition.rs
- Assistant
Let me examine existing completion tests and how hover/definition handle interfaces.
- Assistant
Let me look at how the store collects interface methods and how hover handles method completion-like lookups.
- Assistant
There's existing store logic for collecting interface methods — I'll inspect that next.
- Assistant
There's already
get_all_methodson the store. Let me check if the LSP snapshot exposes it. - Assistant
Let me continue reading snapshot.rs and SemanticResult to see if store is accessible.
- Assistant
Let me check how
Selfis typed in interface methods and whether method types are usable for completion detail. - Assistant
Let me check
with_receiver_placeholderand how completions are invoked in lib.rs. - Assistant
Let me read the completion handler in lib.rs and types.rs for with_receiver_placeholder.
- Assistant
Let me look at CHANGELOG for any similar bugs or expected behavior, and also at get_own_methods / methods map for structs - maybe they're also redundant with Value defs.
- Assistant
Looking more carefully at is_instance_method again for interface methods:
- Assistant
I'll reproduce the issue with the LSP test harness, then implement the fix.
- Assistant
I'll write a temporary reproduction program using the LSP APIs, then run it.
- Assistant
I'll add a temporary reproduction test, run it to confirm the bug, then fix the completion logic.
- Assistant
I'll register the temporary test and run it to reproduce the issue.
- Assistant
The edit corrupted Cargo.toml — fixing it now.
- Assistant
detect_dot_context failed on incomplete
ex.— checking the fallback path used for incomplete dots. - Assistant
Checking how line positions map to offsets.
- Assistant
The test used the wrong cursor position. I'll fix the repro and implement interface method completions.
- Assistant
That test file got corrupted — rewriting it cleanly.
- Assistant
Reproducing again, then implementing the fix in
get_instance_completions. - Assistant
Let me compare against a known-passing completion test and debug positions.
- Assistant
Inspecting the parameter-dot completion test and how param types are resolved.
- Assistant
I'll rewrite the repro to match the working parameter-dot test structure.
Theedi issue might be how
find_expression_attreats interface receiver types. - Assistant
Cursor was on the dot, not after it. Fixing the position and re-running.
- Assistant
Writing the repro file cleanly with a simple approach.
- Assistant
Typo Tail vs tail. File looks good now.
- Assistant
Empty completions confirm the bug. Updating
get_instance_completionsto include interface methods (including parents). - Assistant
Fixing the borrow issue by collecting methods before recursing into parents.
- Assistant
The last edit corrupted the file. I'll rewrite
completion.rscarefully. - Assistant
I'll apply the fix with a careful Python edit.
- Assistant
Running the reproduction tests to verify the fix.
- Assistant
Basic interface works. Checking how parent interfaces are stored and resolved.
- Assistant
Checking interface embedding syntax in the language.
- Assistant
Let me read the embedding syntax from docs
- Assistant
The embedding syntax was wrong in the test. Fixing it and re-running.
- Assistant
Fixing the line number in the embedded interface test.
- Assistant
Both tests pass. Running existing completion tests and checking type aliases to interfaces.
- Assistant
Adding cycle protection for parent interface recursion, then verifying with a temporary test.
- Assistant
Let me extract the exact function and replace comprehensively.
- Assistant
Cleaning up temporary tests and verifying the final diff.
- Assistant
Formatting the change and doing a final compile check.
- Assistant
Compilation succeeded. Verifying the formatted result.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.5-35B-A3BCompare side by side →
Qwen/Qwen3.5-35B-A3BCompare side by side →