edit the lsp config

This commit is contained in:
MFlossmann 2024-07-12 15:18:42 +02:00
parent 3c8c644ffd
commit f483bd632c
2 changed files with 46 additions and 27 deletions

View file

@ -35,25 +35,25 @@
# │ │ Preview │ │
# │ └────────────────────────────────────────┘ │
# └──────────────────────────────────────────────────┘
extraConfigLuaPre = ''
local TelescopeWithTheme = function(fn, args, extension)
args.layout_config = {
anchor = "N",
mirror = true,
width = 0.8,
}
if fn == "keymaps" or fn == "registers" then args.layout_config.height = function(_, _, max_lines) return max_lines end end
local args_with_theme = require("telescope.themes").get_dropdown(args)
if extension ~= "" then
require("telescope").extensions[extension][fn](args_with_theme)
else
require("telescope.builtin")[fn](args_with_theme)
end
end
'';
# extraConfigLuaPre = ''
# local TelescopeWithTheme = function(fn, args, extension)
# args.layout_config = {
# anchor = "N",
# mirror = true,
# width = 0.8,
# }
#
# if fn == "keymaps" or fn == "registers" then args.layout_config.height = function(_, _, max_lines) return max_lines end end
#
# local args_with_theme = require("telescope.themes").get_dropdown(args)
#
# if extension ~= "" then
# require("telescope").extensions[extension][fn](args_with_theme)
# else
# require("telescope.builtin")[fn](args_with_theme)
# end
# end
# '';
# Use root keymaps to allow usage of custom TelescopeWithTheme function
keymaps =