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

just found another good-looking markdown plugin #175

Closed
2nthony opened this issue Aug 23, 2024 · 11 comments
Closed

just found another good-looking markdown plugin #175

2nthony opened this issue Aug 23, 2024 · 11 comments

Comments

@2nthony
Copy link

2nthony commented Aug 23, 2024

https://github.com/OXY2DEV/markview.nvim

@yetone
Copy link
Owner

yetone commented Aug 23, 2024

Thank you for the recommendation, let me try out this plugin.

@aarnphm
Copy link
Collaborator

aarnphm commented Aug 24, 2024

I think this should already be supported, as Avante is a markdown filetype

@KevinNitroG
Copy link

I think this should already be supported, as Avante is a markdown filetype

But I don't know how to config it to make it work with avante 😕

@chgara
Copy link

chgara commented Aug 27, 2024

It can't be used with this plugin, author says the following

OXY2DEV/markview.nvim#7 (comment)

@aarnphm
Copy link
Collaborator

aarnphm commented Aug 27, 2024

What? we register treesitter of Avante to markdown. This is not correct

vim.treesitter.language.register("markdown", "Avante")

@chgara
Copy link

chgara commented Aug 27, 2024

What? we register treesitter of Avante to markdown. This is not correct

vim.treesitter.language.register("markdown", "Avante")

I have just now tried in local and it does not work trying to use the plugin, even configured for avante file type in the plugin.
It seems to be other things that need to be set to make it work, other person says the same in the issue

OXY2DEV/markview.nvim#7 (comment)

That or maybe I am missing something

Here is a video of my trying it, and showing that if works for markdown but not for avante, and also the config I used.

2024-08-28.00-58-00.mp4

@aarnphm
Copy link
Collaborator

aarnphm commented Aug 27, 2024

Hmm I think the culprit is this https://github.com/OXY2DEV/markview.nvim/blob/main/plugin/markview.lua

  {
    "OXY2DEV/markview.nvim",
    enabled = true,
    lazy = false,
    ft = { "markdown", "norg", "rmd", "org", "vimwiki", "Avante" },
    opts = {
      file_types = { "markdown", "norg", "rmd", "org", "vimwiki", "Avante" },
      buf_ignore = {},
      max_length = 99999,
    },
  },

Even I enable all all buffer it doesn't seem to register correctly

@chgara
Copy link

chgara commented Aug 27, 2024

Hmm I think the culprit is this https://github.com/OXY2DEV/markview.nvim/blob/main/plugin/markview.lua

  {
    "OXY2DEV/markview.nvim",
    enabled = true,
    lazy = false,
    ft = { "markdown", "norg", "rmd", "org", "vimwiki", "Avante" },
    opts = {
      file_types = { "markdown", "norg", "rmd", "org", "vimwiki", "Avante" },
      buf_ignore = {},
      max_length = 99999,
    },
  },

Even I enable all all buffer it doesn't seem to register correctly

I think you need to use "filetypes" as name for the option, not "file_types"

https://github.com/OXY2DEV/markview.nvim/wiki/Configuration-options#-configuration-options

I think that the problem is in this function, in the file you referenced:

https://github.com/OXY2DEV/markview.nvim/blob/1fd113802e008f09c6bb91d352f770e8b0bd4da4/plugin/markview.lua#L152

@aarnphm
Copy link
Collaborator

aarnphm commented Aug 27, 2024

ye my bad, but this work

  {
    "OXY2DEV/markview.nvim",
    enabled = true,
    lazy = false,
    ft = { "markdown", "norg", "rmd", "org", "vimwiki", "Avante" },
    opts = {
      filetypes = { "markdown", "norg", "rmd", "org", "vimwiki", "Avante" },
      buf_ignore = {},
      max_length = 99999,
    },
  },

@aarnphm
Copy link
Collaborator

aarnphm commented Aug 27, 2024

Screenshot 2024-08-27 at 19 29 39

@aarnphm
Copy link
Collaborator

aarnphm commented Aug 27, 2024

For future reference, all markdown renderer plugins should be supported by Avante by default, as Avante filetype is a markdown alias.

@aarnphm aarnphm closed this as completed Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants