From e1257b6b92deeb6e8d8dc87424d6d2f73fb634dd Mon Sep 17 00:00:00 2001 From: Techatrix Date: Sun, 28 Jul 2024 19:38:00 +0200 Subject: [PATCH] remove the 'enable_inlay_hints' config option I am not aware of any client/editor that support Inlay Hints without providing an option to disable them. --- schema.json | 5 ----- src/Config.zig | 3 --- src/Server.zig | 2 -- src/config_gen/config.json | 6 ------ tests/context.zig | 1 - 5 files changed, 17 deletions(-) diff --git a/schema.json b/schema.json index a4292918c..1ea33a8d0 100644 --- a/schema.json +++ b/schema.json @@ -39,11 +39,6 @@ ], "default": "full" }, - "enable_inlay_hints": { - "description": "Enables inlay hint support when the client also supports it", - "type": "boolean", - "default": true - }, "inlay_hints_show_variable_type_hints": { "description": "Enable inlay hints for variable types", "type": "boolean", diff --git a/src/Config.zig b/src/Config.zig index 6899ae86a..d3399fe6b 100644 --- a/src/Config.zig +++ b/src/Config.zig @@ -26,9 +26,6 @@ semantic_tokens: enum { full, } = .full, -/// Enables inlay hint support when the client also supports it -enable_inlay_hints: bool = true, - /// Enable inlay hints for variable types inlay_hints_show_variable_type_hints: bool = true, diff --git a/src/Server.zig b/src/Server.zig index 567de5715..0d31ea3b6 100644 --- a/src/Server.zig +++ b/src/Server.zig @@ -1580,8 +1580,6 @@ fn documentHighlightHandler(server: *Server, arena: std.mem.Allocator, request: } fn inlayHintHandler(server: *Server, arena: std.mem.Allocator, request: types.InlayHintParams) Error!?[]types.InlayHint { - if (!server.config.enable_inlay_hints) return null; - const handle = server.document_store.getHandle(request.textDocument.uri) orelse return null; // The Language Server Specification does not provide a client capabilities that allows the client to specify the MarkupKind of inlay hints. diff --git a/src/config_gen/config.json b/src/config_gen/config.json index fadfde4a2..216024431 100644 --- a/src/config_gen/config.json +++ b/src/config_gen/config.json @@ -41,12 +41,6 @@ ], "default": "full" }, - { - "name": "enable_inlay_hints", - "description": "Enables inlay hint support when the client also supports it", - "type": "bool", - "default": true - }, { "name": "inlay_hints_show_variable_type_hints", "description": "Enable inlay hints for variable types", diff --git a/tests/context.zig b/tests/context.zig index ee9011aa1..f261dee04 100644 --- a/tests/context.zig +++ b/tests/context.zig @@ -9,7 +9,6 @@ const types = zls.types; const default_config: Config = .{ .semantic_tokens = .full, - .enable_inlay_hints = true, .inlay_hints_exclude_single_argument = false, .inlay_hints_show_builtin = true,