Giter Club home page Giter Club logo

systemverilog-formatter-vscode's People

Contributors

bmpenuelas avatar dependabot[bot] avatar hirooih avatar nickjones avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

systemverilog-formatter-vscode's Issues

Enhancement: Keyboard Shortcut for document format

Since the extension doesn't have default keybinds, I experimented and used these keyboard shortcuts. These mimic the same functionality that vscode provides for supported languages.

For supported languages, ctrl + k, ctrl + f autoformats the selection
For supported languages, alt + shift + f autoformats the entire document

[
    {
        "key": "ctrl+k ctrl+f",
        "command": "systemverilog-formatter-vscode.formatSelection",
        "when": "editorTextFocus && !editorReadonly && resourceExtname == '.sv'"
    },
    {
        "key": "shift+alt+f",
        "command": "systemverilog-formatter-vscode.formatDocument",
        "when": "editorTextFocus && !editorHasDocumentFormattingProvider && !editorReadonly && resourceExtname == '.sv'"
    }
]

I added a check so that it only works for .sv filetypes only (will not interfere with other filetypes or other shortcuts). I tried to find a way to add this within the extension's source code, but I haven't spent enough time with it to figure it out.

Hopefully this can be implemented in the next update!

intermittent work

After I install this plugin, the format function always intermittent work,I can't figure it out what's the problem with it

Considering support for verilog as well?

Hi,bmpenuelas.
Thanks for your work!
It works very good in systemverilog. But I also need a verilog formatter as well.
I think Verible also handle verilog file as well. Can you add that as well?
Thanks!

Doesn't run the command in Win10 properly

I believe the issue is with the file path not being parsed correctly (since my username has a space in it). The command works fine if I execute it myself in the command line.

image

2.16.3 doesn't work on macos

I notice this doesn't officially support MACOS (only for now, I wish)...BUT I really need to it so I decided to give it a try anyway.
I use brew to install verible, and I can get the "verible-verilog-format" run in the terminal.
So I try to use 2.16.3 with {"systemverilogFormatter.veribleBuild": "none"} in the setting SJON. The log I got is

#命令"SystemVerilog Formatter - Format this file"导致错误 (Command failed: -
/bin/sh: -: command not found
)

After roll back to 2.16.2 everything seems to work just fine.......

Incorrect shell used

I have Verible binaries in the PATH and they are accessible in my BASH terminal. VS Code is trying to run Verible with /bin/sh even though BASH is set in VS Code terminal.integrated.shell.linux

2023-06-07 12:16:02.708 [error] [bmpenuelas.systemverilog-formatter-vscode] provider FAILED
2023-06-07 12:16:02.708 [error] Error: Command failed: verible-verilog-format -
/bin/sh: verible-verilog-format: command not found

Could you please help me with this issue?

TypeError: Cannot read properties of undefined (reading 'body')

我在一个新机器上安装这个插件,是安装在vscode远程宿主机上的,发现一运行就报这个错误不知道是为什么
单独下载verible 使用verible-verilog-format是正常的。
SystemVerilog: Indexing: Unable to process file: file:///data/mxwang/Project/FPGA/ZCU104/wpu_acc_mig_base/wpu_acc_mig_base.srcs/sim_1/imports/new/tb_axi_mig_wrapper.sv TypeError: Cannot read properties of undefined (reading 'body') Auto Indexing: file:///data/mxwang/Project/FPGA/ZCU104/wpu_acc_mig_base/wpu_acc_mig_base.srcs/sim_1/imports/new/tb_axi_mig_wrapper.sv SystemVerilog: Indexing: Unable to process file: file:///data/mxwang/Project/FPGA/ZCU104/wpu_acc_mig_base/wpu_acc_mig_base.srcs/sim_1/imports/new/tb_axi_mig_wrapper.sv TypeError: Cannot read properties of undefined (reading 'body') Auto Indexing: file:///data/mxwang/Project/FPGA/ZCU104/wpu_acc_mig_base/wpu_acc_mig_base.srcs/sim_1/imports/new/tb_axi_mig_wrapper.sv SystemVerilog: Indexing: Unable to process file: file:///data/mxwang/Project/FPGA/ZCU104/wpu_acc_mig_base/wpu_acc_mig_base.srcs/sim_1/imports/new/tb_axi_mig_wrapper.sv TypeError: Cannot read properties of undefined (reading 'body') Auto Indexing: file:///data/mxwang/Project/FPGA/ZCU104/wpu_acc_mig_base/wpu_acc_mig_base.srcs/sim_1/imports/new/tb_axi_mig_wrapper.sv SystemVerilog: Indexing: Unable to process file: file:///data/mxwang/Project/FPGA/ZCU104/wpu_acc_mig_base/wpu_acc_mig_base.srcs/sim_1/imports/new/tb_axi_mig_wrapper.sv TypeError: Cannot read properties of undefined (reading 'body')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.