Skip to content

Commit

Permalink
feat(nvim): set neotest and neotest-golang log levels
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikaverpil committed Dec 27, 2024
1 parent f5eb7d7 commit ea53555
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
14 changes: 1 addition & 13 deletions nvim-fredrik/lua/fredrik/plugins/core/neotest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ return {
-- Enable/disable animation of icons.
animated = true,
},
log_level = vim.log.levels.WARN, -- increase to DEBUG when troubleshooting
},
config = function(_, opts)
if opts.adapters then
Expand Down Expand Up @@ -96,19 +97,6 @@ return {

-- Set up Neotest.
require("neotest").setup(opts)

-- enable logging
local log = false
if log == true then
local filepath = require("neotest.logging"):get_filename()
vim.notify("Erasing Neotest log file: " .. filepath, vim.log.levels.WARN)
vim.fn.writefile({ "" }, filepath)

-- Enable during Neotest adapter development only.
local log_level = vim.log.levels.DEBUG
vim.notify("Logging for Neotest enabled", vim.log.levels.WARN)
require("neotest.logging"):set_level(log_level)
end
end,
keys = require("fredrik.config.keymaps").setup_neotest_keymaps(),
},
Expand Down
1 change: 1 addition & 0 deletions nvim-fredrik/lua/fredrik/plugins/lang/go.lua
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ return {
},
runner = "gotestsum",
gotestsum_args = { "--format=standard-verbose" },
log_level = vim.log.levels.WARN,

-- experimental
dev_notifications = true,
Expand Down

0 comments on commit ea53555

Please sign in to comment.