Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Feature: Is it possible to disable conceal only on links and wikilinks? #220

Open
2 of 4 tasks
alancunha26 opened this issue Dec 12, 2024 · 2 comments
Open
2 of 4 tasks
Assignees
Labels
enhancement New feature or request

Comments

@alancunha26
Copy link

alancunha26 commented Dec 12, 2024

The nature of the feature:

  • Renderer(style, options etc. related)
  • Parser(syntax, conceal etc. related)
  • Support(plugin support, language support etc. related)
  • Other

Description:

I would like to disable the conceal only for links. After reading the docs I didn't found anything related. I tried to disable links with:

{
  links = { enable = false }
}

It didn't work.

@alancunha26 alancunha26 added the enhancement New feature or request label Dec 12, 2024
@OXY2DEV
Copy link
Owner

OXY2DEV commented Dec 13, 2024

There's currently no way to do this.

I have been working on the opposite of this feature(basically certain things won't be concealed when the cursor is on them).

I will add an option to do this. It's probably gonna look like this,

require("markview").setup({
  preview = {
     ignore_node_classes = {
       inverse = true,
       -- NOTE, I don't think there's a use case where only specific types of links need to be visible so I will just add all of them as just "links".
       -- I will probably need do more tests with this.
       markdown_inline = { "links" }
     }
  }
});

OXY2DEV added a commit that referenced this issue Jan 3, 2025
@OXY2DEV
Copy link
Owner

OXY2DEV commented Jan 3, 2025

I have added this feature to dev branch.

You can use it like so,

require("markview").setup({
  preview = {
    ignore_previews = {
      -- This will disable hybrid mode for every other language.
      html = {},
      latex = {},
      markdown = {},
      typst = {},
      yaml = {},

      -- Hybrid mode will only affect links.
      markdown_inline = { "hyperlinks" }
  }
});

Demo:

feature.mp4

OXY2DEV added a commit that referenced this issue Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants