Skip to content

Commit ea9a944

Browse files
Make OrgDiagnostics command available only in org buffers.
1 parent 96392af commit ea9a944

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

ftplugin/org.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,5 @@ setlocal omnifunc=OrgmodeOmni
3232
setlocal commentstring=#\ %s
3333
inoreabbrev <silent><buffer> :today: <<C-R>=luaeval("require('orgmode.objects.date').today():to_string()")<CR>>
3434
inoreabbrev <silent><buffer> :now: <<C-R>=luaeval("require('orgmode.objects.date').now():to_string()")<CR>>
35+
36+
command! -buffer OrgDiagnostics lua require('orgmode.org.diagnostics').print()

lua/orgmode/init.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ function Org:setup_autocmds()
5656
vim.cmd([[autocmd FileType org call luaeval('require("orgmode").reload(_A)', expand('<afile>:p'))]])
5757
vim.cmd([[autocmd CursorHold,CursorHoldI *.org,*.org_archive lua require('orgmode.org.diagnostics').report()]])
5858
vim.cmd([[augroup END]])
59-
vim.cmd([[command! OrgDiagnostics lua require('orgmode.org.diagnostics').print()]])
6059
end
6160

6261
---@param opts? table

0 commit comments

Comments
 (0)