summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2023-01-24 22:57:43 +0100
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2023-01-24 22:57:43 +0100
commit7f9bc5193cf27e1546c093bd809651623952a9dd (patch)
tree670ab31769418bdbed969042f866a51e1337bdf0
parentb3e07fe32e3d1b7bc1f098f6a9d5e011d6f20f82 (diff)
Set concellevel for orgmode with autocmd
-rw-r--r--fnl/plugins/tools/orgmode.fnl2
-rw-r--r--fnl/settings/autocmds.fnl5
2 files changed, 5 insertions, 2 deletions
diff --git a/fnl/plugins/tools/orgmode.fnl b/fnl/plugins/tools/orgmode.fnl
index be96fd7..bb67b88 100644
--- a/fnl/plugins/tools/orgmode.fnl
+++ b/fnl/plugins/tools/orgmode.fnl
@@ -13,8 +13,6 @@
(fn setup []
(let [orgmode (require :orgmode)]
- (tset vim.opt :conceallevel 2)
- (tset vim.opt :concealcursor :nc)
(orgmode.setup_ts_grammar)
(orgmode.setup opts)))
diff --git a/fnl/settings/autocmds.fnl b/fnl/settings/autocmds.fnl
index 27d6c2d..f6b02ea 100644
--- a/fnl/settings/autocmds.fnl
+++ b/fnl/settings/autocmds.fnl
@@ -13,6 +13,11 @@
(tset vim.opt_local :number false)
(tset vim.opt_local :relativenumber false))}]
[:BufWinEnter {:command "setlocal formatoptions-=cro"}]
+ [:FileType
+ {:pattern :org
+ :callback (fn []
+ (tset vim.opt_local :conceallevel 2)
+ (tset vim.opt_local :concealcursor :nc))}]
[:FileType {:pattern :qf :command "set nobuflisted"}]
[:FileType {:pattern [:gitcommit :markdown] :command "setlocal wrap"}]
[:FileType