mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 08:23:29 +00:00
Fix LSP SymbolKind reporting wrong types
Classes were properties, functions interfaces, etc.
This commit is contained in:
parent
6d58ea6ce7
commit
02bc1bf355
2 changed files with 28 additions and 28 deletions
|
@ -163,7 +163,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;
|
||||
|
@ -289,7 +289,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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue