Skip to content

Commit

Permalink
remove the 'enable_inlay_hints' config option
Browse files Browse the repository at this point in the history
I am not aware of any client/editor that support Inlay Hints without providing an option to disable them.
  • Loading branch information
Techatrix committed Jul 28, 2024
1 parent 7344d4d commit e1257b6
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 17 deletions.
5 changes: 0 additions & 5 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 0 additions & 3 deletions src/Config.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down
2 changes: 0 additions & 2 deletions src/Server.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 0 additions & 6 deletions src/config_gen/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion tests/context.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down

0 comments on commit e1257b6

Please sign in to comment.