Edditoria / markdown-plus-plus

Markdown syntax highlighting for Notepad++, by customized UDL file (user defined language)
MIT License
1.49k stars 277 forks source link

NPM fails #58

Closed fwd079 closed 3 years ago

fwd079 commented 3 years ago

Good morning,

Not an issue (I think) but just a note that if like myself if you already have a custom language defined (mine was TypeScript) then npm package fails. Only way to install it to get source and then go to

Language -> User Defined Language -> Define your language...

Then import the udl of your choice. Then it works and shows your chosen md themed language.

image

Kind Regards.

Edditoria commented 3 years ago

Hi,

Do you run the npm command in %AppData%\Notepad++\userDefineLangs\ directory or somewhere else?

In later versions of NPP, you can manage UDL files in the above directory, rather than import/modify contents in %AppData%\Notepad++\userDefineLang.xml file.

Or, you can download the zip file, then move your favourite UDL to the userDefineLangs\ directory. Please restart NPP to take effect.

Here's the screenshot:

mpp-test-screenshot

Please tell me any output or buy you are facing. Thanks. :-)

fwd079 commented 3 years ago

Yup, as mentioned I followed instructions to a tee. Those did not work. Then yes, I downloaded zip file and UDL in userDefineLangs directory. That didn't work either. Everything "completed" but restarting Notepad++ didn't make any difference.

Then, I imported as shown and it worked. Kind Regards.

Edditoria commented 3 years ago

That's weird. I would try to reproduce the problem.

  1. For Notepad++, do you use the portable version or exe installer?
  2. In Notepad++, please click in menu: Language → User Defined Language → Open User Defined Language folder...
    Please copy and paste the path on Windows Explorer.
  3. Which terminal application do you use? e.g. Command Prompt or WSL, etc?

Thanks for your help :)

fwd079 commented 3 years ago

Well installed NP++ via chocolatey. Steps to install after Chocolatey is installed on Windows:

choco install notepadplusplus --y

But guessing the issue is similar to this one on Notepad++ Git as a cloud is turned on with the path:

image

And that path did not have userDefineLangs folder created, but that's not your fault but Notepad++ as linked issue suggests.

As said don't think it's an issue (at least on your side).

Kind Regards.

Edditoria commented 3 years ago

I have tried to reproduce the problem. Yes, it seems that it is the problem of "cloud" function in NPP.

Problem

When "Cloud" directory is set in NPP's Preferences, the <userDefineLangs\> folder is not created automatically.

NPP will not open the folder when you click in menu: Language → User Defined Language → Open User Defined Language folder...

Solution

I still prefer to use the <userDefineLangs\> to manage your UDL files, rather than modifying a single UDL in the old days.

Let say: You setup your cloud directory at <%UserProfile%\Documents\Notepad++\>

If it is setup correctly, NPP will open Explorer when you click in menu: Language → User Defined Language → Open User Defined Language folder...

Run npx markdown-plus-plus command in your new <userDefineLangs\>, instead of the default one.

Yay~

fwd079 commented 3 years ago

Great. Solved, I guess. 🙂

As said it is mainly NP++'s problem. But thanks for looking into it. The workaround works, closing it now.

Kind Regards.