fix imports to use ./
for relative usage
This commit is contained in:
parent
6b3d4d7bd3
commit
f482950f5f
@ -1,11 +1,11 @@
|
||||
const std = @import("std");
|
||||
const DocumentStore = @import("document_store.zig");
|
||||
const DocumentStore = @import("./document_store.zig");
|
||||
const ast = std.zig.Ast;
|
||||
const types = @import("types.zig");
|
||||
const offsets = @import("offsets.zig");
|
||||
const types = @import("./types.zig");
|
||||
const offsets = @import("./offsets.zig");
|
||||
const log = std.log.scoped(.analysis);
|
||||
const Analysis = @This();
|
||||
usingnamespace @import("ast.zig");
|
||||
usingnamespace @import("./ast.zig");
|
||||
|
||||
var using_trail: std.ArrayList([*]const u8) = undefined;
|
||||
var resolve_trail: std.ArrayList(NodeWithHandle) = undefined;
|
||||
@ -1516,7 +1516,7 @@ fn tokenRangeAppend(prev: SourceRange, token: std.zig.Token) SourceRange {
|
||||
};
|
||||
}
|
||||
|
||||
const DocumentPosition = @import("offsets.zig").DocumentPosition;
|
||||
const DocumentPosition = offsets.DocumentPosition;
|
||||
|
||||
pub fn documentPositionContext(
|
||||
arena: *std.heap.ArenaAllocator,
|
||||
|
@ -1,11 +1,11 @@
|
||||
const std = @import("std");
|
||||
const types = @import("types.zig");
|
||||
const URI = @import("uri.zig");
|
||||
const analysis = @import("analysis.zig");
|
||||
const offsets = @import("offsets.zig");
|
||||
const types = @import("./types.zig");
|
||||
const URI = @import("./uri.zig");
|
||||
const analysis = @import("./analysis.zig");
|
||||
const offsets = @import("./offsets.zig");
|
||||
const log = std.log.scoped(.doc_store);
|
||||
const Tree = std.zig.Ast;
|
||||
const BuildAssociatedConfig = @import("build_associated_config.zig");
|
||||
const BuildAssociatedConfig = @import("./build_associated_config.zig");
|
||||
|
||||
const DocumentStore = @This();
|
||||
|
||||
|
32
src/main.zig
32
src/main.zig
@ -1,18 +1,18 @@
|
||||
const std = @import("std");
|
||||
const build_options = @import("build_options");
|
||||
|
||||
const Config = @import("config.zig");
|
||||
const DocumentStore = @import("document_store.zig");
|
||||
const readRequestHeader = @import("header.zig").readRequestHeader;
|
||||
const requests = @import("requests.zig");
|
||||
const types = @import("types.zig");
|
||||
const analysis = @import("analysis.zig");
|
||||
const URI = @import("uri.zig");
|
||||
const references = @import("references.zig");
|
||||
const rename = @import("rename.zig");
|
||||
const offsets = @import("offsets.zig");
|
||||
const setup = @import("setup.zig");
|
||||
const semantic_tokens = @import("semantic_tokens.zig");
|
||||
const Config = @import("./config.zig");
|
||||
const DocumentStore = @import("./document_store.zig");
|
||||
const readRequestHeader = @import("./header.zig").readRequestHeader;
|
||||
const requests = @import("./requests.zig");
|
||||
const types = @import("./types.zig");
|
||||
const analysis = @import("./analysis.zig");
|
||||
const URI = @import("./uri.zig");
|
||||
const references = @import("./references.zig");
|
||||
const rename = @import("./rename.zig");
|
||||
const offsets = @import("./offsets.zig");
|
||||
const setup = @import("./setup.zig");
|
||||
const semantic_tokens = @import("./semantic_tokens.zig");
|
||||
const ast = std.zig.Ast;
|
||||
const known_folders = @import("known-folders");
|
||||
const data = blk: {
|
||||
@ -294,13 +294,7 @@ fn publishDiagnostics(arena: *std.heap.ArenaAllocator, handle: DocumentStore.Han
|
||||
});
|
||||
}
|
||||
|
||||
fn typeToCompletion(
|
||||
arena: *std.heap.ArenaAllocator,
|
||||
list: *std.ArrayList(types.CompletionItem),
|
||||
field_access: analysis.FieldAccessReturn,
|
||||
orig_handle: *DocumentStore.Handle,
|
||||
config: Config,
|
||||
) error{OutOfMemory}!void {
|
||||
fn typeToCompletion(arena: *std.heap.ArenaAllocator, list: *std.ArrayList(types.CompletionItem), field_access: analysis.FieldAccessReturn, orig_handle: *DocumentStore.Handle, config: Config) error{OutOfMemory}!void {
|
||||
const type_handle = field_access.original;
|
||||
switch (type_handle.type.data) {
|
||||
.slice => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
const std = @import("std");
|
||||
const types = @import("types.zig");
|
||||
const types = @import("./types.zig");
|
||||
const ast = std.zig.Ast;
|
||||
const Tree = ast;
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
const std = @import("std");
|
||||
const DocumentStore = @import("document_store.zig");
|
||||
const analysis = @import("analysis.zig");
|
||||
const types = @import("types.zig");
|
||||
const offsets = @import("offsets.zig");
|
||||
const DocumentStore = @import("./document_store.zig");
|
||||
const analysis = @import("./analysis.zig");
|
||||
const types = @import("./types.zig");
|
||||
const offsets = @import("./offsets.zig");
|
||||
const log = std.log.scoped(.references);
|
||||
const Reference = @This();
|
||||
usingnamespace @import("ast.zig");
|
||||
usingnamespace @import("./ast.zig");
|
||||
|
||||
const ast = std.zig.Ast;
|
||||
|
||||
|
@ -1,11 +1,9 @@
|
||||
const std = @import("std");
|
||||
const DocumentStore = @import("document_store.zig");
|
||||
const analysis = @import("analysis.zig");
|
||||
const references = @import("references.zig");
|
||||
const types = @import("types.zig");
|
||||
const offsets = @import("offsets.zig");
|
||||
|
||||
const ast = std.zig.ast;
|
||||
const DocumentStore = @import("./document_store.zig");
|
||||
const analysis = @import("./analysis.zig");
|
||||
const references = @import("./references.zig");
|
||||
const types = @import("./types.zig");
|
||||
const offsets = @import("./offsets.zig");
|
||||
|
||||
// TODO Use a map to array lists and collect at the end instead?
|
||||
const RefHandlerContext = struct {
|
||||
|
@ -3,7 +3,7 @@
|
||||
//! We only define what we actually use.
|
||||
|
||||
const std = @import("std");
|
||||
const types = @import("types.zig");
|
||||
const types = @import("./types.zig");
|
||||
|
||||
/// Only check for the field's existence.
|
||||
const Exists = struct {
|
||||
|
@ -1,11 +1,11 @@
|
||||
const std = @import("std");
|
||||
const offsets = @import("offsets.zig");
|
||||
const DocumentStore = @import("document_store.zig");
|
||||
const analysis = @import("analysis.zig");
|
||||
const offsets = @import("./offsets.zig");
|
||||
const DocumentStore = @import("./document_store.zig");
|
||||
const analysis = @import("./analysis.zig");
|
||||
const ast = std.zig.Ast;
|
||||
const log = std.log.scoped(.semantic_tokens);
|
||||
const SemanticToken = @This();
|
||||
usingnamespace @import("ast.zig");
|
||||
usingnamespace @import("./ast.zig");
|
||||
|
||||
pub const TokenType = enum(u32) {
|
||||
type,
|
||||
|
@ -1,13 +1,13 @@
|
||||
const std = @import("std");
|
||||
const analysis = @import("analysis.zig");
|
||||
const offsets = @import("offsets.zig");
|
||||
const DocumentStore = @import("document_store.zig");
|
||||
const types = @import("types.zig");
|
||||
const analysis = @import("./analysis.zig");
|
||||
const offsets = @import("./offsets.zig");
|
||||
const DocumentStore = @import("./document_store.zig");
|
||||
const types = @import("./types.zig");
|
||||
const ast = std.zig.Ast;
|
||||
const Token = std.zig.Token;
|
||||
const identifierFromPosition = @import("main.zig").identifierFromPosition;
|
||||
const identifierFromPosition = @import("./main.zig").identifierFromPosition;
|
||||
const SignatureHelp = @This();
|
||||
usingnamespace @import("ast.zig");
|
||||
usingnamespace @import("./ast.zig");
|
||||
|
||||
fn fnProtoToSignatureInfo(
|
||||
document_store: *DocumentStore,
|
||||
|
@ -1,9 +1,8 @@
|
||||
const analysis = @import("analysis.zig");
|
||||
const types = @import("types.zig");
|
||||
const offsets = @import("offsets.zig");
|
||||
const URI = @import("uri.zig");
|
||||
|
||||
const std = @import("std");
|
||||
const analysis = @import("./analysis.zig");
|
||||
const types = @import("./types.zig");
|
||||
const offsets = @import("./offsets.zig");
|
||||
const URI = @import("./uri.zig");
|
||||
|
||||
const allocator = std.testing.allocator;
|
||||
|
||||
|
@ -6,6 +6,7 @@ const reserved_chars = &[_]u8{
|
||||
'(', ')', '*', '+', ',', ':',
|
||||
';', '=', '?', '@', '[', ']',
|
||||
};
|
||||
|
||||
const reserved_escapes = blk: {
|
||||
var escapes: [reserved_chars.len][3]u8 = [_][3]u8{[_]u8{undefined} ** 3} ** reserved_chars.len;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user