Writing a Verilog autoformat extension for Sublime/VS Code












2















As an RTL developer, I find it annoying that my favorite text editors (Notepad++, Sublime, VS Code) don't have autoformat options for RTL languages like Verilog and VHDL. So I took it upon myself to create one.



I want to develop an auto-format extension for one of those editors. I dropped Notepad++ because it doesn't have native support for Linux and macOS.



So, the question is: how to get started in developing an auto-format extension for a language for Sublime and VS Code?



Notes:




  • I don't intend to develop an extension for both editors but I'd want to see which would be more feasible.


  • With Verilog being closer to C syntax, it might be easier to start there (and I also prefer it over VHDL, but let's not get into religious discussions)


  • I know that Emacs and Sigasi editors provide auto-format options for RTL languages but their format options are strict and I don't like the outcome, hence I intend to make the formatting style configurable


  • I ran into this work https://github.com/thomasrussellmurphy/istyle-verilog-formatter it might be useful to build on it if possible











share|improve this question





























    2















    As an RTL developer, I find it annoying that my favorite text editors (Notepad++, Sublime, VS Code) don't have autoformat options for RTL languages like Verilog and VHDL. So I took it upon myself to create one.



    I want to develop an auto-format extension for one of those editors. I dropped Notepad++ because it doesn't have native support for Linux and macOS.



    So, the question is: how to get started in developing an auto-format extension for a language for Sublime and VS Code?



    Notes:




    • I don't intend to develop an extension for both editors but I'd want to see which would be more feasible.


    • With Verilog being closer to C syntax, it might be easier to start there (and I also prefer it over VHDL, but let's not get into religious discussions)


    • I know that Emacs and Sigasi editors provide auto-format options for RTL languages but their format options are strict and I don't like the outcome, hence I intend to make the formatting style configurable


    • I ran into this work https://github.com/thomasrussellmurphy/istyle-verilog-formatter it might be useful to build on it if possible











    share|improve this question



























      2












      2








      2








      As an RTL developer, I find it annoying that my favorite text editors (Notepad++, Sublime, VS Code) don't have autoformat options for RTL languages like Verilog and VHDL. So I took it upon myself to create one.



      I want to develop an auto-format extension for one of those editors. I dropped Notepad++ because it doesn't have native support for Linux and macOS.



      So, the question is: how to get started in developing an auto-format extension for a language for Sublime and VS Code?



      Notes:




      • I don't intend to develop an extension for both editors but I'd want to see which would be more feasible.


      • With Verilog being closer to C syntax, it might be easier to start there (and I also prefer it over VHDL, but let's not get into religious discussions)


      • I know that Emacs and Sigasi editors provide auto-format options for RTL languages but their format options are strict and I don't like the outcome, hence I intend to make the formatting style configurable


      • I ran into this work https://github.com/thomasrussellmurphy/istyle-verilog-formatter it might be useful to build on it if possible











      share|improve this question
















      As an RTL developer, I find it annoying that my favorite text editors (Notepad++, Sublime, VS Code) don't have autoformat options for RTL languages like Verilog and VHDL. So I took it upon myself to create one.



      I want to develop an auto-format extension for one of those editors. I dropped Notepad++ because it doesn't have native support for Linux and macOS.



      So, the question is: how to get started in developing an auto-format extension for a language for Sublime and VS Code?



      Notes:




      • I don't intend to develop an extension for both editors but I'd want to see which would be more feasible.


      • With Verilog being closer to C syntax, it might be easier to start there (and I also prefer it over VHDL, but let's not get into religious discussions)


      • I know that Emacs and Sigasi editors provide auto-format options for RTL languages but their format options are strict and I don't like the outcome, hence I intend to make the formatting style configurable


      • I ran into this work https://github.com/thomasrussellmurphy/istyle-verilog-formatter it might be useful to build on it if possible








      verilog system-verilog vscode-extensions sublime-text-plugin autoformatting






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 9 '18 at 9:03







      hkassir72

















      asked Aug 8 '18 at 9:16









      hkassir72hkassir72

      607




      607
























          1 Answer
          1






          active

          oldest

          votes


















          0















          I don't intend to develop an extension for both editors but I'd want to see which would be more feasible.




          In my opinion, I would prefer coding RTL languages in VS code because it's more versatile than sublime text as in free beer and speech. I would highly recommend beginning from here https://code.visualstudio.com/docs/extensions/example-hello-world.
          Oh, you also need to know Typescript / Javascript to write an extension.




          I ran into this work https://github.com/thomasrussellmurphy/istyle-verilog-formatter it might be useful to build on it if possible




          I am excited to see the port of this to VS Code/ Sublime Text. I am sorry I don't know how to work on from C++ to TypeScript. My guess would be to copy the implementation method and write in TypeScript.



          From their website :




          Prerequisites:



          You need Node.js installed and available in your $PATH. Node.js includes npm, the Node.js Package Manager, which will be used to install the extension generator.




          I am pretty excited to see auto formatting extensions for Verilog. I hope i can contribute too :)



          Edit :
          I found this https://github.com/g2384/VHDLFormatter written in TypeScript. The transition to VSCode/Sublime would be easier than the above in C++. I have tested it personally and it works awesome! Hope it helps :)






          share|improve this answer





















          • 1





            Thanks! I'll start the project soon enough (hopefully). I'll update this question with my project once it's in decent shape.

            – hkassir72
            Nov 25 '18 at 11:05











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f51742901%2fwriting-a-verilog-autoformat-extension-for-sublime-vs-code%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0















          I don't intend to develop an extension for both editors but I'd want to see which would be more feasible.




          In my opinion, I would prefer coding RTL languages in VS code because it's more versatile than sublime text as in free beer and speech. I would highly recommend beginning from here https://code.visualstudio.com/docs/extensions/example-hello-world.
          Oh, you also need to know Typescript / Javascript to write an extension.




          I ran into this work https://github.com/thomasrussellmurphy/istyle-verilog-formatter it might be useful to build on it if possible




          I am excited to see the port of this to VS Code/ Sublime Text. I am sorry I don't know how to work on from C++ to TypeScript. My guess would be to copy the implementation method and write in TypeScript.



          From their website :




          Prerequisites:



          You need Node.js installed and available in your $PATH. Node.js includes npm, the Node.js Package Manager, which will be used to install the extension generator.




          I am pretty excited to see auto formatting extensions for Verilog. I hope i can contribute too :)



          Edit :
          I found this https://github.com/g2384/VHDLFormatter written in TypeScript. The transition to VSCode/Sublime would be easier than the above in C++. I have tested it personally and it works awesome! Hope it helps :)






          share|improve this answer





















          • 1





            Thanks! I'll start the project soon enough (hopefully). I'll update this question with my project once it's in decent shape.

            – hkassir72
            Nov 25 '18 at 11:05
















          0















          I don't intend to develop an extension for both editors but I'd want to see which would be more feasible.




          In my opinion, I would prefer coding RTL languages in VS code because it's more versatile than sublime text as in free beer and speech. I would highly recommend beginning from here https://code.visualstudio.com/docs/extensions/example-hello-world.
          Oh, you also need to know Typescript / Javascript to write an extension.




          I ran into this work https://github.com/thomasrussellmurphy/istyle-verilog-formatter it might be useful to build on it if possible




          I am excited to see the port of this to VS Code/ Sublime Text. I am sorry I don't know how to work on from C++ to TypeScript. My guess would be to copy the implementation method and write in TypeScript.



          From their website :




          Prerequisites:



          You need Node.js installed and available in your $PATH. Node.js includes npm, the Node.js Package Manager, which will be used to install the extension generator.




          I am pretty excited to see auto formatting extensions for Verilog. I hope i can contribute too :)



          Edit :
          I found this https://github.com/g2384/VHDLFormatter written in TypeScript. The transition to VSCode/Sublime would be easier than the above in C++. I have tested it personally and it works awesome! Hope it helps :)






          share|improve this answer





















          • 1





            Thanks! I'll start the project soon enough (hopefully). I'll update this question with my project once it's in decent shape.

            – hkassir72
            Nov 25 '18 at 11:05














          0












          0








          0








          I don't intend to develop an extension for both editors but I'd want to see which would be more feasible.




          In my opinion, I would prefer coding RTL languages in VS code because it's more versatile than sublime text as in free beer and speech. I would highly recommend beginning from here https://code.visualstudio.com/docs/extensions/example-hello-world.
          Oh, you also need to know Typescript / Javascript to write an extension.




          I ran into this work https://github.com/thomasrussellmurphy/istyle-verilog-formatter it might be useful to build on it if possible




          I am excited to see the port of this to VS Code/ Sublime Text. I am sorry I don't know how to work on from C++ to TypeScript. My guess would be to copy the implementation method and write in TypeScript.



          From their website :




          Prerequisites:



          You need Node.js installed and available in your $PATH. Node.js includes npm, the Node.js Package Manager, which will be used to install the extension generator.




          I am pretty excited to see auto formatting extensions for Verilog. I hope i can contribute too :)



          Edit :
          I found this https://github.com/g2384/VHDLFormatter written in TypeScript. The transition to VSCode/Sublime would be easier than the above in C++. I have tested it personally and it works awesome! Hope it helps :)






          share|improve this answer
















          I don't intend to develop an extension for both editors but I'd want to see which would be more feasible.




          In my opinion, I would prefer coding RTL languages in VS code because it's more versatile than sublime text as in free beer and speech. I would highly recommend beginning from here https://code.visualstudio.com/docs/extensions/example-hello-world.
          Oh, you also need to know Typescript / Javascript to write an extension.




          I ran into this work https://github.com/thomasrussellmurphy/istyle-verilog-formatter it might be useful to build on it if possible




          I am excited to see the port of this to VS Code/ Sublime Text. I am sorry I don't know how to work on from C++ to TypeScript. My guess would be to copy the implementation method and write in TypeScript.



          From their website :




          Prerequisites:



          You need Node.js installed and available in your $PATH. Node.js includes npm, the Node.js Package Manager, which will be used to install the extension generator.




          I am pretty excited to see auto formatting extensions for Verilog. I hope i can contribute too :)



          Edit :
          I found this https://github.com/g2384/VHDLFormatter written in TypeScript. The transition to VSCode/Sublime would be easier than the above in C++. I have tested it personally and it works awesome! Hope it helps :)







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 29 '18 at 9:01

























          answered Nov 24 '18 at 10:43









          ShankarShankar

          163




          163








          • 1





            Thanks! I'll start the project soon enough (hopefully). I'll update this question with my project once it's in decent shape.

            – hkassir72
            Nov 25 '18 at 11:05














          • 1





            Thanks! I'll start the project soon enough (hopefully). I'll update this question with my project once it's in decent shape.

            – hkassir72
            Nov 25 '18 at 11:05








          1




          1





          Thanks! I'll start the project soon enough (hopefully). I'll update this question with my project once it's in decent shape.

          – hkassir72
          Nov 25 '18 at 11:05





          Thanks! I'll start the project soon enough (hopefully). I'll update this question with my project once it's in decent shape.

          – hkassir72
          Nov 25 '18 at 11:05




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f51742901%2fwriting-a-verilog-autoformat-extension-for-sublime-vs-code%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          404 Error Contact Form 7 ajax form submitting

          How to know if a Active Directory user can login interactively

          TypeError: fit_transform() missing 1 required positional argument: 'X'