jbyuki / nabla.nvim

take your scientific notes :pencil2: in Neovim
MIT License
581 stars 17 forks source link

Configuration example for lazy.nvim plugin manager in readme #62

Closed Vaisakhkm2625 closed 1 year ago

Vaisakhkm2625 commented 1 year ago

I am recently started using nabla, and i am loving it....

This is request to add installation instructions for lazy.nvim plugin manager Readme file.

  {
    "jbyuki/nabla.nvim",
    keys = {
      { "<leader>nl", function() require("nabla").popup() end, desc = "Notation", },
    },
    config = function()
      require("nabla").enable_virt()
    end,
  },

got it from a medium article (https://alpha2phi.medium.com/modern-neovim-pde-part-2-679a5fc0a407)

i tried to mess around a lot of time to get this working... first i tried this, which was throwing errors

  {
    "jbyuki/nabla.nvim",
    opts = {
      autogen = true, -- auto-regenerate ASCII art when exiting insert mode
      silent = true, -- silents error messages
    },
  },
jbyuki commented 1 year ago

A few points maybe that could help:

Hope this helps. If it's functional, we can also merge that for other people to see as lazy.nvim is far more used than packer.nvim.

jbyuki commented 1 year ago

I guess

{
   "jybuki/nabla.nvim"
}

is already a good starting point. It's the equivalent to the other install instructions and users can always configure their setup in separate .lua config files.

Vaisakhkm2625 commented 1 year ago

so can i close this issue?

(or is it okk to add above points to wiki?)

jbyuki commented 1 year ago

Discussion is still open but we can close this for now.

thiswillbeyourgithub commented 1 week ago

I guess

{
   "jybuki/nabla.nvim"
}

is already a good starting point. It's the equivalent to the other install instructions and users can always configure their setup in separate .lua config files.

You made a typo in your username. I was pulling my hair for nothing :)

thiswillbeyourgithub commented 1 week ago

If anyone is wondering how to add nabla to neovim using lazy here's how I did:

In my lazy.lua:

-- https://github.com/jbyuki/nabla.nvim/issues/35
vim.api.nvim_set_keymap("", "<leader>p", ":lua require('nabla').toggle_virt({autogen=true, silent=true})<CR>", { noremap = true, silent = true }) -- leader+p to toggle displaying the equation
require("nabla").enable_virt({autogen=true, silent=true}) --enabled by default

In my plugins.lua:

    {
    "jbyuki/nabla.nvim"
    }
Vaisakhkm2625 commented 1 week ago

If anyone is wondering how to add nabla to neovim using lazy here's how I did:

In my lazy.lua:

-- https://github.com/jbyuki/nabla.nvim/issues/35
vim.api.nvim_set_keymap("", "<leader>p", ":lua require('nabla').toggle_virt({autogen=true, silent=true})<CR>", { noremap = true, silent = true }) -- leader+p to toggle displaying the equation
require("nabla").enable_virt({autogen=true, silent=true}) --enabled by default

In my plugins.lua:

    {
    "jbyuki/nabla.nvim"
    }

it would be nice if you could enable syntax highlighting 😅 (you can use ```lua <code> ``` for it )

i was also working on a similar plugin that works without ascii rendering (https://github.com/Vaisakhkm2625/hologram-math-preview.nvim), instead uses terminal image protocols to show image of latex equation (uses tectonic under the hood, so no need to install 1000s of dependencies of texlive just for showing some eqs), though i didn't had time for quiet a while, so need to work on it in the future..

other plugins might do the same (this is old list ) - https://gist.github.com/Vaisakhkm2625/909d9222e2883648635954f1323bc4e3

thiswillbeyourgithub commented 1 week ago

it would be nice if you could enable syntax highlighting 😅 (you can use lua <code> for it )

Done! Thanks

Nice work on your plugin. I'll try to keep an eye on it!