vscode-markdown-notes icon indicating copy to clipboard operation
vscode-markdown-notes copied to clipboard

Wiki [[links]] are not highlighted

Open flowerornament opened this issue 4 years ago • 5 comments

Describe the bug Wiki links of the form [[link]] are not highlighted. URL links i.e. test are.

To Reproduce

  • Full path to workspace directory: /Users/msutherl/Library/Containers/co.noteplan.NotePlan3/Data/Library/Application\ Support/co.noteplan.NotePlan3/
  • Full path to file editing: /Users/msutherl/Library/Containers/co.noteplan.NotePlan3/Data/Library/Application\ Support/co.noteplan.NotePlan3/Calendar/20210119.md
  • Your vscodeMarkdownNotes.workspaceFilenameConvention setting: uniqueFilenames

Screenshots Screenshot 2021-01-19 15 37 12

Versions

  • OS: macOS 11.1
  • VS Code Version: 1.52.1
  • Extension Version: v0.0.21

flowerornament avatar Jan 19 '21 23:01 flowerornament

Hey,

Just a few checks:

  • Is the extension activated?
  • Have you installed any other markdown extensions that could potentially conflict with this one?
  • Was there a point at which the highlights did work?

thomaskoppelaar avatar Jan 23 '21 21:01 thomaskoppelaar

I also had this issue when using the Dark (Visual Studio) theme. Switching to the Dark+ theme fixed the issue for me. The cause of the issue is that Markdown Notes is assigning the support.function.text.markdown.notes.wiki-link.title scope to the link titles, but the Dark (Visual Studio) theme does not have any settings that match that scope. The Dark+ theme does - see here.

josephdecock avatar Jan 02 '22 21:01 josephdecock

I'm not very familiar with the scopes that are commonly used by themes, but I wonder if there is a different scope that could be set on wiki links that would be supported by at least all the default themes.

josephdecock avatar Jan 02 '22 21:01 josephdecock

Perhaps consider changing the scope of wiki links to be string.other.link.title.markdown? That's the scope that I see on regular markdown links. It seems like it would be good to format links consistently, regardless of if they are wiki links or not.

josephdecock avatar Jan 02 '22 21:01 josephdecock

hmmm, I'm just not sure I want to introduce a breaking change like this. I think maybe you could do a work-around to match the color of string.other.link.title.markdown by adding to your settings.json:

  "editor.tokenColorCustomizations": {
    "[Dark]": {
      "textMateRules": [
        {
          "scope": "support.function.text.markdown.notes.wiki-link.title",
          "settings": {
            "foreground": "#666" // or whatever color you want
          }
        },

Hope that works as a workaround for you!

kortina avatar Aug 26 '22 16:08 kortina