vsch / idea-multimarkdown

Markdown language support for IntelliJ IDEA.
https://plugins.jetbrains.com/plugin/7896-markdown-navigator
Apache License 2.0
813 stars 129 forks source link

Add Heading anchor ID display in editor #425

Open vsch opened 7 years ago

vsch commented 7 years ago

Option will display the heading id after heading text and application setting option to enable this

When enabled:

image

Disabling returns to normal:

image

Option in Languages & Frameworks > Markdown:

image

vsch commented 7 years ago

EAP update with a fix for the issue is available. To enable EAP update channel:

Screen Shot Settings Update Channel

Then make the IDE check for updates.

austintraver commented 3 years ago

When I edit documents, at times I have a custom anchor ID to my heading, but this plugin doesn't seem to realize that I've done so, and displays... well... this:

screenshot 30 screenshot 31

Is this the expected behavior?

Also, thanks for building this plug-in! I just bought a 1-year lease 😄

vsch commented 3 years ago

@austintraver, attributes are a custom extension which you need to enable in parser settings. Right now the attributes are being interpreted as heading text, so the id reflects this.

image

vsch commented 3 years ago

@austintraver, when attributes are enabled the syntax highlighting will show that it is not heading text, and anchor-id will reflect the attribute:

image
austintraver commented 3 years ago

I'll give this a shot.

One more thing: I'm not sure if it's a work in progress, but there's no way to preview the coloration of attribute formats in the color scheme editor. To see what I'm talking about, you'd go, (in WebStorm at least), to Attributes Extension: Settings -> Editor -> Color Scheme -> Markdown -> Extensions -> Attributes -> "Attribute Name"

Is this a feature that's on the roadmap?

austintraver commented 3 years ago

I tried to follow the configurations above @vsch ☝️ but it didn't fix the problem. I've attached my configurations below. I'm running the following version (latest), and using version 3.0.202.108 of Markdown Navigator Enhanced

WebStorm 2020.2.2
Build #WS-202.7319.49, built on September 14, 2020
Runtime version: 11.0.8+10-b944.31 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 10.16
GC: ParNew, ConcurrentMarkSweep
Memory: 3987M
Cores: 16
Registry: ide.balloon.shadow.size=0
Non-Bundled Plugins: IdeaVIM, com.1v0.dev.hugo-intellij-plugin, com.intellij.apacheConfig, com.intellij.ideolog, com.intellij.properties, com.markskelton.one-dark-theme, com.intellij.selenium, com.vladsch.idea.multimarkdown, training
screenshot 49 screenshot 48
vsch commented 3 years ago

@austintraver,

Q1: are you getting any exceptions in the IDE?

Q2: Does it behave the same way in project MD files or only in scratch files?

I have may exception reports which I cannot duplicate and cannot make sense of in some IDEs. So it is possible these are also causing issues on your system. If you have you should see a flashing red exclamation sign in the bottom/right status bar area.

I also noticed that Chromium embedded preview does not work for scratch files. Swing and JavaFX do not have this problem. I will be addressing this as soon as I can figure out what is causing this.

As for the color preview of attributes, I missed adding this element to the sample file. I will add this.

austintraver commented 3 years ago

Q1: are you getting any exceptions in the IDE?

No exceptions in the IDE, event log remains empty, as shown in the bottom-right corner of the attached image below.

Q2: Does it behave the same way in project MD files or only in scratch files?

Unfortunately it behaves the same way in both project MD files and scratch files. Attached below is a project MD file showing the same issue

screenshot 5

As for the color preview of attributes, I missed adding this element to the sample file. I will add this.

I saw the changes in the latest build, thanks for doing that for me. I noticed that there's two more that are missing in the sample file. Links > Ref anchor and Links > Ref anchor id

austintraver commented 3 years ago

Is this something I could help with? If you point me to the right place in the code base I could give it a shot.