fix: Don't log so much for users. Fix #91

This commit is contained in:
TJ DeVries
2020-09-22 10:04:02 -04:00
parent be9a0e5236
commit 941fb160c5
2 changed files with 4 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
return require('plenary.log').new { return require('plenary.log').new {
plugin = 'telescope', plugin = 'telescope',
level = 'info', level = (vim.loop.os_getenv("USER") == 'tj' and 'debug') or 'info',
} }

View File

@@ -581,7 +581,7 @@ function Picker:set_selection(row)
end end
if not self:can_select_row(row) then if not self:can_select_row(row) then
log.info("Cannot select row:", row, self.manager:num_results(), self.max_results) log.debug("Cannot select row:", row, self.manager:num_results(), self.max_results)
return return
end end
@@ -665,7 +665,7 @@ end
-- TODO: We should consider adding `process_bulk` or `bulk_entry_manager` for things -- TODO: We should consider adding `process_bulk` or `bulk_entry_manager` for things
-- that we always know the items and can score quickly, so as to avoid drawing so much. -- that we always know the items and can score quickly, so as to avoid drawing so much.
pickers.entry_manager = function(max_results, set_entry, info) pickers.entry_manager = function(max_results, set_entry, info)
log.debug("Creating entry_manager...") log.trace("Creating entry_manager...")
info = info or {} info = info or {}
info.looped = 0 info.looped = 0