feat: modules moved and engine moved to submodule
This commit is contained in:
parent
dfb5e645cd
commit
c33d2130cc
5136 changed files with 225275 additions and 64485 deletions
|
|
@ -28,14 +28,13 @@
|
|||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef GODOT_LSP_H
|
||||
#define GODOT_LSP_H
|
||||
#pragma once
|
||||
|
||||
#include "core/doc_data.h"
|
||||
#include "core/object/class_db.h"
|
||||
#include "core/templates/list.h"
|
||||
|
||||
namespace lsp {
|
||||
namespace LSP {
|
||||
|
||||
typedef String DocumentUri;
|
||||
|
||||
|
|
@ -384,7 +383,7 @@ struct Command {
|
|||
};
|
||||
|
||||
// Use namespace instead of enumeration to follow the LSP specifications.
|
||||
// `lsp::EnumName::EnumValue` is OK but `lsp::EnumValue` is not.
|
||||
// `LSP::EnumName::EnumValue` is OK but `LSP::EnumValue` is not.
|
||||
|
||||
namespace TextDocumentSyncKind {
|
||||
/**
|
||||
|
|
@ -861,7 +860,7 @@ struct MarkupContent {
|
|||
};
|
||||
|
||||
// Use namespace instead of enumeration to follow the LSP specifications
|
||||
// `lsp::EnumName::EnumValue` is OK but `lsp::EnumValue` is not.
|
||||
// `LSP::EnumName::EnumValue` is OK but `LSP::EnumValue` is not.
|
||||
// And here C++ compilers are unhappy with our enumeration name like `Color`, `File`, `RefCounted` etc.
|
||||
/**
|
||||
* The kind of a completion entry.
|
||||
|
|
@ -1118,7 +1117,7 @@ struct CompletionList {
|
|||
};
|
||||
|
||||
// Use namespace instead of enumeration to follow the LSP specifications
|
||||
// `lsp::EnumName::EnumValue` is OK but `lsp::EnumValue` is not
|
||||
// `LSP::EnumName::EnumValue` is OK but `LSP::EnumValue` is not
|
||||
// And here C++ compilers are unhappy with our enumeration name like `String`, `Array`, `Object` etc
|
||||
/**
|
||||
* A symbol kind.
|
||||
|
|
@ -1259,7 +1258,7 @@ struct DocumentSymbol {
|
|||
}
|
||||
|
||||
_FORCE_INLINE_ CompletionItem make_completion_item(bool resolved = false) const {
|
||||
lsp::CompletionItem item;
|
||||
LSP::CompletionItem item;
|
||||
item.label = name;
|
||||
|
||||
if (resolved) {
|
||||
|
|
@ -1267,33 +1266,33 @@ struct DocumentSymbol {
|
|||
}
|
||||
|
||||
switch (kind) {
|
||||
case lsp::SymbolKind::Enum:
|
||||
item.kind = lsp::CompletionItemKind::Enum;
|
||||
case LSP::SymbolKind::Enum:
|
||||
item.kind = LSP::CompletionItemKind::Enum;
|
||||
break;
|
||||
case lsp::SymbolKind::Class:
|
||||
item.kind = lsp::CompletionItemKind::Class;
|
||||
case LSP::SymbolKind::Class:
|
||||
item.kind = LSP::CompletionItemKind::Class;
|
||||
break;
|
||||
case lsp::SymbolKind::Property:
|
||||
item.kind = lsp::CompletionItemKind::Property;
|
||||
case LSP::SymbolKind::Property:
|
||||
item.kind = LSP::CompletionItemKind::Property;
|
||||
break;
|
||||
case lsp::SymbolKind::Method:
|
||||
case lsp::SymbolKind::Function:
|
||||
item.kind = lsp::CompletionItemKind::Method;
|
||||
case LSP::SymbolKind::Method:
|
||||
case LSP::SymbolKind::Function:
|
||||
item.kind = LSP::CompletionItemKind::Method;
|
||||
break;
|
||||
case lsp::SymbolKind::Event:
|
||||
item.kind = lsp::CompletionItemKind::Event;
|
||||
case LSP::SymbolKind::Event:
|
||||
item.kind = LSP::CompletionItemKind::Event;
|
||||
break;
|
||||
case lsp::SymbolKind::Constant:
|
||||
item.kind = lsp::CompletionItemKind::Constant;
|
||||
case LSP::SymbolKind::Constant:
|
||||
item.kind = LSP::CompletionItemKind::Constant;
|
||||
break;
|
||||
case lsp::SymbolKind::Variable:
|
||||
item.kind = lsp::CompletionItemKind::Variable;
|
||||
case LSP::SymbolKind::Variable:
|
||||
item.kind = LSP::CompletionItemKind::Variable;
|
||||
break;
|
||||
case lsp::SymbolKind::File:
|
||||
item.kind = lsp::CompletionItemKind::File;
|
||||
case LSP::SymbolKind::File:
|
||||
item.kind = LSP::CompletionItemKind::File;
|
||||
break;
|
||||
default:
|
||||
item.kind = lsp::CompletionItemKind::Text;
|
||||
item.kind = LSP::CompletionItemKind::Text;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -1753,7 +1752,7 @@ struct ServerCapabilities {
|
|||
/**
|
||||
* The server provides workspace symbol support.
|
||||
*/
|
||||
bool workspaceSymbolProvider = true;
|
||||
bool workspaceSymbolProvider = false;
|
||||
|
||||
/**
|
||||
* The server supports workspace folder.
|
||||
|
|
@ -1874,7 +1873,7 @@ struct GodotNativeClassInfo {
|
|||
const DocData::ClassDoc *class_doc = nullptr;
|
||||
const ClassDB::ClassInfo *class_info = nullptr;
|
||||
|
||||
Dictionary to_json() {
|
||||
Dictionary to_json() const {
|
||||
Dictionary dict;
|
||||
dict["name"] = name;
|
||||
dict["inherits"] = class_doc->inherits;
|
||||
|
|
@ -1889,11 +1888,11 @@ struct GodotCapabilities {
|
|||
*/
|
||||
List<GodotNativeClassInfo> native_classes;
|
||||
|
||||
Dictionary to_json() {
|
||||
Dictionary to_json() const {
|
||||
Dictionary dict;
|
||||
Array classes;
|
||||
for (List<GodotNativeClassInfo>::Element *E = native_classes.front(); E; E = E->next()) {
|
||||
classes.push_back(E->get().to_json());
|
||||
for (const GodotNativeClassInfo &native_class : native_classes) {
|
||||
classes.push_back(native_class.to_json());
|
||||
}
|
||||
dict["native_classes"] = classes;
|
||||
return dict;
|
||||
|
|
@ -1917,7 +1916,7 @@ static String marked_documentation(const String &p_bbcode) {
|
|||
in_code_block = true;
|
||||
line = "\n";
|
||||
} else if (in_code_block) {
|
||||
line = "\t" + line.substr(code_block_indent, line.length());
|
||||
line = "\t" + line.substr(code_block_indent);
|
||||
}
|
||||
|
||||
if (in_code_block && line.contains("[/codeblock]")) {
|
||||
|
|
@ -1940,8 +1939,7 @@ static String marked_documentation(const String &p_bbcode) {
|
|||
line = line.replace("[signal ", "`");
|
||||
line = line.replace("[enum ", "`");
|
||||
line = line.replace("[constant ", "`");
|
||||
line = line.replace("[", "`");
|
||||
line = line.replace("]", "`");
|
||||
line = line.replace_chars("[]", '`');
|
||||
}
|
||||
|
||||
if (!in_code_block && i < lines.size() - 1) {
|
||||
|
|
@ -1953,6 +1951,4 @@ static String marked_documentation(const String &p_bbcode) {
|
|||
}
|
||||
return markdown;
|
||||
}
|
||||
} // namespace lsp
|
||||
|
||||
#endif // GODOT_LSP_H
|
||||
} // namespace LSP
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue