hashicorp / hashicorp/syntax

Consider highlighting grammar for function signatures

Open
#67 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
HCL
Stars
31
Forks
12
Avg merge
7m
Merged PRs (30d)
1

Description

## Context

As part of https://github.com/hashicorp/terraform-ls/issues/37 we discovered that there's need for rendering function signatures in a markdown hover popup. Because signatures aren't technically valid HCL, the existing grammar(s) do not highlight it particularly well. Specifically, the grammar cannot distinguish between type declaration and parameter name.

Screenshot 2023-03-23 at 09 17 01

Screenshot 2023-03-23 at 09 18 16

## Proposal

- [ ] Explore the option of a separate small grammar to highlight just function signatures
- [ ] Discuss and agree on a stable/predictable way of rendering the signatures - e.g. how to present types (`set(string)` vs `set of string`; `any single type` vs `dynamic` etc.)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.