better lsp/telescope config
This commit is contained in:
parent
84bc65982f
commit
a7697c2e87
2 changed files with 33 additions and 13 deletions
|
|
@ -73,8 +73,7 @@ saga_cfg = {
|
|||
virtual_text = false,
|
||||
},
|
||||
}
|
||||
require'lspsaga'.init_lsp_saga(saga_cfg)
|
||||
|
||||
-- require'lspsaga'.init_lsp_saga(saga_cfg)
|
||||
|
||||
local t = function(str)
|
||||
return vim.api.nvim_replace_termcodes(str, true, true, true)
|
||||
|
|
@ -149,7 +148,24 @@ require('lspkind').init({
|
|||
})
|
||||
|
||||
require('telescope').setup {
|
||||
|
||||
defaults = {
|
||||
mappings = {
|
||||
n = {
|
||||
["q"] = require('telescope.actions').close,
|
||||
},
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
lsp_code_actions = {
|
||||
theme = "ivy",
|
||||
},
|
||||
lsp_range_code_actions = {
|
||||
theme = "ivy",
|
||||
},
|
||||
lsp_references = {
|
||||
theme = "ivy",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
local builtin = require'telescope.builtin'
|
||||
|
|
@ -178,8 +194,10 @@ live_grep_repo = function(conf)
|
|||
end
|
||||
|
||||
git_grep_word = function(conf)
|
||||
local opt = dropdown
|
||||
opt.cwd = vim.fn.systemlist("git rev-parse --show-toplevel")[1]
|
||||
--local opt = dropdown
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue