bypass reloading error when using pascal formatter
This commit is contained in:
parent
7452ee9b06
commit
b8c5c86010
|
@ -8,7 +8,6 @@ end
|
||||||
-- @short Verify installation of pascal tools or install them.
|
-- @short Verify installation of pascal tools or install them.
|
||||||
local function setup_pascal()
|
local function setup_pascal()
|
||||||
local check_ptop = { os.execute("which ptop") }
|
local check_ptop = { os.execute("which ptop") }
|
||||||
vim.cmd("set autoread")
|
|
||||||
|
|
||||||
-- if return value is 1, get ptop
|
-- if return value is 1, get ptop
|
||||||
if check_ptop == 1 then
|
if check_ptop == 1 then
|
||||||
|
@ -27,11 +26,13 @@ vim.api.nvim_create_autocmd({ "BufEnter" }, {
|
||||||
-- @param
|
-- @param
|
||||||
-- @short The format function for pascal.
|
-- @short The format function for pascal.
|
||||||
local function auto_format()
|
local function auto_format()
|
||||||
|
vim.cmd("checktime %")
|
||||||
local write_cmd = "ptop -c ~/.config/nvim/ptop.conf "
|
local write_cmd = "ptop -c ~/.config/nvim/ptop.conf "
|
||||||
.. vim.api.nvim_buf_get_name(0)
|
.. vim.api.nvim_buf_get_name(0)
|
||||||
.. " "
|
.. " "
|
||||||
.. vim.api.nvim_buf_get_name(0)
|
.. vim.api.nvim_buf_get_name(0)
|
||||||
os.execute(write_cmd)
|
os.execute(write_cmd)
|
||||||
|
vim.cmd("checktime %")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Add formatter command
|
-- Add formatter command
|
||||||
|
|
Loading…
Reference in New Issue