We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7485fbf commit 92bd3d8Copy full SHA for 92bd3d8
lua/flygrep.lua
@@ -15,6 +15,8 @@ if not ok then
15
ok, cmp = pcall(require, 'cmp')
16
end
17
18
+local log = require('flygrep.logger')
19
+
20
local grep_root_dir = '.'
21
22
local grep_timer_id = -1
@@ -474,6 +476,7 @@ function M.open(opt)
474
476
else
475
477
grep_root_dir = vim.fn.getcwd()
478
479
+ log.info('flygrep cwd:' .. grep_root_dir)
480
open_win()
481
482
lua/flygrep/logger.lua
@@ -0,0 +1,14 @@
1
+local M = {}
2
+local logger
3
+function M.info(msg)
4
+ if not logger then
5
+ pcall(function()
6
+ logger = require('logger').derive('flygrep')
7
+ logger.info(msg)
8
+ end)
9
+ else
10
11
+ end
12
+end
13
14
+return M
0 commit comments