|
Luma 0.1.0
A low-level compiled alternative to C, C++, and more!
|
Language Server Protocol implementation for Luma language. More...
#include "../c_libs/memory/memory.h"#include "../lexer/lexer.h"#include "../parser/parser.h"#include "../typechecker/type.h"#include <stdbool.h>#include <stddef.h>

Go to the source code of this file.
Classes | |
| struct | LSPPosition |
| struct | LSPRange |
| struct | LSPLocation |
| struct | LSPDiagnostic |
| struct | LSPDocumentSymbol |
| struct | LSPParameterInfo |
| struct | LSPSignatureInfo |
| struct | LPSignatureHelp |
| struct | LSPCodeAction |
| struct | LSPDocumentHighlight |
| struct | LSPCompletionItem |
| struct | ImportedModule |
| struct | ModuleRegistryEntry |
| struct | ModuleRegistry |
| struct | ModuleInfo |
| struct | LSPDocument |
| struct | ModuleASTCacheEntry |
| struct | LSPServer |
Macros | |
| #define | MODULE_AST_CACHE_MAX 128 |
Typedefs | |
| typedef struct LSPDocumentSymbol | LSPDocumentSymbol |
Functions | |
| bool | lsp_server_init (LSPServer *server, ArenaAllocator *arena) |
| void | lsp_server_run (LSPServer *server) |
| void | lsp_server_shutdown (LSPServer *server) |
| void | lsp_handle_message (LSPServer *server, const char *message) |
| LSPDocument * | lsp_document_open (LSPServer *server, const char *uri, const char *content, int version) |
| bool | lsp_document_update (LSPServer *server, const char *uri, const char *content, int version) |
| bool | lsp_document_close (LSPServer *server, const char *uri) |
| LSPDocument * | lsp_document_find (LSPServer *server, const char *uri) |
| bool | lsp_document_analyze (LSPDocument *doc, LSPServer *server, BuildConfig *config) |
| void | scan_std_library (LSPServer *server) |
| void | extract_imports (LSPDocument *doc, ArenaAllocator *arena) |
| void | resolve_imports (LSPServer *server, LSPDocument *doc, BuildConfig *config, GrowableArray *imported_modules) |
| void | build_module_registry (LSPServer *server, const char *workspace_uri) |
| const char * | lookup_module (LSPServer *server, const char *module_name) |
| AstNode * | parse_imported_module_ast (LSPServer *server, const char *module_uri, BuildConfig *config, ArenaAllocator *arena) |
| void | lsp_ast_cache_init (LSPServer *server) |
| void | lsp_ast_cache_invalidate (LSPServer *server, const char *uri) |
| void | lsp_negative_cache_clear (void) |
| void | lsp_check_pending_analysis (LSPServer *server) |
| const char * | lsp_hover (LSPDocument *doc, LSPPosition position, ArenaAllocator *arena) |
| LSPLocation * | lsp_definition (LSPDocument *doc, LSPServer *server, LSPPosition position, ArenaAllocator *arena) |
| LSPCompletionItem * | lsp_completion (LSPDocument *doc, LSPPosition position, size_t *completion_count, ArenaAllocator *arena) |
| LSPCompletionItem * | lsp_completion_resolve (LSPCompletionItem *item, ArenaAllocator *arena) |
| LSPSignatureInfo * | lsp_signature_help (LSPDocument *doc, LSPPosition position, size_t *signature_count, ArenaAllocator *arena) |
| LSPCodeAction * | lsp_code_action (LSPDocument *doc, LSPPosition position, size_t *action_count, ArenaAllocator *arena) |
| LSPDocumentHighlight * | lsp_document_highlight (LSPDocument *doc, LSPPosition position, size_t *highlight_count, ArenaAllocator *arena) |
| const char * | lsp_rename (LSPDocument *doc, LSPPosition position, const char *new_name, ArenaAllocator *arena) |
| LSPDocumentSymbol ** | lsp_document_symbols (LSPDocument *doc, size_t *symbol_count, ArenaAllocator *arena) |
| LSPDiagnostic * | lsp_diagnostics (LSPDocument *doc, size_t *diagnostic_count, ArenaAllocator *arena) |
| LSPDiagnostic * | convert_errors_to_diagnostics (size_t *diagnostic_count, ArenaAllocator *arena) |
| LSPMethod | lsp_parse_method (const char *json) |
| void | lsp_send_response (int id, const char *result) |
| void | lsp_send_request (const char *method, const char *params) |
| void | lsp_send_notification (const char *method, const char *params) |
| void | lsp_send_error (int id, int code, const char *message) |
| char * | extract_string (const char *json, const char *key, ArenaAllocator *arena) |
| int | extract_int (const char *json, const char *key) |
| LSPPosition | extract_position (const char *json) |
| size_t | json_escape (char *dst, size_t dst_size, const char *src) |
| void | serialize_diagnostics_to_json (const char *uri, LSPDiagnostic *diagnostics, size_t diag_count, char *output, size_t output_size) |
| void | serialize_completion_items (LSPCompletionItem *items, size_t count, char *output, size_t output_size) |
| void | serialize_signature_help (LSPSignatureInfo *sig, char *output, size_t output_size) |
| void | serialize_code_actions (LSPCodeAction *actions, size_t count, char *output, size_t output_size) |
| void | serialize_document_highlights (LSPDocumentHighlight *highlights, size_t count, char *output, size_t output_size) |
| const char * | serialize_rename_result (const char *edit_json, ArenaAllocator *arena) |
| const char * | lsp_uri_to_path (const char *uri, ArenaAllocator *arena) |
| const char * | lsp_path_to_uri (const char *path, ArenaAllocator *arena) |
| Token * | lsp_token_at_position (LSPDocument *doc, LSPPosition position) |
| AstNode * | lsp_node_at_position (LSPDocument *doc, LSPPosition position) |
| Symbol * | lsp_symbol_at_position (LSPDocument *doc, LSPPosition position) |
| char * | lsp_semantic_tokens_full (LSPDocument *doc, ArenaAllocator *arena) |
| const char * | lsp_semantic_tokens_capabilities (void) |
Language Server Protocol implementation for Luma language.
| #define MODULE_AST_CACHE_MAX 128 |
| typedef struct LSPDocumentSymbol LSPDocumentSymbol |
| enum LSPInsertTextFormat |
| enum LSPMessageType |
| enum LSPMethod |
| enum LSPSymbolKind |
| void build_module_registry | ( | LSPServer * | server, |
| const char * | workspace_uri | ||
| ) |
| LSPDiagnostic * convert_errors_to_diagnostics | ( | size_t * | diagnostic_count, |
| ArenaAllocator * | arena | ||
| ) |
| void extract_imports | ( | LSPDocument * | doc, |
| ArenaAllocator * | arena | ||
| ) |
| int extract_int | ( | const char * | json, |
| const char * | key | ||
| ) |
| LSPPosition extract_position | ( | const char * | json | ) |
| char * extract_string | ( | const char * | json, |
| const char * | key, | ||
| ArenaAllocator * | arena | ||
| ) |
| size_t json_escape | ( | char * | dst, |
| size_t | dst_size, | ||
| const char * | src | ||
| ) |
| const char * lookup_module | ( | LSPServer * | server, |
| const char * | module_name | ||
| ) |
| void lsp_ast_cache_init | ( | LSPServer * | server | ) |
| void lsp_ast_cache_invalidate | ( | LSPServer * | server, |
| const char * | uri | ||
| ) |
| void lsp_check_pending_analysis | ( | LSPServer * | server | ) |
| LSPCodeAction * lsp_code_action | ( | LSPDocument * | doc, |
| LSPPosition | position, | ||
| size_t * | action_count, | ||
| ArenaAllocator * | arena | ||
| ) |
| LSPCompletionItem * lsp_completion | ( | LSPDocument * | doc, |
| LSPPosition | position, | ||
| size_t * | completion_count, | ||
| ArenaAllocator * | arena | ||
| ) |
| LSPCompletionItem * lsp_completion_resolve | ( | LSPCompletionItem * | item, |
| ArenaAllocator * | arena | ||
| ) |
| LSPLocation * lsp_definition | ( | LSPDocument * | doc, |
| LSPServer * | server, | ||
| LSPPosition | position, | ||
| ArenaAllocator * | arena | ||
| ) |
| LSPDiagnostic * lsp_diagnostics | ( | LSPDocument * | doc, |
| size_t * | diagnostic_count, | ||
| ArenaAllocator * | arena | ||
| ) |
| bool lsp_document_analyze | ( | LSPDocument * | doc, |
| LSPServer * | server, | ||
| BuildConfig * | config | ||
| ) |
| bool lsp_document_close | ( | LSPServer * | server, |
| const char * | uri | ||
| ) |
| LSPDocument * lsp_document_find | ( | LSPServer * | server, |
| const char * | uri | ||
| ) |
| LSPDocumentHighlight * lsp_document_highlight | ( | LSPDocument * | doc, |
| LSPPosition | position, | ||
| size_t * | highlight_count, | ||
| ArenaAllocator * | arena | ||
| ) |
| LSPDocument * lsp_document_open | ( | LSPServer * | server, |
| const char * | uri, | ||
| const char * | content, | ||
| int | version | ||
| ) |
| LSPDocumentSymbol ** lsp_document_symbols | ( | LSPDocument * | doc, |
| size_t * | symbol_count, | ||
| ArenaAllocator * | arena | ||
| ) |
| bool lsp_document_update | ( | LSPServer * | server, |
| const char * | uri, | ||
| const char * | content, | ||
| int | version | ||
| ) |
| void lsp_handle_message | ( | LSPServer * | server, |
| const char * | message | ||
| ) |
| const char * lsp_hover | ( | LSPDocument * | doc, |
| LSPPosition | position, | ||
| ArenaAllocator * | arena | ||
| ) |
| void lsp_negative_cache_clear | ( | void | ) |
| AstNode * lsp_node_at_position | ( | LSPDocument * | doc, |
| LSPPosition | position | ||
| ) |
| LSPMethod lsp_parse_method | ( | const char * | json | ) |
| const char * lsp_path_to_uri | ( | const char * | path, |
| ArenaAllocator * | arena | ||
| ) |
| const char * lsp_rename | ( | LSPDocument * | doc, |
| LSPPosition | position, | ||
| const char * | new_name, | ||
| ArenaAllocator * | arena | ||
| ) |
| const char * lsp_semantic_tokens_capabilities | ( | void | ) |
| char * lsp_semantic_tokens_full | ( | LSPDocument * | doc, |
| ArenaAllocator * | arena | ||
| ) |
| void lsp_send_error | ( | int | id, |
| int | code, | ||
| const char * | message | ||
| ) |
| void lsp_send_notification | ( | const char * | method, |
| const char * | params | ||
| ) |
| void lsp_send_request | ( | const char * | method, |
| const char * | params | ||
| ) |
| void lsp_send_response | ( | int | id, |
| const char * | result | ||
| ) |
| bool lsp_server_init | ( | LSPServer * | server, |
| ArenaAllocator * | arena | ||
| ) |
| void lsp_server_run | ( | LSPServer * | server | ) |
| void lsp_server_shutdown | ( | LSPServer * | server | ) |
| LSPSignatureInfo * lsp_signature_help | ( | LSPDocument * | doc, |
| LSPPosition | position, | ||
| size_t * | signature_count, | ||
| ArenaAllocator * | arena | ||
| ) |
| Symbol * lsp_symbol_at_position | ( | LSPDocument * | doc, |
| LSPPosition | position | ||
| ) |
| Token * lsp_token_at_position | ( | LSPDocument * | doc, |
| LSPPosition | position | ||
| ) |
| const char * lsp_uri_to_path | ( | const char * | uri, |
| ArenaAllocator * | arena | ||
| ) |
| AstNode * parse_imported_module_ast | ( | LSPServer * | server, |
| const char * | module_uri, | ||
| BuildConfig * | config, | ||
| ArenaAllocator * | arena | ||
| ) |
| void resolve_imports | ( | LSPServer * | server, |
| LSPDocument * | doc, | ||
| BuildConfig * | config, | ||
| GrowableArray * | imported_modules | ||
| ) |
| void scan_std_library | ( | LSPServer * | server | ) |
| void serialize_code_actions | ( | LSPCodeAction * | actions, |
| size_t | count, | ||
| char * | output, | ||
| size_t | output_size | ||
| ) |
| void serialize_completion_items | ( | LSPCompletionItem * | items, |
| size_t | count, | ||
| char * | output, | ||
| size_t | output_size | ||
| ) |
| void serialize_diagnostics_to_json | ( | const char * | uri, |
| LSPDiagnostic * | diagnostics, | ||
| size_t | diag_count, | ||
| char * | output, | ||
| size_t | output_size | ||
| ) |
| void serialize_document_highlights | ( | LSPDocumentHighlight * | highlights, |
| size_t | count, | ||
| char * | output, | ||
| size_t | output_size | ||
| ) |
| const char * serialize_rename_result | ( | const char * | edit_json, |
| ArenaAllocator * | arena | ||
| ) |
| void serialize_signature_help | ( | LSPSignatureInfo * | sig, |
| char * | output, | ||
| size_t | output_size | ||
| ) |