Orgmode clone written in Lua for Neovim 0.9.2+
Setup • Docs • Showcase • Treesitter • Troubleshoot • Plugins • Contributing • Kudos
Use your favourite package manager:
{
'nvim-orgmode/orgmode',
dependencies = {
{ 'nvim-treesitter/nvim-treesitter', lazy = true },
},
event = 'VeryLazy',
config = function()
-- Load treesitter grammar for org
require('orgmode').setup_ts_grammar()
-- Setup treesitter
require('nvim-treesitter.configs').setup({
highlight = {
enable = true,
},
ensure_installed = { 'org' },
})
-- Setup orgmode
require('orgmode').setup({
org_agenda_files = '~/orgfiles/**/*',
org_default_notes_file = '~/orgfiles/refile.org',
})
end,
}
use {'nvim-treesitter/nvim-treesitter'}
use {'nvim-orgmode/orgmode', config = function()
require('orgmode').setup{}
end
}
Plug 'nvim-treesitter/nvim-treesitter'
Plug 'nvim-orgmode/orgmode'
call dein#add('nvim-treesitter/nvim-treesitter')
call dein#add('nvim-orgmode/orgmode')
Note that this setup is not needed for lazy.nvim since instructions above covers full setup
-- init.lua
-- Load custom treesitter grammar for org filetype
require('orgmode').setup_ts_grammar()
-- Treesitter configuration
require('nvim-treesitter.configs').setup {
highlight = {
enable = true,
},
ensure_installed = {'org'}, -- Or run :TSUpdate org
}
require('orgmode').setup({
org_agenda_files = {'~/Dropbox/org/*', '~/my-orgs/**/*'},
org_default_notes_file = '~/Dropbox/org/refile.org',
})
Or if you are using init.vim
, wrap the above snippet like so:
" init.vim
lua << EOF
require('orgmode').setup_ts_grammar() ...
EOF
require('cmp').setup({
sources = {
{ name = 'orgmode' }
}
})
vim.g.completion_chain_complete_list = {
org = {
{ mode = 'omni'},
},
}
-- add additional keyword chars
vim.cmd[[autocmd FileType org setlocal iskeyword+=:,#,+]]
Or just use omnifunc
via <C-x><C-o>
If you are new to Orgmode, see Getting started section in the Docs or a hands-on tutorial in our wiki.
The built-in treesitter parser is used for parsing the org files. Highlights are experimental and partially supported.
#BEGIN_SRC filetype
blocksMake sure you are not overriding indentexpr in Org buffers with nvim-treesitter indentation
treesitter/query.lua
errors when opening agenda/capture prompt or org filesMake sure you are using latest changes from tree-sitter-org grammar.
by running :TSUpdate org
and restarting the editor.
Dates are generated with Lua native date support, and it reads your current locale when creating them.
To use different locale you can add this to your init.lua
:
vim.cmd('language en_US.utf8')
or init.vim
language en_US.utf8
Just make sure you have en_US
locale installed on your system. To see what you have available on the system you can
start the command :language
and press <TAB>
to autocomplete possible options.
Links are concealed with Vim's conceal feature (see :help conceal
). To enable concealing, add this to your init.lua
:
vim.opt.conceallevel = 2
vim.opt.concealcursor = 'nc'
Or if you are using init.vim
:
set conceallevel=2
set concealcursor=nc
If you are using Windows, paths are by default written with backslashes.
To use forward slashes, you must enable shellslash
option (see :help 'shellslash'
).
vim.opt.shellslash = true
Or if you are using init.vim
:
set shellslash
More info on issue #281
emacs
, pandoc
and custom export options)<2021-06-11 Fri 11:00 -1d>
<2021-06-11 Fri 11:00 -2d>
<2021-06-11 Fri 11:00 +1w>
<2021-06-11 Fri 11:00 ++1w>
<2021-06-11 Fri 11:00 .+1w>
<2021-06-11 Fri 11:00-12:30>
<2021-06-11 Fri 11:00-12:30>--<2021-06-13 Sun 22:00>
#+BEGIN_SRC filetype
)emacs
, pandoc
and custom export options)Link to detailed documentation: DOCS
See all available plugins on orgmode-nvim
If you built a plugin please add "orgmode-nvim" topic to it.
NOTE: None of the Emacs Orgmode plugins will be built into nvim-orgmode. Anything that's a separate plugin in Emacs Orgmode should be a separate plugin in here. The point of this plugin is to provide functionality that's built into Emacs Orgmode core, and a good foundation for external plugins. If you want to build a plugin, post suggestions and improvements on Plugins infrastructure issue.
Documentation for our work-in-progress API can be found here
See CONTRIBUTING.md
If you are just starting out with orgmode, have a look at the Getting Started section in our wiki.
Vim documentation is auto generated from DOCS.md file with md2vim.
Hosted documentation is on: https://nvim-orgmode.github.io/