Skip to content

Commit

Permalink
one last fix for gopls schema
Browse files Browse the repository at this point in the history
  • Loading branch information
TerminalFi committed Aug 21, 2024
1 parent b9b9ec9 commit 24f431e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/update-schema-settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@
"": "boolean",
}

TYPE_OVERRIDE_BY_KEY = {
"gopls.linksInHover": ["string", "boolean"],
}

# Custom LSP-gopls settings not provided by gopls directly
CUSTOM_PROPERTIES = {
"manageGoplsBinary": {
Expand Down Expand Up @@ -141,7 +145,10 @@ def generate_schema(self):
raw_settings = raw_schema["Options"]["User"]
for value in raw_settings:
current_key = f"gopls.{value['Name']}"
current_type = TYPE_MAP.get(value["Type"], value["Type"])
if current_key in TYPE_OVERRIDE_BY_KEY:
current_type = TYPE_OVERRIDE_BY_KEY[current_key]
else:
current_type = TYPE_MAP.get(value["Type"], value["Type"])
resolved_type = "string" if current_type == "enum" else current_type

markdown_description = (
Expand Down

0 comments on commit 24f431e

Please sign in to comment.