✨ feat(lsp_completion): complete object creation and members
- Add class-name completion for `new` and `createobject("..."`.
- Generate constructor parameter snippets in completionItem/resolve.
- Support `obj.` instance member completion (methods/properties/fields).
- Infer `new`/`createobject` result types in SemanticModel TypeSystem.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
module;
|
||||
|
||||
|
||||
export module lsp.manager.symbol;
|
||||
import tree_sitter;
|
||||
import spdlog;
|
||||
@@ -497,6 +496,11 @@ namespace lsp::manager
|
||||
|
||||
analysis.semantic_model = std::make_unique<language::semantic::SemanticModel>(*analysis.symbol_table);
|
||||
|
||||
{
|
||||
language::semantic::Analyzer analyzer(*analysis.symbol_table, *analysis.semantic_model);
|
||||
analyzer.Analyze(*analysis.ast);
|
||||
}
|
||||
|
||||
{
|
||||
std::unique_lock<std::shared_mutex> lock(mutex_);
|
||||
editing_symbols_[event.item.uri] = std::move(analysis);
|
||||
|
||||
Reference in New Issue
Block a user