From ff458cbbd4333560eb9c5093c03f38de19470bc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taneli=20M=C3=A4kihannu?= Date: Sun, 25 Feb 2024 23:08:50 +0200 Subject: [PATCH] feat: add option to set nonumbers for popup windows (#385) --- lua/chatgpt/code_edits.lua | 4 +++- lua/chatgpt/config.lua | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/chatgpt/code_edits.lua b/lua/chatgpt/code_edits.lua index 1e77f017..1b02a830 100644 --- a/lua/chatgpt/code_edits.lua +++ b/lua/chatgpt/code_edits.lua @@ -127,7 +127,9 @@ local setup_and_mount = vim.schedule_wrap(function(lines, output_lines, ...) -- set input and output settings for _, window in ipairs({ input_window, output_window }) do vim.api.nvim_buf_set_option(window.bufnr, "filetype", filetype) - vim.api.nvim_win_set_option(window.winid, "number", true) + if Config.options.show_line_numbers ~= false then + vim.api.nvim_win_set_option(window.winid, "number", true) + end end end) diff --git a/lua/chatgpt/config.lua b/lua/chatgpt/config.lua index 6d023e3d..681a21cc 100644 --- a/lua/chatgpt/config.lua +++ b/lua/chatgpt/config.lua @@ -11,6 +11,7 @@ function M.defaults() api_key_cmd = nil, yank_register = "+", extra_curl_params = nil, + show_line_numbers = true, edit_with_instructions = { diff = false, keymaps = {