Skip to content

Commit

Permalink
fix: set the popup window to markdown filetype
Browse files Browse the repository at this point in the history
  • Loading branch information
XXiaoA committed Apr 12, 2024
1 parent 52938ff commit cec01c5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/gp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1573,6 +1573,8 @@ M.open_buf = function(file_name, target, kind, toggle)
-- read file into buffer and force write it
vim.api.nvim_command("silent 0read " .. file_name)
vim.api.nvim_command("silent file " .. file_name)
-- set the filetype to markdown
vim.api.nvim_buf_set_option(buf, "filetype", "markdown")
else
-- move cursor to the beginning of the file and scroll to the end
M._H.feedkeys("ggG", "xn")
Expand Down

0 comments on commit cec01c5

Please sign in to comment.