Skip to content

Commit

Permalink
Fix orgmode filetype not being detected open first opening buffer usi…
Browse files Browse the repository at this point in the history
…ng find api
  • Loading branch information
chipsenkbeil committed Jun 3, 2024
1 parent 7043c58 commit 5b88c8c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/org-roam/api/node.lua
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,9 @@ local function roam_find(roam, opts)
-- in case we did something like close that window inbetween
pcall(vim.api.nvim_set_current_win, winnr)

-- Load the file and re-apply filetype to trigger orgmode filetype processing
vim.cmd("edit! " .. node.file)
vim.cmd("filetype detect")

-- Force ourselves back into normal mode
vim.cmd.stopinsert()
Expand Down

0 comments on commit 5b88c8c

Please sign in to comment.