From cec01c55533855aadac045125dffe075956d261f Mon Sep 17 00:00:00 2001 From: XXiaoA Date: Sat, 6 Apr 2024 11:17:41 +0800 Subject: [PATCH] fix: set the popup window to markdown filetype --- lua/gp/init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/gp/init.lua b/lua/gp/init.lua index aea59a9..a7bb519 100644 --- a/lua/gp/init.lua +++ b/lua/gp/init.lua @@ -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")