formatting

This commit is contained in:
2024-10-03 17:59:08 +03:00
parent 1a2df25f5e
commit 758322bd93

View File

@@ -1,31 +1,31 @@
return {
"FabianWirth/search.nvim",
'FabianWirth/search.nvim',
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
'nvim-lua/plenary.nvim',
'nvim-telescope/telescope.nvim',
},
version = "0.1.6",
version = '0.1.6',
config = function()
local telescope = require('telescope')
local telescopeConfig = require('telescope.config')
local vimgrep_arguments = { unpack(telescopeConfig.values.vimgrep_arguments) }
table.insert(vimgrep_arguments, "--hidden")
table.insert(vimgrep_arguments, "--glob")
table.insert(vimgrep_arguments, "!**/.git/*")
table.insert(vimgrep_arguments, '--hidden')
table.insert(vimgrep_arguments, '--glob')
table.insert(vimgrep_arguments, '!**/.git/*')
telescope.setup({
defaults = {
vimgrep_arguments = vimgrep_arguments,
file_ignore_patterns = {
"node_modules",
'node_modules',
}
},
pickers = {
find_files = {
find_command = { "rg", "--files", "--hidden", "--glob", "!**/.git/*" },
find_command = { 'rg', '--files', '--hidden', '--glob', '!**/.git/*' },
}
}
})
@@ -45,7 +45,7 @@ return {
},
append_tabs = { -- append_tabs will add the provided tabs to the default ones
{
'Commits', -- or name = "Commits"
'Commits', -- or name = 'Commits'
builtin.git_commits, -- or tele_func = require('telescope.builtin').git_commits
available = function() -- optional
return vim.fn.isdirectory('.git') == 1
@@ -59,16 +59,17 @@ return {
search.open({ tab_name = 'Buffers' })
end)
vim.keymap.set('n', '<leader>pws', function()
local word = vim.fn.expand("<cword>")
local word = vim.fn.expand('<cword>')
builtin.grep_string({ search = word })
end)
vim.keymap.set('n', '<leader>pWs', function()
local word = vim.fn.expand("<cWORD>")
local word = vim.fn.expand('<cWORD>')
builtin.grep_string({ search = word })
end)
vim.keymap.set('n', '<leader>ps', function()
builtin.grep_string({ search = vim.fn.input("Grep > ") })
builtin.grep_string({ search = vim.fn.input('Grep > ') })
end)
vim.keymap.set('n', '<leader>vh', builtin.help_tags, {})
end
}