Zen-C
Loading...
Searching...
No Matches
lsp_project.h
Go to the documentation of this file.
1#ifndef LSP_PROJECT_H
2#define LSP_PROJECT_H
3
4#include "parser.h"
5#include "lsp_index.h"
6
10typedef struct ProjectFile
11{
12 char *path;
13 char *uri;
14 char *source;
19
23typedef struct
24{
30
32 char *root_path;
34
35// Global project instance
36extern LSPProject *g_project;
37
38// Initialize the project with a root directory
39void lsp_project_init(const char *root_path);
40
41// Find a file in the project
43
44// Update a file (re-parse and re-index)
45void lsp_project_update_file(const char *uri, const char *src);
46
47// Find definition globally
48typedef struct
49{
50 char *uri;
53
55
62
64
65// Semantic Tokens
66char *lsp_semantic_tokens_full(const char *uri);
67
68#endif
const char *const name
Definition cJSON.h:307
LSPProject * g_project
Definition lsp_project.c:8
void lsp_project_update_file(const char *uri, const char *src)
Definition lsp_project.c:145
DefinitionResult lsp_project_find_definition(const char *name)
Definition lsp_project.c:188
ReferenceResult * lsp_project_find_references(const char *name)
Definition lsp_project.c:242
void lsp_project_init(const char *root_path)
Definition lsp_project.c:12
char * lsp_semantic_tokens_full(const char *uri)
Definition lsp_semantic.c:305
ProjectFile * lsp_project_get_file(const char *uri)
Definition lsp_project.c:108
Definition ast.h:187
Definition lsp_project.h:49
char * uri
Definition lsp_project.h:50
LSPRange * range
Definition lsp_project.h:51
Index of a single file.
Definition lsp_index.h:37
Global state for the Language Server Project.
Definition lsp_project.h:24
ParserContext * ctx
Global shared parser context. Contains global registries (structs, functions) reused across files.
Definition lsp_project.h:29
ProjectFile * files
List of tracked open files.
Definition lsp_project.h:31
char * root_path
Project root directory.
Definition lsp_project.h:32
A range in the source code mapping to semantic info.
Definition lsp_index.h:20
Global compilation state and symbol table.
Definition parser.h:275
Represents a tracked file in the LSP project.
Definition lsp_project.h:11
ASTNode * ast
Cached AST for semantic analysis.
Definition lsp_project.h:15
char * source
Cached source content (in-memory).
Definition lsp_project.h:14
char * path
Absolute file path.
Definition lsp_project.h:12
LSPIndex * index
File-specific symbol index.
Definition lsp_project.h:16
char * uri
file:// URI.
Definition lsp_project.h:13
struct ProjectFile * next
Definition lsp_project.h:17
Definition lsp_project.h:57
LSPRange * range
Definition lsp_project.h:59
char * uri
Definition lsp_project.h:58
struct ReferenceResult * next
Definition lsp_project.h:60