Skip to content

Reconsidering CTRL+Space #14

@feryardiant

Description

@feryardiant

Currently I have CTRL+Space bound to initialize incremental selection

incremental_selection = {
enable = true,
keymaps = {
init_selection = '<C-space>',
node_incremental = '<C-space>',
node_decremental = '<bs>',
},
},

then Shift+K to show LSP signature help

map('n', 'K', vim.lsp.buf.hover, { desc = 'Show signature help' })

and <Leader>? to evaluate value while debugging

map('n', '<leader>?', function() dapui.eval(nil, { enter = true }) end, { desc = 'Debug: Evaluate value' })

Either of them work on completely different modes and that is mean there's should be a way to bind the same key but work differently regarding the mode I were in.

Let say use default key to enter visual mode then start selection, and while in the visual mode use CTRL+Space to increment the selection. Then on normal mode and no debug session attached use CTRL+Space to show signature help for text under the cursor. Then while there's debug session attached and the curor is hovering a variable use CTRL+Space to evaluate its value.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

🆕 New

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions