Skip to content

Commit

Permalink
Use notify for logging
Browse files Browse the repository at this point in the history
  • Loading branch information
JafarAbdi committed Aug 26, 2024
1 parent 7bef982 commit ff7e62c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions neovim/.config/nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,12 @@ local runners = {
end
if is_test then
if not file_path:match("^test_") and not file_path:match("_test%.py$") then
print(
vim.notify(
string.format(
"Test file '%s' doesn't start/end with 'test_'/'_test' and will be ignored by pytest",
file_path
)
),
vim.log.levels.WARN
)
end
return {
Expand Down Expand Up @@ -321,10 +322,10 @@ local run_file = function(is_test)
if not filetype or filetype == "" then
return
end
vim.print(filetype)

local runner = runners[filetype]
if not runner then
vim.notify("No runner found for filetype: '" .. filetype .. "'", vim.log.levels.WARN)
return
end

Expand Down

0 comments on commit ff7e62c

Please sign in to comment.