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

Open looking glass in tangled code block deletes the @code line #777

Closed
2 tasks done
sbstratos79 opened this issue Mar 14, 2023 · 1 comment · Fixed by #732
Closed
2 tasks done

Open looking glass in tangled code block deletes the @code line #777

sbstratos79 opened this issue Mar 14, 2023 · 1 comment · Fixed by #732
Labels
bug Issues related to bugs. Please attach a severity, a priority and category with this label.

Comments

@sbstratos79
Copy link

sbstratos79 commented Mar 14, 2023

Prerequisites

  • I am using either 0.7 stable with the 0.0.12 tag or the latest compiled Neovim version
  • I am using the latest version of the plugin

Neovim Version

NVIM v0.8.3 Build type: Release LuaJIT 2.1.0-beta3 Compiled by builduser Features: +acl +iconv +tui See ":help feature-compile" System vimrc: "$VIM/sysinit.vim" Default $VIM: "/usr/share/nvim"

Neorg setup

return {
    "nvim-neorg/neorg",
    lazy = false,
    -- tag = "v2.0.1",
    build = ":Neorg sync-parsers",
    ft = "norg",
    opts = {
        load = {
            ["core.defaults"] = {}, -- Loads default behaviour
            ["core.norg.concealer"] = {
                config = {
                    icon_preset = "diamond",
                }
            },                       -- Adds pretty icons to your documents
            ["core.norg.dirman"] = { -- Manages Neorg workspaces
                config = {
                    workspaces = {
                        notes = "~/Documents/neorg",
                    },
                    default_workspace = "notes",
                },
            },
            ["core.keybinds"] = {       -- Custom keybinds
                config = {
                    neorg_leader = ",", -- Set custom neorg leader key
                    hook = function(keybinds)
                        keybinds.map("norg", "n", "<C-c><C-c>",
                            "<cmd>Neorg keybind all core.looking-glass.magnify-code-block<cr>")
                    end,
                },
            },
            ["core.norg.qol.todo_items"] = {
                config = {
                    create_todo_items = true,
                }
            }
        },
    },
    dependencies = { { "nvim-lua/plenary.nvim" } },
}

Actual behavior

Opening the looking glass deletes the @code line from the code block.

neorg.mp4

Expected behavior

@code line shouldn't be deleted.

Steps to reproduce

  • Create a tangled code block.
  • Use :Neorg keybind all core.looking-glass.magnify-code-block or a hotkey to open the code block in a looking glass.
  • @code line is removed.

Potentially conflicting plugins

No response

Other information

Also, for some reason, tangling a code block also makes the @code line visible in the code block. conceallevel is set to 1.
A normal code block doesn't exhibit this behavior. If this is a bug, please let me know so I can create a new issue.

Help

No

Implementation help

No response

@sbstratos79 sbstratos79 added the bug Issues related to bugs. Please attach a severity, a priority and category with this label. label Mar 14, 2023
@danymat danymat closed this as completed in beef6fd Apr 1, 2023
@danymat
Copy link
Member

danymat commented Apr 1, 2023

Hello, this bug should be fixed. Can you try and see it everything is working ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues related to bugs. Please attach a severity, a priority and category with this label.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants