idea-multimarkdown icon indicating copy to clipboard operation
idea-multimarkdown copied to clipboard

Add Heading anchor ID display in editor

Open vsch opened this issue 8 years ago • 9 comments

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 avatar Apr 04 '17 23:04 vsch

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.

vsch avatar Apr 04 '17 23:04 vsch

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 😄

austintraver avatar Sep 18 '20 21:09 austintraver

@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 avatar Sep 18 '20 21:09 vsch

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

image

vsch avatar Sep 18 '20 21:09 vsch

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 avatar Sep 19 '20 00:09 austintraver

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

austintraver avatar Sep 19 '20 10:09 austintraver

@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.

vsch avatar Sep 19 '20 20:09 vsch

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 avatar Sep 24 '20 03:09 austintraver

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.

austintraver avatar Oct 04 '20 01:10 austintraver