add custom telescope functions
This commit is contained in:
parent
96e23cd457
commit
95ff6fbab5
3 changed files with 26 additions and 2 deletions
3
nvim/lua/.luarc.json
Normal file
3
nvim/lua/.luarc.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"workspace.checkThirdParty": false
|
||||
}
|
|
@ -5,7 +5,6 @@ null_ls.setup({
|
|||
-- FORMATTING
|
||||
null_ls.builtins.formatting.stylua,
|
||||
null_ls.builtins.formatting.eslint,
|
||||
null_ls.builtins.formatting.prettierd,
|
||||
-- DIAGNOSTICS
|
||||
null_ls.builtins.diagnostics.eslint,
|
||||
-- COMPLETIONS
|
||||
|
|
|
@ -1,8 +1,30 @@
|
|||
-- TELESCOPE
|
||||
require("telescope").setup {
|
||||
defaults = {
|
||||
-- ....
|
||||
},
|
||||
pickers = {
|
||||
find_files = {
|
||||
find_command = { "fd",
|
||||
"--type", "f",
|
||||
"--strip-cwd-prefix",
|
||||
-- "--exclude", "node_modules",
|
||||
"--exclude", ".git",
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
-- FUNCTIONS
|
||||
local function find()
|
||||
require("telescope.builtin").find_files {
|
||||
hidden = true
|
||||
}
|
||||
end
|
||||
|
||||
-- KEYMAPS
|
||||
vim.keymap.set('n', '<C-y>', '<cmd>Telescope buffers<CR>')
|
||||
vim.keymap.set('n', '<leader>f', '<cmd>Telescope find_files<CR>')
|
||||
vim.keymap.set('n', '<leader>f', find)
|
||||
vim.keymap.set('n', '<leader>l', '<cmd>Telescope live_grep<CR>')
|
||||
vim.keymap.set('n', '<silent> gy', '<cmd>Telescope treesitter<CR>')
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue