OpenModelica / modelica-language-server

A VS Code language server extension for Modelica.
Other
5 stars 2 forks source link

Implement Inlay Hint Request #13

Open AnHeuermann opened 9 months ago

AnHeuermann commented 9 months ago

Description

Implement

The inlay hints request is sent from the client to the server to compute inlay hints for a given [text document, range] tuple that may be rendered in the editor in place with other text.

The tree could give hints for units or types in equations:

model M;
  Modelica.Units.SI.Energy e;
  Modelica.Units.SI.Mass m;
  Modelica.Units.SI.Velocity c = Modelica.Constants.c;
equation
  m /* kg */= 10;
  e /* J */= m*c^2 /* kg * (m/s)^2 */;
end M;

Here the comment would be the inline hint.

Desired Features

Examples

Other language servers the rust one inline types of variables, if the are inferred from other types.