eirikpre / VSCode-SystemVerilog

SystemVerilog support in VS Code
MIT License
124 stars 46 forks source link

Auto Indexing continues to work after disableIndexing #191

Closed Karl-Han closed 9 months ago

Karl-Han commented 1 year ago

Platform: macOS 13.0.1 (22A400) VSCode Version: 1.75.1 Plugin Version: v0.13.3

Here is my configuration related to SystemVerilog Extension:

    "systemverilog.formatCommand": "verible-verilog-format --indentation_spaces 4",
    "systemverilog.disableIndexing": true,
    "systemverilog.compileOnSave": false,

With customized formatCommand, I can confirm that this configuration is loaded by SystemVerilog, but every time I switch to another file or other panel and switch back, SystemVerilog will automatically indexing the current file, which is not what I expected with systemverilog.disableIndexing.

I want to disable indexing and use Control Palette to index by demand. Is this a bug or my configuration is wrong?

joecrop commented 1 year ago

If memory serves me correctly. The disableIndexing setting will prevent the workspace from being crawled for sv files that you may not have opened yet. Files are always indexed on open.

Is there a command that exists today that let's you manually trigger the indexing, or are you requesting that feature too?

Karl-Han commented 1 year ago

Actually, from your expression, I think I got the meaning of disableIndexing wrong.

systemverilog.disableIndexing: Boolean, Disable indexing

I thought it means disable global indexing by looking into README. If it is possible, I like to request for that global indexing disable feature :), since it is friendly to computation resource.

joecrop commented 1 year ago

Hi @Karl-Han, After looking into implementing this, I think there is already a setting for it. Will the systemverilog.enableIncrementalIndexing setting do what you are hoping?

"systemverilog.enableIncrementalIndexing": {
    "type": "boolean",
    "default": true,
    "description": "Enable incremental indexation as you open files."
},
Karl-Han commented 9 months ago

After configuring this option, it works as expected without automatic indexing.