Summary
Completion after package_name:: shows the enum typedef name, but does not show enum literals declared by that typedef.
This affects common SystemVerilog workflows where enum values are referenced with package scope, for example state_pkg::IDLE.
Environment
- OS: Windows
- VS Code version:
- Vizsla extension version:
- Vizsla server version:
Minimal Reproduction
Create a workspace with these files:
completion-package-enum-literals/
.vscode/
settings.json
vizsla.toml
top.sv
.vscode/settings.json:
{
"editor.wordBasedSuggestions": "off",
"editor.snippetSuggestions": "none"
}
vizsla.toml:
#:schema https://pascal-lab.github.io/vizsla/schemas/v1/vizsla.schema.json
top_modules = ["top"]
sources = [
"top.sv",
]
top.sv:
package enum_pkg;
localparam int PKG_WIDTH = 8;
typedef enum logic [1:0] {
MODE_IDLE,
MODE_RUN,
MODE_DONE
} mode_e;
endpackage
module top;
import enum_pkg::*;
enum_pkg::mode_e mode_q;
initial begin
mode_q = enum_pkg::;
end
endmodule
Reproduction Steps
- Open the
completion-package-enum-literals/ directory in VS Code.
- Wait until Vizsla is ready.
- Open
top.sv.
- Put the cursor after
enum_pkg:: in this line:
- Trigger completion with
Ctrl+Space.
Expected
The completion list should include package members, including enum literals:
PKG_WIDTH
mode_e
MODE_IDLE
MODE_RUN
MODE_DONE
In particular, enum literals should be discoverable because these are valid package-scoped enum values:
enum_pkg::MODE_IDLE
enum_pkg::MODE_RUN
enum_pkg::MODE_DONE
Actual
The completion list includes the enum typedef name:
But it does not include the enum literals:
MODE_IDLE
MODE_RUN
MODE_DONE
Summary
Completion after
package_name::shows the enum typedef name, but does not show enum literals declared by that typedef.This affects common SystemVerilog workflows where enum values are referenced with package scope, for example
state_pkg::IDLE.Environment
Minimal Reproduction
Create a workspace with these files:
.vscode/settings.json:{ "editor.wordBasedSuggestions": "off", "editor.snippetSuggestions": "none" }vizsla.toml:top.sv:Reproduction Steps
completion-package-enum-literals/directory in VS Code.top.sv.enum_pkg::in this line:Ctrl+Space.Expected
The completion list should include package members, including enum literals:
In particular, enum literals should be discoverable because these are valid package-scoped enum values:
Actual
The completion list includes the enum typedef name:
But it does not include the enum literals: