@@ -324,17 +324,17 @@ local function find_git_root()
324
324
local current_dir
325
325
local cwd = vim .fn .getcwd ()
326
326
-- If the buffer is not associated with a file, return nil
327
- if current_file == " " then
327
+ if current_file == ' ' then
328
328
current_dir = cwd
329
329
else
330
330
-- Extract the directory from the current file's path
331
- current_dir = vim .fn .fnamemodify (current_file , " :h " )
331
+ current_dir = vim .fn .fnamemodify (current_file , ' :h ' )
332
332
end
333
333
334
334
-- Find the Git root directory from the current file's path
335
- local git_root = vim .fn .systemlist (" git -C " .. vim .fn .escape (current_dir , " " ) .. " rev-parse --show-toplevel" )[1 ]
335
+ local git_root = vim .fn .systemlist (' git -C ' .. vim .fn .escape (current_dir , ' ' ) .. ' rev-parse --show-toplevel' )[1 ]
336
336
if vim .v .shell_error ~= 0 then
337
- print ( " Not a git repository. Searching on current working directory" )
337
+ print ' Not a git repository. Searching on current working directory'
338
338
return cwd
339
339
end
340
340
return git_root
344
344
local function live_grep_git_root ()
345
345
local git_root = find_git_root ()
346
346
if git_root then
347
- require (' telescope.builtin' ).live_grep ( {
348
- search_dirs = {git_root },
349
- })
347
+ require (' telescope.builtin' ).live_grep {
348
+ search_dirs = { git_root },
349
+ }
350
350
end
351
351
end
352
352
@@ -567,7 +567,7 @@ cmp.setup {
567
567
end ,
568
568
},
569
569
completion = {
570
- completeopt = ' menu,menuone,noinsert'
570
+ completeopt = ' menu,menuone,noinsert' ,
571
571
},
572
572
mapping = cmp .mapping .preset .insert {
573
573
[' <C-n>' ] = cmp .mapping .select_next_item (),
0 commit comments