add load_paths
This commit is contained in:
parent
dd473593d5
commit
d38c691151
2 changed files with 49 additions and 0 deletions
37
README.org
37
README.org
|
|
@ -31,6 +31,9 @@ you to add anything extra to your ~init.el~.
|
|||
opts = {
|
||||
-- by default, none are enabled
|
||||
langs = { "python", "lua", ... }
|
||||
|
||||
-- paths to emacs packages to additionally load
|
||||
load_paths = {}
|
||||
}
|
||||
},
|
||||
#+end_src
|
||||
|
|
@ -67,3 +70,37 @@ Tangles all blocks in range. If the range is NOT ~%~, the tangled file will
|
|||
likely only contain the contents of the last block, which is expected
|
||||
behaviour.
|
||||
|
||||
** Advanced Configuration
|
||||
*** Adding extra org-mode languages
|
||||
|
||||
Your emacs ~init.el~ will *not* be sourced during execution of ~:OrgExecute~ and
|
||||
~:OrgTangle~, so packages you install there wont be available.
|
||||
|
||||
However, ~orgmode-babel.nvim~ allows us to specify extra load paths, so we can
|
||||
make packages available that way.
|
||||
|
||||
**** Example
|
||||
|
||||
As an example, lets add [[https://github.com/arnm/ob-mermaid][ob-mermaid]] for
|
||||
mermaid functionality in ~orgmode-babel.nvim~!
|
||||
|
||||
We have two options to get the package. We could either create an
|
||||
=~/.emacs.d/init.el= and install it through a package manager, which will likely
|
||||
have a randomish name, or for the sake of simplicity and this being a neovim
|
||||
plugin, we can simply manually clone the repo to a known location.
|
||||
|
||||
#+begin_example
|
||||
git clone https://github.com/arnm/ob-mermaid ~/.../clone-location/ob-mermaid
|
||||
#+end_example
|
||||
|
||||
#+begin_src lua
|
||||
{
|
||||
"mrshmllow/orgmode-babel.nvim",
|
||||
...
|
||||
opts = {
|
||||
langs = { ..., "mermaid" }
|
||||
load_paths = { "~/.../clone-location/ob-mermaid" }
|
||||
}
|
||||
},
|
||||
#+end_src
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue