OXY2DEV / markview.nvim

☄️ Highly customisable markdown(latex & inline html) previewer for Neovim
Apache License 2.0
1.38k stars 38 forks source link

idk what I'm doing wrong, it's not rendering most things #103

Closed 4rtemis-4rrow closed 2 months ago

4rtemis-4rrow commented 2 months ago

Have you done all of these?

Describe the bug title

Neovim version

nvim --version
# Output
NVIM v0.10.1
Build type: Release
LuaJIT 2.1.1720049189
Run "nvim -V1 -v" for more info

Are you using a distro? No

To Reproduce Steps to reproduce the bug:

  1. Install markview.nvim.
  2. Open a markdown document.

Configuration table

If you have configured the plugin then you must share your config.


-- MarkView --
local markview = require("markview");
local presets = require("markview.presets");

markview.setup({
    headings = presets.headings.glow_labels,
    hybrid_modes = { "n" },
    callbacks = {
        on_enable = function (_, win)
            vim.wo[win].conceallevel = 2;
            vim.wo[win].conecalcursor = "c";
        end
    }
});

vim.cmd("Markview enableAll");

https://imgur.com/a/leID0vq

list of all other plugins I have installed

nvim-tree.lua, venn.nvim, nvim-cmp, lualine, treesitter, tokyonight.nvim, nvim-spider, which-key.nvim, noice.nvim, telescope.nvim, telescope-undo.nvim, plenary.nvim, hydra.nvim

I know it's something I'm doing wrong, idk what it is, it was working a couple days ago, and I don't remember what I changed

thanks in advance guys

OXY2DEV commented 2 months ago

You config is fine. So, either the plugin isn't loading or something else is stopping it.

If you are using lazy.nvim check if the plugin is loaded or not.

4rtemis-4rrow commented 2 months ago

nope, not lazy loading it

        {
            "OXY2DEV/markview.nvim",
            lazy = false,      -- Recommended
            -- ft = "markdown" -- If you decide to lazy-load anyway

            dependencies = {
                -- You will not need this if you installed the
                -- parsers manually
                -- Or if the parsers are in your $RUNTIMEPATH
                "nvim-treesitter/nvim-treesitter",

                "nvim-tree/nvim-web-devicons"
            }
        },

using the exact recomended installation from the readme, didn't even bother removing the comments

4rtemis-4rrow commented 2 months ago

and according to lazy, it has been loaded at start

   lazy.nvim 󰒲   Install (I)   Update (U)   Sync (S)   Clean (X)   Check (C)   Log (L)   Restore (R)   Profile (P)   Debug (D)   Help (?) 

  Total: 17 plugins

  Loaded (16)
    ● hydra.nvim 1.8ms  start
    ● lazy.nvim 17.62ms  init.lua
    ● lualine.nvim 0.19ms  start
    ● markview.nvim 4.28ms  start
    ● noice.nvim 0.87ms 󰢱 noice  Plugconfig
    ● nui.nvim 0.18ms 󰢱 nui.object  noice.nvim
    ● nvim-cmp 2.24ms  start
    ● nvim-tree.lua 0.07ms  start
    ● nvim-treesitter 3.93ms  markview.nvim
    ● nvim-web-devicons 0.22ms  markview.nvim
    ● plenary.nvim 0.22ms  telescope.nvim
    ● telescope-undo.nvim 0.18ms  telescope.nvim
    ● telescope.nvim 8.1ms  start
    ● tokyonight.nvim 0.13ms  start
    ● venn.nvim 0.45ms  start
    ● which-key.nvim 0.84ms  VeryLazy

  Not Loaded (1)
    ○ nvim-spider  e  ge  b  e (x)  w (o)  w (x)  e (o)  w  b (o)  b (x)  ge (o)  ge (x) 
OXY2DEV commented 2 months ago

That's weird. Does changing mode do anything?

Or if you type something does anything happen?

4rtemis-4rrow commented 2 months ago

no, and no

I tried normal mode, tried insert, visual, visual line, visual block, everything

how comes there is a bug affecting only me? this is genuinely weird

I also tried uninstalling markview and reinstalling it, thinking that something might have changed it's code locally, no effect

4rtemis-4rrow commented 2 months ago

what's even weirder is that things like code blocks are being rendered appropriately, as can be seen from the screenshot

OXY2DEV commented 2 months ago

Well, then there's only one thing to do.

You gotta have to disable everything other than markview and see if it's caused by another plugin.

OXY2DEV commented 2 months ago

what's even weirder is that things like code blocks are being rendered appropriately, as can be seen from the screenshot

They are not actually. That's just what the conceallevel does.

4rtemis-4rrow commented 2 months ago

Well, then there's only one thing to do.

You gotta have to disable everything other than markview and see if it's caused by another plugin.

disabled everything, now nothing is rendered, at all

4rtemis-4rrow commented 2 months ago

what's even weirder is that things like code blocks are being rendered appropriately, as can be seen from the screenshot

They are not actually. That's just what the conceallevel does.

intresting, thanks

OXY2DEV commented 2 months ago

Did you find what was causing the issue?

4rtemis-4rrow commented 2 months ago

I wish, and if I did, I'd have posted a comment explaining it, and closed the issue

OXY2DEV commented 2 months ago

I wish, and if I did, I'd have posted a comment explaining it, and closed the issue

You could just simply use gcc to comment the other plugin's config table(if you use plugins.lua or lazy.lua) and quickly check if something changes.

Or just paste enabled = false in all the plugin files(if you use plugins/something.lua)

4rtemis-4rrow commented 2 months ago

I wish, and if I did, I'd have posted a comment explaining it, and closed the issue

You could just simply use gcc to comment the other plugin's config table(if you use plugins.lua or lazy.lua) and quickly check if something changes.

Or just paste enabled = false in all the plugin files(if you use plugins/something.lua)

I did the first method, I commented everything relating to any plugin out, even keymaps, left nothing except markview, and nothing, not a single line of markdown rendered

OXY2DEV commented 2 months ago

Well, remove everything in the config part. It's definitely doing something weird.

I tested it again and I still can't reproduce the issue.


Just to be clear the plugin only works on .md files. So, opening a different filetype wouldn't work.

HudsonMC16 commented 2 months ago

I ran into this issue also, and turns out it was because I didn't have an html grammar installed, which was weird. Run :TSInstall html and see if it starts working.

4rtemis-4rrow commented 2 months ago

bruh why did that actually fix it, lol

thanks m8