You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Fix LSP SymbolKind reporting wrong types
Classes were properties, functions interfaces, etc.
(cherry picked from commit 02bc1bf355)
This commit is contained in:
committed by
Rémi Verschelde
parent
dd7bb8f965
commit
03a6fe6489
@@ -167,7 +167,7 @@ void ExtendGDScriptParser::parse_class_symbol(const GDScriptParser::ClassNode *p
|
||||
|
||||
lsp::DocumentSymbol symbol;
|
||||
symbol.name = m.identifier;
|
||||
symbol.kind = lsp::SymbolKind::Variable;
|
||||
symbol.kind = m.setter == "" && m.getter == "" ? lsp::SymbolKind::Variable : lsp::SymbolKind::Property;
|
||||
symbol.deprecated = false;
|
||||
const int line = LINE_NUMBER_TO_INDEX(m.line);
|
||||
symbol.range.start.line = line;
|
||||
@@ -294,7 +294,7 @@ void ExtendGDScriptParser::parse_function_symbol(const GDScriptParser::FunctionN
|
||||
const String uri = get_uri();
|
||||
|
||||
r_symbol.name = p_func->name;
|
||||
r_symbol.kind = lsp::SymbolKind::Function;
|
||||
r_symbol.kind = p_func->_static ? lsp::SymbolKind::Function : lsp::SymbolKind::Method;
|
||||
r_symbol.detail = "func " + p_func->name + "(";
|
||||
r_symbol.deprecated = false;
|
||||
const int line = LINE_NUMBER_TO_INDEX(p_func->line);
|
||||
|
||||
Reference in New Issue
Block a user