Skip to content

Commit

Permalink
feat: improve telescope cmds
Browse files Browse the repository at this point in the history
Former-commit-id: 3869c88
  • Loading branch information
silveiralexf committed Mar 17, 2024
1 parent b729b79 commit 1db06bb
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nvim/lua/config/lazy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ require("lazy").setup({
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- import any extras modules here
{ import = "lazyvim.plugins.extras.linting.eslint" },
{ import = "lazyvim.plugins.extras.lang.typescript" },
{ import = "lazyvim.plugins.extras.lang.docker" },
{ import = "lazyvim.plugins.extras.lang.go" },
{ import = "lazyvim.plugins.extras.lang.helm" },
{ import = "lazyvim.plugins.extras.lang.json" },
{ import = "lazyvim.plugins.extras.lang.rust" },
{ import = "lazyvim.plugins.extras.lang.typescript" },
{ import = "lazyvim.plugins.extras.linting.eslint" },
{ import = "lazyvim.plugins.extras.ui.mini-animate" },
{ import = "lazyvim.plugins.extras.vscode" },
-- import/override with your plugins
Expand Down
21 changes: 21 additions & 0 deletions nvim/lua/plugins/telescope.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,23 @@ return {
require("telescope").load_extension("undo")
end,
},
{
"xiyaowong/telescope-emoji.nvim",
keys = {
{ "<leader>se", "<cmd>Telescope emoji<cr>", desc = "Telescope search emoji" },
},
config = function()
require("telescope").load_extension("emoji")
end,
},
opts = {
pickers = {
find_files = {
hidden = true,
},
lsp_references = { include_declaration = false, show_line = false },
lsp_implementations = { show_line = false },
-- live_grep = { glob_pattern = { "!api/*", "!go.sum" } },
},
defaults = {
layout_strategy = "horizontal",
Expand Down Expand Up @@ -94,6 +106,10 @@ return {
layout_config = { prompt_position = "top" },
sorting_strategy = "ascending",
winblend = 0,
path_display = { shorten = 7, exclude = { 1, -1 } },
prompt_prefix = "🔭 ",
selection_caret = "",
vimgrep_arguments = { "rg", "--vimgrep", "--smart-case", "-M", "200" },
},
},
extensions = {
Expand All @@ -103,6 +119,11 @@ return {
}),
require("telescope.sorters").get_fzy_sorter({}),
},
["emoji"] = {
action = function(emoji)
vim.api.nvim_put({ emoji.value }, "b", false, true)
end,
},
},
setup = function()
vim.cmd([[packadd nvim-telescope/telescope]])
Expand Down

0 comments on commit 1db06bb

Please sign in to comment.