better telescope config

This commit is contained in:
Miguel Palhas
2024-10-08 09:56:24 +01:00
parent f2ac3c44de
commit 9a426b476c
7 changed files with 176 additions and 60 deletions
+3
View File
@@ -6,10 +6,13 @@ local lspconfig = require "lspconfig"
local servers = { "html", "cssls", "lua_ls", "biome" }
local nvlsp = require "nvchad.configs.lspconfig"
vim.lsp.inlay_hint.enable()
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
on_attach = nvlsp.on_attach,
on_init = nvlsp.on_init,
capabilities = nvlsp.capabilities,
inlay_hints = { enable = true },
}
end
+22
View File
@@ -1,3 +1,5 @@
dofile(vim.g.base46_cache .. "telescope")
local options = {
pickers = {
colorscheme = { enable_preview = true },
@@ -17,6 +19,26 @@ local options = {
sort_mru = true,
},
},
defaults = {
prompt_prefix = "",
selection_caret = " ",
entry_prefix = " ",
sorting_strategy = "ascending",
layout_config = {
horizontal = {
prompt_position = "top",
preview_width = 0.55,
},
width = 0.87,
height = 0.80,
},
mappings = {
n = { ["q"] = require("telescope.actions").close },
},
},
extensions_list = { "themes", "terms" },
extensions = {},
}
return options