Skip to content

Commit e276674

Browse files
dam9000Peter-McKinney
authored andcommitted
Run stylua (nvim-lua#525)
1 parent 0fbc1d9 commit e276674

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

init.lua

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -395,17 +395,17 @@ local function find_git_root()
395395
local current_dir
396396
local cwd = vim.fn.getcwd()
397397
-- If the buffer is not associated with a file, return nil
398-
if current_file == "" then
398+
if current_file == '' then
399399
current_dir = cwd
400400
else
401401
-- Extract the directory from the current file's path
402-
current_dir = vim.fn.fnamemodify(current_file, ":h")
402+
current_dir = vim.fn.fnamemodify(current_file, ':h')
403403
end
404404

405405
-- Find the Git root directory from the current file's path
406-
local git_root = vim.fn.systemlist("git -C " .. vim.fn.escape(current_dir, " ") .. " rev-parse --show-toplevel")[1]
406+
local git_root = vim.fn.systemlist('git -C ' .. vim.fn.escape(current_dir, ' ') .. ' rev-parse --show-toplevel')[1]
407407
if vim.v.shell_error ~= 0 then
408-
print("Not a git repository. Searching on current working directory")
408+
print 'Not a git repository. Searching on current working directory'
409409
return cwd
410410
end
411411
return git_root
@@ -415,9 +415,9 @@ end
415415
local function live_grep_git_root()
416416
local git_root = find_git_root()
417417
if git_root then
418-
require('telescope.builtin').live_grep({
419-
search_dirs = {git_root},
420-
})
418+
require('telescope.builtin').live_grep {
419+
search_dirs = { git_root },
420+
}
421421
end
422422
end
423423

@@ -688,7 +688,7 @@ cmp.setup {
688688
end,
689689
},
690690
completion = {
691-
completeopt = 'menu,menuone,noinsert'
691+
completeopt = 'menu,menuone,noinsert',
692692
},
693693
mapping = cmp.mapping.preset.insert {
694694
['<C-n>'] = cmp.mapping.select_next_item(),

0 commit comments

Comments
 (0)