From beca3c6d6c78d38887887d23302d9e2c969935de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3n=C3=A1n=20Carrigan?= Date: Mon, 31 Oct 2022 14:00:32 +0000 Subject: [PATCH] feat(output): set filetype for output buffer See #135 --- lua/neotest/client/init.lua | 2 +- lua/neotest/consumers/output.lua | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/lua/neotest/client/init.lua b/lua/neotest/client/init.lua index 076abd6c..6ca401a4 100644 --- a/lua/neotest/client/init.lua +++ b/lua/neotest/client/init.lua @@ -209,7 +209,7 @@ end ---@return string, neotest.Adapter function NeotestClient:get_adapter(file_path) self:ensure_started() - return self:_get_adapter(file_path, nil, false) + return self:_get_adapter(file_path, nil) end ---@private diff --git a/lua/neotest/consumers/output.lua b/lua/neotest/consumers/output.lua index 123f0865..0b6b5e41 100644 --- a/lua/neotest/consumers/output.lua +++ b/lua/neotest/consumers/output.lua @@ -92,13 +92,7 @@ local function open_output(result, opts) win = float.win_id end - async.api.nvim_buf_set_keymap(buf, "n", "q", "", { - noremap = true, - silent = true, - callback = function() - pcall(vim.api.nvim_win_close, win, true) - end, - }) + vim.api.nvim_buf_set_option(buf, "filetype", "neotest-output") end local neotest = {}