diff --git a/src/Server.zig b/src/Server.zig index 4241dd3..8d26dac 100644 --- a/src/Server.zig +++ b/src/Server.zig @@ -892,8 +892,6 @@ fn hoverDefinitionGlobal(server: *Server, writer: anytype, id: types.RequestId, const tracy_zone = tracy.trace(@src()); defer tracy_zone.end(); - _ = server; - const decl = (try server.getSymbolGlobal(pos_index, handle)) orelse return try respondGeneric(writer, id, null_result_response); return try server.hoverSymbol(writer, id, decl); } diff --git a/src/analysis.zig b/src/analysis.zig index debc328..6632e34 100644 --- a/src/analysis.zig +++ b/src/analysis.zig @@ -1460,8 +1460,6 @@ fn tokenRangeAppend(prev: SourceRange, token: std.zig.Token) SourceRange { const DocumentPosition = offsets.DocumentPosition; pub fn documentPositionContext(arena: *std.heap.ArenaAllocator, document: types.TextDocument, doc_position: DocumentPosition) !PositionContext { - _ = document; - const line = doc_position.line; const line_mem_start = @ptrToInt(line.ptr) - @ptrToInt(document.mem.ptr); @@ -2532,16 +2530,10 @@ fn makeInnerScope(allocator: std.mem.Allocator, context: ScopeContext, node_idx: if (container_field) |_| { if (!std.mem.eql(u8, name, "_")) { var doc = if (try getDocComments(allocator, tree, decl, .Markdown)) |docs| - types.MarkupContent{ .kind = .Markdown, .value = docs } - else - null; - var gop_res = try context.enums.getOrPut(allocator, .{ - .label = name, - .kind = .Constant, - .insertText = name, - .insertTextFormat = .PlainText, - .documentation = doc - }); + types.MarkupContent{ .kind = .Markdown, .value = docs } + else + null; + var gop_res = try context.enums.getOrPut(allocator, .{ .label = name, .kind = .Constant, .insertText = name, .insertTextFormat = .PlainText, .documentation = doc }); if (gop_res.found_existing) { if (doc) |d| allocator.free(d.value); } diff --git a/src/diff.zig b/src/diff.zig index c40e745..a5b737a 100644 --- a/src/diff.zig +++ b/src/diff.zig @@ -33,7 +33,6 @@ pub fn edits( var a_trim: []const u8 = a; var b_trim: []const u8 = b; const a_trim_offset = trim_input(&a_trim, &b_trim); - _ = a_trim_offset; const rows = a_trim.len + 1; const cols = b_trim.len + 1; @@ -239,8 +238,6 @@ pub fn get_changes( var range_start = group[0].pos; var range_len: usize = 0; var newText = std.ArrayList(u8).init(allocator); - _ = range_start; - _ = range_len; for (group) |ch| { switch (ch.operation) { .Addition => try newText.append(ch.value.?),