Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Support custom user-defined types/subtypes #76

Open
Nabav opened this issue Aug 23, 2023 · 4 comments
Open

[Feature Request] Support custom user-defined types/subtypes #76

Nabav opened this issue Aug 23, 2023 · 4 comments

Comments

@Nabav
Copy link

Nabav commented Aug 23, 2023

LSP v3.17 adds subtypes. Is it possible to support them in VHDL-LS?

I am experiencing VHDL-LS in VSCode. I see that the custom type is highlighted during declaration.

type my_type_t is (FIRST_STATE, SECOND_STATE);
--   ^^^^^^^^^ <- highlighted

But it is not highlighted when defining an instance of that type.

signal my_signal : my_type_t := FIRST_STATE;
--                 ^^^^^^^^^ <- not highlighted

The same happens for subtypes. The subtype is highlighted during declaration:

subtype my_int_t is integer range 0 to 63;
--      ^^^^^^^^ <- highlighted

But the instance type is not highlighted:

constant MY_CONST : my_int_t := 42;
--                  ^^^^^^^^ <- not highlighted

Please let me know, if I am wrong reporting here and the issue should be reported in server side project.

@Nabav
Copy link
Author

Nabav commented Aug 29, 2023

Moved to VHDL-LS/rust_hdl#196

@Nabav Nabav closed this as completed Aug 29, 2023
@Nabav Nabav reopened this Sep 8, 2023
@Nabav
Copy link
Author

Nabav commented Nov 9, 2023

As mentioned on sever side, the syntax highlighting is not part of the server.

@Schottkyc137
Copy link
Contributor

Actually, I think that this does belong to the language server 😬.
While it is true that the vscode extension defines the syntax highlighting, the feature that you want doesn't have anything to do with the subtypes capability of the LSP. Instead, I believe that what you want are Semantic Tokens. This deals with highlighting types and other language elements which the base implementation herein is not capable of.

@Nabav
Copy link
Author

Nabav commented May 26, 2024

@kraigher , please consider ☝️, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants