change sorting for telescope file finder, include hidden files
This commit is contained in:
parent
5cb249c23c
commit
8cd42134d8
1 changed files with 45 additions and 2 deletions
|
|
@ -1,4 +1,47 @@
|
||||||
|
-- Telescope
|
||||||
return {
|
return {
|
||||||
"nvim-telescope/telescope.nvim", tag = "0.1.4",
|
"nvim-telescope/telescope.nvim", tag = "0.1.4",
|
||||||
dependencies = { "nvim-lua/plenary.nvim" }
|
dependencies = {
|
||||||
}
|
{ "nvim-lua/plenary.nvim" }
|
||||||
|
},
|
||||||
|
config = function(lazy, opts)
|
||||||
|
local telescope = require('telescope')
|
||||||
|
telescope.load_extension('fzf')
|
||||||
|
telescope.setup({
|
||||||
|
defaults = {
|
||||||
|
sorting_strategy = "ascending",
|
||||||
|
wrap_result = true,
|
||||||
|
--[[
|
||||||
|
mappings = {
|
||||||
|
i = {
|
||||||
|
["<esc>"] = require("telescope.actions").close,
|
||||||
|
-- search history
|
||||||
|
["<C-Down>"] = require('telescope.actions').cycle_history_next,
|
||||||
|
["<C-Up>"] = require('telescope.actions').cycle_history_prev,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
--]]
|
||||||
|
layout_strategy = "horizontal",
|
||||||
|
layout_config = {
|
||||||
|
horizontal = {
|
||||||
|
prompt_position = "top",
|
||||||
|
preview_width = 0.4,
|
||||||
|
width = 0.9,
|
||||||
|
preview_cutoff = 10,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pickers = {
|
||||||
|
find_files = {
|
||||||
|
hidden = true
|
||||||
|
},
|
||||||
|
-- note: remove the 'builtin.' prefix.
|
||||||
|
["lsp_references"] = { wrap_results = true, },
|
||||||
|
["lsp_definitions"] = { wrap_results = true, },
|
||||||
|
["diagnostics"] = { wrap_results = true, },
|
||||||
|
["find_files"] = { wrap_results = true, },
|
||||||
|
["buffers"] = { sort_mru = true, ignore_current_buffer = true },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue