LSP prompt renamed to 'prompt_postfix' (closes #308)

main
bhagwan 2 years ago
parent 2ab8adadb1
commit 4f8751db52

@ -581,7 +581,8 @@ require'fzf-lua'.setup {
git_icons = true,
},
lsp = {
prompt = ' ',
prompt_postfix = ' ', -- will be appended to the LSP label
-- to override use 'prompt' instead
cwd_only = false, -- LSP/diagnostics for cwd only?
async_or_timeout = 5000, -- timeout(ms) or 'true' for async calls
file_icons = true,

@ -619,7 +619,8 @@ Consult the list below for available settings:
git_icons = true,
},
lsp = {
prompt = ' ',
prompt_postfix = ' ', -- will be appended to the LSP label
-- to override use 'prompt' instead
cwd_only = false, -- LSP/diagnostics for cwd only?
async_or_timeout = 5000, -- timeout(ms) or 'true' for async calls
file_icons = true,

@ -424,7 +424,7 @@ M.globals.manpages = {
}
M.globals.lsp = {
previewer = M._default_previewer_fn,
prompt = '> ',
prompt_postfix = '> ',
file_icons = true and M._has_devicons,
color_icons = true,
git_icons = false,
@ -653,9 +653,6 @@ function M.normalize_opts(opts, defaults)
-- ,("'%s' is now defined under '%s'"):format(v, k))
end
-- Default prompt
opts.prompt = opts.prompt or opts.fzf_opts["--prompt"]
if type(opts.previewer) == 'function' then
-- we use a function so the user can override
-- globals.winopts.preview.default

@ -275,8 +275,8 @@ local normalize_lsp_opts = function(opts, cfg)
if not opts then return end
if not opts.cwd then opts.cwd = vim.loop.cwd() end
if not opts.prompt or opts.prompt == config.globals.lsp.prompt then
opts.prompt = opts.lsp_handler.label .. cfg.prompt
if not opts.prompt and opts.prompt_postfix then
opts.prompt = opts.lsp_handler.label .. (opts.prompt_postfix or '')
end
opts.bufnr = nil

Loading…
Cancel
Save