Community
    • Login

    Seeking for help

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    40 Posts 7 Posters 4.8k Views
    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.
    • Nick BrownN
      Nick Brown @Vitalii Dovgan
      last edited by

      @Vitalii-Dovgan said in Seeking for help:

      Will there be a 32-bit version? I still prefer 32-bit Notepad++.

      Likewise

      1 Reply Last reply Reply Quote 0
      • EkopalypseE
        Ekopalypse @Vitalii Dovgan
        last edited by

        @Vitalii-Dovgan @Nick-Brown

        Yes, looks like I found the culprit. :-)

        238c97a1-9f2d-4867-a366-ced90d1d0c26-image.png

        1 Reply Last reply Reply Quote 2
        • EkopalypseE
          Ekopalypse
          last edited by

          For the brave and fearless ones, the first alpha versions are available at https://github.com/Ekopalypse/NppLspClient/releases.

          Michael VincentM 1 Reply Last reply Reply Quote 1
          • Michael VincentM
            Michael Vincent @Ekopalypse
            last edited by

            @Ekopalypse said in Seeking for help:

            available at https://github.com/Ekopalypse/NppLspClient/releases

            There aren’t any releases here
            You can create a release to package software, along with release notes and links to binary files, for other people to use. Learn more about releases in our docs.
            

            Did you not create a release yet? I was ready to download and compile, but then saw the V language requirement and not quite ready to jump into that this late in the day ;-)

            Eager to try it out though.

            Cheers.

            1 Reply Last reply Reply Quote 1
            • EkopalypseE
              Ekopalypse
              last edited by

              Thank you for pointing this out, I hope I have fixed the problem now.

              PeterJonesP 1 Reply Last reply Reply Quote 1
              • PeterJonesP
                PeterJones @Ekopalypse
                last edited by PeterJones

                @Ekopalypse ,

                It doesn’t seem to be running my attempt at the Perl one (which might be because the Perl::LanguageServer server that I’m running was a pain to get to install correctly, so I just might not have it set up right, and I don’t have any LSP client for checking if that side of things is working), so I defined a dummy python entry

                {
                	"lspservers": {
                		"perl": {
                			"pipe": "io",
                			"executable": "C:\\USR\\LOCAL\\APPS\\BERRYBREW\\PERLS\\SYSTEM\\PERL\\BIN\\perl.exe",
                			"args": ["-MPerl::LanguageServer", "-e", "Perl::LanguageServer::run"],
                			"auto_start_server": false,
                		},
                		"python": {
                			"pipe": "io",
                			"executable": "C:\\Windows\\System32\\cmd.exe",
                			"args": ["/C", "start"],
                			"auto_start_server": false
                		}
                	}
                }
                

                but whether I try to just start a new cmd.exe window, or do "args": ["/C", "echo", "hi"], or "args": ["/K", "prompt"], I can see no evidence that it’s running anything.

                The steps I take:

                1. Installed your plugin
                2. Plugins > nppLspClient > Open configuration file
                3. saved the above file
                4. tried either Plugins > nppLspClient > Apply Current Configuration or restarting Notepad++
                5. turn on the LSP output console
                6. open a dummy python file
                7. Start Server for Current Language
                8. Nothing shows up in the console, and no new windows are popped open

                Thus, I cannot tell whether the plugin is just not trying to run my command, or what. (I was hoping for that I could just prove to myself that it was launching something.

                For the perl command, if I run perl -MPerl::LanguageServer -e Perl::LanguageServer::run from a command line, it pauses waiting for input, and Task Manager shows that perl is running:
                8c06404e-76df-43a4-8c66-656549db9ba2-image.png

                But if I try to Start Server for Current Language with a perl file active in Notepad++, it doesn’t seem to be trying to launch the server process. (But maybe it launches it, then it dies too quickly for me to see it in Task Manager)

                The only time I see anything in the LSP output console with either perl or python is if I try to restart the current language’s server, when I see the console tells me:

                initialized = false
                

                Is there some dummy configuration that would show me the plugin is actually trying to launch the server, even if it doesn’t do anything else? Or, barring that, where can I get the pyls.exe for trying the plugin for real with python?

                Michael VincentM 1 Reply Last reply Reply Quote 1
                • Michael VincentM
                  Michael Vincent @PeterJones
                  last edited by

                  @PeterJones said in Seeking for help:

                  It doesn’t seem to be running my attempt at the Perl one

                  @Ekopalypse

                  I did get the Perl one “running”

                  183791f3-ac36-410e-a5f7-2429feb2f7b1-image.png

                  Text copy of output:

                  perl server is running
                  on_init: 13232
                  Content-Length: 2347
                  
                  {"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"processId": 13232, "clientInfo":{"name": "NppLspClient", "version": "0.0.1"}, "rootUri": "file:///C%3A/Users/mvincent/tmp", "initializationOptions": {}, "capabilities": {"workspace": {"applyEdit": false, "workspaceEdit": {"documentChanges": false}, "didChangeConfiguration": {"dynamicRegistration": false}, "didChangeWatchedFiles": {"dynamicRegistration": false}, "symbol": {"dynamicRegistration": false, "symbolKind": {"valueSet": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}}, "executeCommand": {"dynamicRegistration": false}, "configuration": false, "workspaceFolders": false}, "textDocument": {"publishDiagnostics": {"relatedInformation": false}, "synchronization": {"dynamicRegistration": false, "willSave": false, "willSaveWaitUntil": false, "didSave": true}, "completion": {"dynamicRegistration": false, "contextSupport": false, "completionItem": {"snippetSupport": false, "commitCharactersSupport": false, "documentationFormat": ["plaintext"], "deprecatedSupport": false}, "completionItemKind": {"valueSet": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]}}, "hover": {"dynamicRegistration": false, "contentFormat": ["plaintext"]}, "signatureHelp": {"dynamicRegistration": false, "signatureInformation": {"documentationFormat": ["plaintext"]}}, "definition": {"dynamicRegistration": false}, "references": {"dynamicRegistration": false}, "documentHighlight": {"dynamicRegistration": false}, "documentSymbol": {"dynamicRegistration": false, "symbolKind": {"valueSet": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}}, "codeAction": {"dynamicRegistration": false}, "codeLens": {"dynamicRegistration": false}, "formatting": {"dynamicRegistration": false}, "rangeFormatting": {"dynamicRegistration": false}, "onTypeFormatting": {"dynamicRegistration": false}, "rename": {"dynamicRegistration": false}, "documentLink": {"dynamicRegistration": false}, "typeDefinition": {"dynamicRegistration": false}, "implementation": {"dynamicRegistration": false}, "colorProvider": {"dynamicRegistration": false}, "foldingRange": {"dynamicRegistration": false, "rangeLimit": 100, "lineFoldingOnly": true}}}, "trace": "off", "workspaceFolders": null}}
                  on_message_received: tcp server start listen on port 7070
                  

                  and my config:

                          "perl": {
                              "pipe": "tcp",
                              "port": 7070,
                              "tcpretries" : 3,
                              "executable": "C:\\Strawberry\\perl\\bin\\perl.exe",
                              "args": ["-MPerl::LanguageServer", "-e", "Perl::LanguageServer::run", "--", "--port 7070"]
                          }
                  

                  It doesn’t seem to work though when I hover or try command completion. Upon further examination of the text negotiation string, you can see all the capabilities return “false” - so perhaps that’s the reason?

                  I did get the Python (one from the example using pyls) working, but wonky:

                  c50a21ab-d662-4109-b222-186cb04823f7-image.png

                  and return to complete yields:

                  525a56c8-1b3e-4437-bc5d-13415261469f-image.png

                  Which actually puts the text “value” as the example in the actual document and then you have to arrow key back to delete it and put the actual value (e.g., 1). Could certainly be what pyls is delivering - I’m used to using your PythonScript “IDE” script and that using jedi offers the methods without example parameter data.

                  Off to a great start though! You are aware of @dail 's NppLSP (stalled) project , correct? Chance to collaborate?

                  Cheers.

                  EkopalypseE 2 Replies Last reply Reply Quote 2
                  • EkopalypseE
                    Ekopalypse
                    last edited by Ekopalypse

                    @PeterJones
                    First thank you for testing.
                    You are right, there is not much info when something goes wrong. I will build a V.0.0.2 today as I’ve did a couple of fixes and make sure to have debug statements enabled to make it
                    easier to find out what is causing the issue.

                    1 Reply Last reply Reply Quote 1
                    • EkopalypseE
                      Ekopalypse @Michael Vincent
                      last edited by

                      @Michael-Vincent

                      Many thanks to you as well.
                      I had, hopefully solved - crossing fingers, problems with the synchronisation of documents, which I have fixed with my changes that will be included in a V.0.0.2.
                      I know its NppLsp project, but unfortunately I have no C++ knowledge. :-(
                      As for the Perl, it looks like the language server uses tcp and that is not implemented yet, only stdin/stdout messaging.

                      Michael VincentM 1 Reply Last reply Reply Quote 1
                      • EkopalypseE
                        Ekopalypse
                        last edited by

                        @Ekopalypse said in Seeking for help:

                        I know its

                        This of course must be I know his, sorry @dail

                        1 Reply Last reply Reply Quote 2
                        • EkopalypseE
                          Ekopalypse
                          last edited by Ekopalypse

                          @PeterJones
                          For the python one I would recommend using a local python installation and then using pip to install it.
                          Like pip install 'python-lsp-server[all]'
                          Sources are available here.

                          1 Reply Last reply Reply Quote 1
                          • EkopalypseE
                            Ekopalypse @Michael Vincent
                            last edited by

                            @Michael-Vincent

                            I’m afraid the only lsp server for Python that doesn’t use Jedi under the hood is, as far as I know, the new Pylance addon for VSCode.
                            But MS hasn’t made it public. Jedi is a bit slow.

                            1 Reply Last reply Reply Quote 0
                            • Michael VincentM
                              Michael Vincent @Ekopalypse
                              last edited by

                              @Ekopalypse said in Seeking for help:

                              Many thanks to you as well.

                              I think a Npp language server client would be awesome - I just don’t have the chops to create it. Happy there are others that see the value and I appreciate you taking on the enormous task. Happy to help test / troubleshoot / contribute how I can.

                              Cheers.

                              PeterJonesP 1 Reply Last reply Reply Quote 1
                              • PeterJonesP
                                PeterJones @Michael Vincent
                                last edited by

                                @Ekopalypse ,

                                Even when I set my config up like @Michael-Vincent’s for perl, I don’t see messages in the LSP output console. It may be that my IT department is blocking some aspects (I just got a notification that Notepad++ was being virus scanned when reloading it, which I normally never see). I think at this point, I will have to give up on LSP at work (which is unfortunate, because I do a lot more coding at work than at home); maybe I’ll run some experiments at home, where I know IT cannot be getting in my way. ;-)

                                1 Reply Last reply Reply Quote 1
                                • Nick BrownN
                                  Nick Brown
                                  last edited by

                                  @Ekopalypse

                                  I have now had a chance to use your plugin and as an alpha release I am mightily impressed.

                                  I have tested using pylsp.exe and with all options installed.

                                  Got a bit of a fright on my 3000 line plus python file I decided to test it on (perhaps I should have been so ambitious) but it even worked on this file if a little slowly at times, which may be the pylsp implementation as much as anything as I have all options enabled in pylsp so it is doing a lot, but I was able to work through the issue and the annotations and console helped.

                                  A couple of things, which at present would be very much nice to have and are not essential would be:

                                  1. Ability to configure the colours of the various styles of messages in the console, I still use a white background and the default colours are a bit washed out. Also would be good for the annotations as well.

                                  2. Add hotspot links to the diagnostic info message in the console, i.e. line:3284 - Cyclomatic complexity too high: 15 (threshold 15), so that they could be clicked to take you to the line in the file being edited. I know these appear as annotations in the edited file but with a large file and the console shown it would be good to just click on the messages and be taken to that line in the file.

                                  3. If the completion list is empty do not show it, not sure what the issue is but I was getting an empty completion dropdown on entering ‘.’ in some cases.

                                  4. Not sure how well this is interacting with the Undo CTRL-Z functionality as that seemed to pop up completion lists (empty again) and trigger seemingly multiple call to the lsp, not sure how well scintilla notifies this so you might not be able to do much about it.

                                  So far so good, and keep up the good work, I have also downloaded the source code and the V language has peeked my interest, not one I have had much exposure to yet amongst the seemingly hundreds I have used during a 35 year development career, but one I am going to have to become more familiar with even if only to possibly contribute to this project. Just need to get GCC installed and working first though.

                                  EkopalypseE 1 Reply Last reply Reply Quote 4
                                  • EkopalypseE
                                    Ekopalypse @Nick Brown
                                    last edited by

                                    @Nick-Brown

                                    Thanks for testing and the kind words.
                                    As for GCC, the V community seems to prefer builds from https://winlibs.com/#download-release.
                                    Just unzip and make sure gcc is in the path or can be found.

                                    Unfortunately pyls is very slow compared to other language servers I’ve tested and I’m pretty sure jedi is the culprit.
                                    I read that the author of jedi wants to rewrite it with rust, that should give a good performance boost.

                                    Doh, of course, colors need to be customizable.
                                    Will be included in the next version (I assume tomorrow).

                                    Currently I am toying with how such diagnostic messages should be displayed. On the one hand I want them in the Scintilla editor, on the other hand I hate it when they are constantly shown and hidden. Maybe it is an option to use an indicator, a squiggled line (?) while typing and annotations, as is the case now, when saving the file !?

                                    V is a very young language that has potential, but whether it can use it, only the future will probably tell, I think. :-)

                                    As long as the plugin is in alpha status, I’ll try to implement the functions needed first.
                                    In beta status, I then plan refinements such as hotspot links etc…
                                    Please don’t misunderstand, I’m absolutely happy about the thoughts you made, they make total sense. Thanks again.

                                    1 Reply Last reply Reply Quote 4
                                    • Nick BrownN
                                      Nick Brown
                                      last edited by Nick Brown

                                      @Ekopalypse

                                      Thanks for the hint re GCC, all downloaded and working now, time to do some more learning of V.

                                      I assume you use Notepad++ for V, if so do you know of a lexer, I have found a UDL which does a half way decent job but is easily confused with things like ‘\\’?

                                      EkopalypseE 1 Reply Last reply Reply Quote 0
                                      • EkopalypseE
                                        Ekopalypse @Nick Brown
                                        last edited by

                                        @Nick-Brown

                                        Yes, I wrote a lexer for V, but unfortunately it doesn’t help you because
                                        it doesn’t work with a 32bit npp because, as far as I’ve investigated/understood,
                                        x86 code handles the thiscall needed for the cpp-lexer methods differently.
                                        X64 code handles this the same way as stdcall and this is supported by V.
                                        I haven’t had the muse to follow this up yet, if you want to do that, I can provide my lexer code.

                                        Nick BrownN 1 Reply Last reply Reply Quote 3
                                        • Nick BrownN
                                          Nick Brown @Ekopalypse
                                          last edited by

                                          @ekopalypse

                                          I have a portable x64 version I could use for V, so the lexer would be much appreciated.

                                          It’s just I haven’t switched over to x64 version of my main customised/built from source version yet because of issue with a missing x64 version of one of the plugins I use quite a lot, I could replicate the functionality in x64 with my own plugin but I haven’t had the time of yet.

                                          Michael VincentM 1 Reply Last reply Reply Quote 0
                                          • Michael VincentM
                                            Michael Vincent @Nick Brown
                                            last edited by

                                            @nick-brown said in Seeking for help:

                                            a missing x64 version of one of the plugins

                                            Which one?

                                            Not to hijack the thread, but this was my reason for not switching from 32-bit to 64-bit, but I was able to find alternative workflows / tools / scripting that solved the issue and I moved to 64-bit a few years back.

                                            Cheers.

                                            Nick BrownN 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            The Community of users of the Notepad++ text editor.
                                            Powered by NodeBB | Contributors