summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-03-21 18:54:19 +0100
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-03-21 18:54:19 +0100
commitce7fdad6980da2d2d623f635fcf0fa1f547119a3 (patch)
tree9eb35e65c73ad1144db72a82784686cdfb264dad /lua
parent3101228d2df993e0325ed23372bb289ec1a15afe (diff)
build: add orgmode
Diffstat (limited to 'lua')
-rw-r--r--lua/config/init.lua1
-rw-r--r--lua/config/orgmode.lua12
-rw-r--r--lua/config/treesitter.lua6
-rw-r--r--lua/plugins.lua1
4 files changed, 17 insertions, 3 deletions
diff --git a/lua/config/init.lua b/lua/config/init.lua
index e2d0d27..0bd4360 100644
--- a/lua/config/init.lua
+++ b/lua/config/init.lua
@@ -20,3 +20,4 @@ require "config.hop"
require "config.zen"
require "config.spectre"
require "config.colorizer"
+require "config.orgmode"
diff --git a/lua/config/orgmode.lua b/lua/config/orgmode.lua
new file mode 100644
index 0000000..82dac48
--- /dev/null
+++ b/lua/config/orgmode.lua
@@ -0,0 +1,12 @@
+local status_ok, orgmode = pcall(require, "orgmode")
+if not status_ok then
+ return
+end
+
+-- Load custom tree-sitter grammar for org filetype
+orgmode.setup_ts_grammar()
+
+orgmode.setup {
+ org_agenda_files = { "~/.local/share/org/**/*" },
+ org_default_notes_file = "~/.local/share/org/refile.org",
+}
diff --git a/lua/config/treesitter.lua b/lua/config/treesitter.lua
index 277d286..475eeee 100644
--- a/lua/config/treesitter.lua
+++ b/lua/config/treesitter.lua
@@ -7,7 +7,7 @@ if not status_ok then
end
treesitter.setup {
- ensure_installed = "maintained",
+ ensure_installed = { "maintained", "org" },
sync_install = false,
ignore_install = { "" }, -- List of parsers to ignore installing
autopairs = {
@@ -15,8 +15,8 @@ treesitter.setup {
},
highlight = {
enable = true, -- false will disable the whole extension
- disable = { "" }, -- list of language that will be disabled
- additional_vim_regex_highlighting = true,
+ disable = { "org" }, -- list of language that will be disabled
+ additional_vim_regex_highlighting = { "org" }, -- Required since TS highlighter doesn't support all syntax features (conceal)
},
context_commentstring = {
enable = true,
diff --git a/lua/plugins.lua b/lua/plugins.lua
index cdba7df..bf156bb 100644
--- a/lua/plugins.lua
+++ b/lua/plugins.lua
@@ -63,4 +63,5 @@ return {
event = "BufRead",
},
{ "norcalli/nvim-colorizer.lua" },
+ { "nvim-orgmode/orgmode" },
}