doom-neovim / doom-nvim

A Neovim configuration for the advanced martian hacker
GNU General Public License v2.0
1.01k stars 107 forks source link

[QUESTION] How do I add Orgmode.nvim package to plugins #268

Closed romanakmath closed 2 years ago

romanakmath commented 2 years ago

I started using neovim today and having used doom-emacs until now, I downloaded doom-nvim. The natural question coming to me is how I would add Orgmode package to my config. From my very naive understanding I tried to write

M.plugins = {
use {'nvim-treesitter/nvim-treesitter'}
use {'nvim-orgmode/orgmode', config = function()
        require('orgmode').setup{} 
}

in doom_userplugins.lua which produces error. What are the exact steps to get this plugin working?

Since there is no Melpa I guess I have to download the zip file and refer to the directory, I tried it with some other plugin named vim dotoo by writing

M.plugins = {
     -- '~/vim-dotoo'
}

but this hasn't worked out neither.

connorgmeehan commented 2 years ago

In the doom_userplugins.lua file there is no need to call packer's use function (doom-nvim will do this behind the hood). Here's my doom_userplugins.lua as an example:

M.plugins = {
-- Lua scratchpad
    { 'rafcamlet/nvim-luapad' },
    -- Themes
    { 'sainnhe/sonokai' },
    { 'sainnhe/edge' },
    { 'tpope/vim-surround' },
    { 'psliwka/vim-smoothie' },
    {
      'nvim-treesitter/playground',
      after = "nvim-treesitter",
    },
    {
            "danymat/neogen", 
        config = function()
        require('neogen').setup {
          enabled = true,
          languages = {
                    lua = {
                    template = {
                annotation_convention = "emmylua" -- for a full list of annotation_conventions, see supported-languages below,
                            }
                    },
            }
                }
            local opts = { noremap = true, silent = true }
            vim.api.nvim_set_keymap("n", "<Leader>cg", ":lua require('neogen').generate()<CR>", opts)
        end,
        after = 'nvim-treesitter',
    }
}

So for your example you'd have to write

M.plugins = {
    {'nvim-treesitter/nvim-treesitter'}
    {'nvim-orgmode/orgmode', config = function()
        require('orgmode').setup{} 
}

And to add the vim-dotoo local plugin you'd write

M.plugins = {
     { '~/vim-dotoo' }
}