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

latex renderer render_on_enter not working #1445

Open
2 tasks done
glyh opened this issue May 28, 2024 · 0 comments
Open
2 tasks done

latex renderer render_on_enter not working #1445

glyh opened this issue May 28, 2024 · 0 comments
Labels
bug Issues related to bugs. Please attach a severity, a priority and category with this label.

Comments

@glyh
Copy link

glyh commented May 28, 2024

Prerequisites

  • I am using the latest stable release of Neovim
  • I am using the latest version of the plugin

Neovim Version

NVIM v0.10.0 Build type: Release LuaJIT 2.1.1716656478

Neorg setup

require("neorg").setup {
  load = {
    ["core.defaults"] = {},
    ["core.export"] = {},
    ["core.export.markdown"] = {},
    ["core.concealer"] = {},
    ["core.completion"] = {
      config = {
        engine = "nvim-cmp",
      },
    },
    ["core.dirman"] = {
      config = {
        workspaces = {
          notes = "~/Documents/notes/neorg",
        },
        default_workspace = "notes",
      },
    },
    ["core.integrations.image"] = {},
    ["core.latex.renderer"] = {
      config = {
        render_on_enter = true,
      },
    },
  },
}

Actual behavior

No latex is being rendered as I enter, I have to type :Neorg latex-render

Expected behavior

latex is not rendered when I opened the buffer

Steps to reproduce

Use this config:

-- Adapted from https://github.com/folke/lazy.nvim#-installation

-- Install lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
	vim.fn.system({
		"git",
		"clone",
		"--filter=blob:none",
		"https://github.com/folke/lazy.nvim.git",
		"--branch=stable", -- latest stable release
		lazypath,
	})
end
vim.opt.rtp:prepend(lazypath)

-- Set up both the traditional leader (for keymaps) as well as the local leader (for norg files)
vim.g.mapleader = " "
vim.g.maplocalleader = ","

require("lazy").setup({
	{
		"3rd/image.nvim",
		dependencies = { "luarocks.nvim" },
		config = true,
	},
	{
		"rebelot/kanagawa.nvim", -- neorg needs a colorscheme with treesitter support
		config = function()
			vim.cmd.colorscheme("kanagawa")
		end,
	},
	{
		"nvim-treesitter/nvim-treesitter",
		build = ":TSUpdate",
		opts = {
			ensure_installed = { "c", "lua", "vim", "vimdoc", "query" },
			highlight = { enable = true },
		},
		config = function(_, opts)
			require("nvim-treesitter.configs").setup(opts)
		end,
	},
	{
		"vhyrro/luarocks.nvim",
		priority = 1000,
		config = true,
	},
	{
		"nvim-neorg/neorg",
		dependencies = { "luarocks.nvim" },
		version = "*",
		config = function()
			require("neorg").setup({
				load = {
					["core.defaults"] = {},
					["core.concealer"] = {},
					["core.dirman"] = {
						config = {
							workspaces = {
								notes = "~/notes",
							},
							default_workspace = "notes",
						},
					},

					["core.latex.renderer"] = {
						config = {
							render_on_enter = true,
						},
					},
				},
			})

			vim.wo.foldlevel = 99
			vim.wo.conceallevel = 2
		end,
	},
})
nvim -u config.lua some_file_containing_latex.norg

Potentially conflicting plugins

None as I have a minimal reproduction.

Other information

None.

Help

Yes, but I don't know how to start. I would need guidance (check question below)

Implementation help

Tell me where should I start.

@glyh glyh added the bug Issues related to bugs. Please attach a severity, a priority and category with this label. label May 28, 2024
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

No branches or pull requests

1 participant