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() set_nnoremap('wt', function()
toggle_sidebar(sidebars.threads) toggle_sidebar(sidebars.threads)
end) 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 end
return M return M

View File

@ -168,7 +168,7 @@ ins_left {
local lsp_name = get_active_lsp().name local lsp_name = get_active_lsp().name
local has_dap, dap = pcall(require, 'dap') local has_dap, dap = pcall(require, 'dap')
if has_dap and dap.status() ~= "" then 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 else
return lsp_name return lsp_name
end end

View File

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