Add telescope mappings, drop DAP adapter name and widget closing.

main
Joshua Potter 2023-11-24 09:52:34 -07:00
parent 2c96f8a93a
commit f96f05c95f
3 changed files with 8 additions and 11 deletions

View File

@ -149,14 +149,6 @@ function M.buffer_map()
set_nnoremap('wt', function()
toggle_sidebar(sidebars.threads)
end)
set_nnoremap('wx', function()
for _, sb in pairs(sidebars) do
if sidebar_is_open(sb) then
toggle_sidebar(sb)
end
dap.repl.close()
end
end)
end
return M

View File

@ -168,7 +168,7 @@ ins_left {
local lsp_name = get_active_lsp().name
local has_dap, dap = pcall(require, 'dap')
if has_dap and dap.status() ~= "" then
return string.format("%s:%s", lsp_name, dap.session().adapter.name)
return string.format("%s", lsp_name)
else
return lsp_name
end

View File

@ -32,17 +32,22 @@ function M.setup()
lsp_definitions = { theme = 'cursor' },
lsp_implementations = { theme = 'cursor' },
lsp_type_definitions = { theme = 'cursor' },
lsp_workspace_symbols = { theme = 'ivy' },
},
}
-- General
set_telescope_map(';', 'resume')
set_telescope_map('b', 'buffers')
set_telescope_map('f', 'find_files')
set_telescope_map('g', 'live_grep')
set_telescope_map('s', 'live_grep')
set_telescope_map('d', 'lsp_type_definitions')
-- LSP
set_telescope_map('?', 'diagnostics')
set_telescope_map(']', 'lsp_definitions')
set_telescope_map('i', 'lsp_implementations')
set_telescope_map('s', 'lsp_workspace_symbols')
set_telescope_map('t', 'lsp_type_definitions')
vim.api.nvim_create_autocmd('User', {
pattern = 'TelescopePreviewerLoaded',