Community
    • Login

    Which lang other then c/cpp to build plugins

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    5 Posts 3 Posters 628 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • h-jangraH Offline
      h-jangra
      last edited by

      I tried go with cgo and it didn’t work.
      Is there any way where I can use cpp wrapper and main logic in golang.

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP Offline
        PeterJones @h-jangra
        last edited by

        @h-jangra ,

        Any language that can create a DLL and provide the various function hooks that Notepad++ requires can be used. There are plugin templates available for C++, C#, Ada, D, and Delphi. But I know that @Ekopalypse has made a plugin in the V programming language, even though there’s no template for that language. So it should be easily doable in golang, especially for someone who can read/understand one of the templates in another language, and make similar hooks in the destination language (like golang).

        You shouldn’t need to do a “wrapper” from C++ around the golang (or other) solution. It should be natively doable, assuming golang can make a DLL (which I presume it can).

        h-jangraH 1 Reply Last reply Reply Quote 1
        • h-jangraH Offline
          h-jangra @PeterJones
          last edited by

          @PeterJones
          Thanks, I checked V is simpler and similiar like go. So I can go with V for my plugin.

          EkopalypseE 1 Reply Last reply Reply Quote 0
          • EkopalypseE Offline
            Ekopalypse @h-jangra
            last edited by

            @h-jangra

            Be careful when using V, as it has made some decisions, such as removing the option for users to create a dllmain, that are… strange. In addition, at least during the time I worked with V, there were repeated problems with the various compilers.
            Gcc did this, but msvc did not, clang always caused problems, especially in release mode, and tcc does not work at all in this area. Don’t get me wrong, you can get them all to work, but you’ll end up spending more time working around the obstacles than working on the plugin, and unfortunately, there is no win32 library yet. So you have to write every Win32 function you use yourself and hope that it doesn’t conflict with the ones V uses internally.
            So if you want to use a new language, I would recommend Rust, C#, Delphi, Odin, or Zig.
            With the exception of Delphi, I created plugins in all the other languages for testing and ultimately decided on Rust for the LSP client plugin.

            h-jangraH 1 Reply Last reply Reply Quote 1
            • h-jangraH Offline
              h-jangra @Ekopalypse
              last edited by

              @Ekopalypse I tried simple plugin now using go. It did worked, let see if I can improve. If its good then I should make template for it.

              1 Reply Last reply Reply Quote 2

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors