Skip to content

Commit

Permalink
remove unused imports (#2049)
Browse files Browse the repository at this point in the history
  • Loading branch information
srijan-paul authored Oct 9, 2024
1 parent 063d7ff commit 6ae67e8
Show file tree
Hide file tree
Showing 28 changed files with 0 additions and 48 deletions.
2 changes: 0 additions & 2 deletions src/BuildAssociatedConfig.zig
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//! Configuration options related to a specific `BuildFile`.
const std = @import("std");

const Self = @This();

pub const BuildOption = struct {
name: []const u8,
value: ?[]const u8 = null,
Expand Down
1 change: 0 additions & 1 deletion src/DocumentStore.zig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ const tracy = @import("tracy");
const translate_c = @import("translate_c.zig");
const AstGen = std.zig.AstGen;
const Zir = std.zig.Zir;
const InternPool = @import("analyser/InternPool.zig");
const DocumentScope = @import("DocumentScope.zig");

const DocumentStore = @This();
Expand Down
2 changes: 0 additions & 2 deletions src/Server.zig
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ const DocumentStore = @import("DocumentStore.zig");
const lsp = @import("lsp");
const types = lsp.types;
const Analyser = @import("analysis.zig");
const ast = @import("ast.zig");
const offsets = @import("offsets.zig");
const Ast = std.zig.Ast;
const tracy = @import("tracy");
const diff = @import("diff.zig");
const InternPool = @import("analyser/analyser.zig").InternPool;
Expand Down
2 changes: 0 additions & 2 deletions src/analyser/completions.zig
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ const std = @import("std");
const InternPool = @import("InternPool.zig");
const types = @import("lsp").types;

const Ast = std.zig.Ast;

/// generates a list of dot completions for the given typed-value in `index`
/// the given `index` must belong to the given InternPool
pub fn dotCompletions(
Expand Down
3 changes: 0 additions & 3 deletions src/analyser/error_msg.zig
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
const std = @import("std");
const types = @import("lsp").types;
const offsets = @import("../offsets.zig");

const InternPool = @import("InternPool.zig");
const Index = InternPool.Index;
const Key = InternPool.Key;

pub const ErrorMsg = union(enum) {
/// zig: expected type '{}', found '{}'
Expand Down
1 change: 0 additions & 1 deletion src/configuration.zig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const tracy = @import("tracy");
const known_folders = @import("known-folders");

const Config = @import("Config.zig");
const offsets = @import("offsets.zig");

const logger = std.log.scoped(.zls_config);

Expand Down
1 change: 0 additions & 1 deletion src/debug.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

const std = @import("std");

const analysis = @import("analysis.zig");
const offsets = @import("offsets.zig");
const DocumentScope = @import("DocumentScope.zig");

Expand Down
1 change: 0 additions & 1 deletion src/features/completions.zig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const Ast = std.zig.Ast;
const log = std.log.scoped(.zls_completions);

const Server = @import("../Server.zig");
const Config = @import("../Config.zig");
const DocumentStore = @import("../DocumentStore.zig");
const types = @import("lsp").types;
const Analyser = @import("../analysis.zig");
Expand Down
2 changes: 0 additions & 2 deletions src/features/diagnostics.zig
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
//! Implementation of [`textDocument/publishDiagnostics`](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_publishDiagnostics)

const std = @import("std");
const builtin = @import("builtin");
const Ast = std.zig.Ast;
const log = std.log.scoped(.zls_diag);

const Server = @import("../Server.zig");
const DocumentStore = @import("../DocumentStore.zig");
const BuildAssociatedConfig = @import("../BuildAssociatedConfig.zig");
const types = @import("lsp").types;
const Analyser = @import("../analysis.zig");
const ast = @import("../ast.zig");
Expand Down
1 change: 0 additions & 1 deletion src/features/document_symbol.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

const std = @import("std");
const Ast = std.zig.Ast;
const log = std.log.scoped(.zls_document_symbol);

const types = @import("lsp").types;
const offsets = @import("../offsets.zig");
Expand Down
2 changes: 0 additions & 2 deletions src/features/goto.zig
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
//! - [`textDocument/implementation`](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_implementation) (same behaviour as `textDocument/definition`)

const std = @import("std");
const Ast = std.zig.Ast;
const log = std.log.scoped(.zls_goto);

const Server = @import("../Server.zig");
const ast = @import("../ast.zig");
const lsp = @import("lsp");
const types = lsp.types;
const offsets = @import("../offsets.zig");
Expand Down
2 changes: 0 additions & 2 deletions src/features/hover.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

const std = @import("std");
const Ast = std.zig.Ast;
const log = std.log.scoped(.zls_hover);

const ast = @import("../ast.zig");
const types = @import("lsp").types;
const offsets = @import("../offsets.zig");
const URI = @import("../uri.zig");
const tracy = @import("tracy");

const Analyser = @import("../analysis.zig");
Expand Down
1 change: 0 additions & 1 deletion src/features/inlay_hints.zig
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! Implementation of [`textDocument/inlayHint`](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_inlayHint)

const std = @import("std");
const zig_builtin = @import("builtin");
const Ast = std.zig.Ast;
const log = std.log.scoped(.zls_inlay_hint);

Expand Down
2 changes: 0 additions & 2 deletions src/features/references.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

const std = @import("std");
const Ast = std.zig.Ast;
const log = std.log.scoped(.zls_references);

const Server = @import("../Server.zig");
const DocumentScope = @import("../DocumentScope.zig");
const DocumentStore = @import("../DocumentStore.zig");
const Analyser = @import("../analysis.zig");
const lsp = @import("lsp");
Expand Down
1 change: 0 additions & 1 deletion src/features/semantic_tokens.zig
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! Implementation of [`textDocument/semanticTokens/*`](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_semanticTokens)

const std = @import("std");
const zig_builtin = @import("builtin");
const Ast = std.zig.Ast;

const offsets = @import("../offsets.zig");
Expand Down
1 change: 0 additions & 1 deletion src/tools/config_gen.zig
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const std = @import("std");
const zig_builtin = @import("builtin");

const ConfigOption = struct {
/// Name of config option
Expand Down
1 change: 0 additions & 1 deletion src/translate_c.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

const std = @import("std");
const zig_builtin = @import("builtin");
const builtin = @import("builtin");
const Config = @import("DocumentStore.zig").Config;
const ast = @import("ast.zig");
const tracy = @import("tracy");
Expand Down
2 changes: 0 additions & 2 deletions tests/lsp_features/completion.zig
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
const std = @import("std");
const zls = @import("zls");
const builtin = @import("builtin");

const helper = @import("../helper.zig");
const Context = @import("../context.zig").Context;
const ErrorBuilder = @import("../ErrorBuilder.zig");

Expand Down
1 change: 0 additions & 1 deletion tests/lsp_features/definition.zig
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const std = @import("std");
const zls = @import("zls");
const builtin = @import("builtin");

const helper = @import("../helper.zig");
const Context = @import("../context.zig").Context;
Expand Down
1 change: 0 additions & 1 deletion tests/lsp_features/document_symbol.zig
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const std = @import("std");
const zls = @import("zls");
const builtin = @import("builtin");

const Context = @import("../context.zig").Context;

Expand Down
3 changes: 0 additions & 3 deletions tests/lsp_features/folding_range.zig
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
const std = @import("std");
const zls = @import("zls");
const builtin = @import("builtin");

const Context = @import("../context.zig").Context;

const types = zls.types;

const allocator: std.mem.Allocator = std.testing.allocator;

test "empty" {
try testFoldingRange("", &.{});
}
Expand Down
1 change: 0 additions & 1 deletion tests/lsp_features/hover.zig
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const std = @import("std");
const zls = @import("zls");
const builtin = @import("builtin");

const Context = @import("../context.zig").Context;

Expand Down
1 change: 0 additions & 1 deletion tests/lsp_features/inlay_hints.zig
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const std = @import("std");
const zls = @import("zls");
const builtin = @import("builtin");

const helper = @import("../helper.zig");
const Context = @import("../context.zig").Context;
Expand Down
1 change: 0 additions & 1 deletion tests/lsp_features/references.zig
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const std = @import("std");
const zls = @import("zls");
const builtin = @import("builtin");

const helper = @import("../helper.zig");
const Context = @import("../context.zig").Context;
Expand Down
2 changes: 0 additions & 2 deletions tests/lsp_features/selection_range.zig
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
const std = @import("std");
const zls = @import("zls");
const builtin = @import("builtin");

const helper = @import("../helper.zig");
const Context = @import("../context.zig").Context;
const ErrorBuilder = @import("../ErrorBuilder.zig");

const types = zls.types;
const offsets = zls.offsets;
Expand Down
6 changes: 0 additions & 6 deletions tests/lsp_features/semantic_tokens.zig
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const std = @import("std");
const zls = @import("zls");
const builtin = @import("builtin");

const Context = @import("../context.zig").Context;
const ErrorBuilder = @import("../ErrorBuilder.zig");
Expand Down Expand Up @@ -1676,11 +1675,6 @@ test "assembly" {
});
}

const S = struct {
const foo = @compileError("some message");
};
const bar = S.foo;

test "deprecated" {
try testSemanticTokens(
\\const foo = @compileError("some message");
Expand Down
2 changes: 0 additions & 2 deletions tests/utility/ast.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ const std = @import("std");
const zls = @import("zls");

const helper = @import("../helper.zig");
const Context = @import("../context.zig").Context;
const ErrorBuilder = @import("../ErrorBuilder.zig");

const types = zls.types;
const offsets = zls.offsets;
const ast = zls.ast;

Expand Down
2 changes: 0 additions & 2 deletions tests/utility/position_context.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const std = @import("std");
const zls = @import("zls");

const Analyser = zls.Analyser;
const types = zls.types;
const offsets = zls.offsets;

const allocator = std.testing.allocator;

Expand Down

0 comments on commit 6ae67e8

Please sign in to comment.