add custom telescope functions

This commit is contained in:
Jidbo 2023-02-23 15:29:31 +01:00 committed by saibotk
parent 96e23cd457
commit 95ff6fbab5
Signed by: saibotk
GPG key ID: 67585F0065E261D5
3 changed files with 26 additions and 2 deletions

3
nvim/lua/.luarc.json Normal file
View file

@ -0,0 +1,3 @@
{
"workspace.checkThirdParty": false
}

View file

@ -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

View file

@ -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>')