Fix fish settings and better telescope for nvim
This commit is contained in:
parent
96685eb902
commit
d2a7a8263c
5 changed files with 50 additions and 29 deletions
|
|
@ -247,11 +247,17 @@ require('trouble').setup {
|
|||
},
|
||||
}
|
||||
|
||||
local trouble_telescope = require("trouble.providers.telescope")
|
||||
|
||||
require('telescope').setup {
|
||||
defaults = {
|
||||
mappings = {
|
||||
n = {
|
||||
["q"] = require('telescope.actions').close,
|
||||
["<c-t>"] = trouble_telescope.open_with_trouble,
|
||||
},
|
||||
i = {
|
||||
["<c-t>"] = trouble_telescope.open_with_trouble,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
@ -293,6 +299,11 @@ local dropdown = require'telescope.themes'.get_dropdown({
|
|||
--winblend = 10
|
||||
})
|
||||
|
||||
local telescope_ivy = require'telescope.themes'.get_ivy({
|
||||
|
||||
})
|
||||
|
||||
|
||||
--
|
||||
-- Treesitter
|
||||
--
|
||||
|
|
@ -377,22 +388,38 @@ require"neogen".setup {}
|
|||
|
||||
live_grep_repo = function(conf)
|
||||
--local opt = dropdown
|
||||
local opt = {
|
||||
cwd = vim.fn.systemlist("git rev-parse --show-toplevel")[1]
|
||||
}
|
||||
local opt = telescope_ivy
|
||||
opt['cwd'] = vim.fn.systemlist("git rev-parse --show-toplevel")[1]
|
||||
--local opt = {
|
||||
--cwd = vim.fn.systemlist("git rev-parse --show-toplevel")[1]
|
||||
--}
|
||||
for k,v in pairs(conf) do opt[k] = v end
|
||||
builtin.live_grep(opt)
|
||||
end
|
||||
|
||||
git_grep_word = function(conf)
|
||||
--local opt = dropdown
|
||||
local opt = {
|
||||
cwd = vim.fn.systemlist("git rev-parse --show-toplevel")[1]
|
||||
}
|
||||
local opt = telescope_ivy
|
||||
opt['cwd'] = vim.fn.systemlist("git rev-parse --show-toplevel")[1]
|
||||
--local opt = {
|
||||
--cwd = vim.fn.systemlist("git rev-parse --show-toplevel")[1]
|
||||
--}
|
||||
for k,v in pairs(conf) do opt[k] = v end
|
||||
builtin.grep_string(opt)
|
||||
end
|
||||
|
||||
buffer_telescope = function(conf)
|
||||
local opt = telescope_ivy
|
||||
for k,v in pairs(conf) do opt[k] = v end
|
||||
builtin.buffers(opt)
|
||||
end
|
||||
|
||||
file_list = function(conf)
|
||||
local opt = telescope_ivy
|
||||
for k,v in pairs(conf) do opt[k] = v end
|
||||
builtin.git_files(opt)
|
||||
end
|
||||
|
||||
|
||||
---
|
||||
--- My own "where" clause generator for Rust
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue