diff options
-rw-r--r-- | README.md | 6 | ||||
-rw-r--r-- | ide-highlights.c | 5 | ||||
-rw-r--r-- | ide-hover.c | 5 | ||||
-rw-r--r-- | ted.cfg | 4 |
4 files changed, 9 insertions, 11 deletions
@@ -136,11 +136,11 @@ Press Ctrl+space to autocomplete. If there is only one possible completion from Otherwise, you'll get a popup showing all possible completions. You can press tab to select a completion (or click on it), and press Ctrl+space/Ctrl+shift+space to cycle between suggestions. -Hover over an identifier and press Shift to see its type and documentation ("hover information"). +Hover over an identifier and press F1 to see its type and documentation ("hover information"). -While your cursor is over an identifier, you can press Ctrl to highlight where it is used +While your cursor is over an identifier, you can press F2 to highlight where it is used ("document highlights"). If you turn on `highlight-auto` in the settings, the highlights -will appear even if you don't press Ctrl. +will appear even if you don't press F2. Press Ctrl+U to see usages of the identifier under the cursor. You can use Ctrl+\[ and Ctrl+\] to navigate between them, just like build errors. diff --git a/ide-highlights.c b/ide-highlights.c index 511a2fe..e568820 100644 --- a/ide-highlights.c +++ b/ide-highlights.c @@ -52,10 +52,9 @@ void highlights_frame(Ted *ted) { return; } const Settings *settings = buffer_settings(buffer); - bool ctrl_down = SDL_GetKeyboardState(NULL)[SDL_SCANCODE_LCTRL] - || SDL_GetKeyboardState(NULL)[SDL_SCANCODE_RCTRL]; + bool f2_down = SDL_GetKeyboardState(NULL)[SDL_SCANCODE_F2]; if (!settings->highlight_enabled - || (!settings->highlight_auto && !ctrl_down)) { + || (!settings->highlight_auto && !f2_down)) { highlights_close(ted); return; } diff --git a/ide-hover.c b/ide-hover.c index aed5dbd..f99c2e7 100644 --- a/ide-hover.c +++ b/ide-hover.c @@ -78,10 +78,9 @@ void hover_frame(Ted *ted, double dt) { return; Hover *hover = &ted->hover; - bool shift_down = SDL_GetKeyboardState(NULL)[SDL_SCANCODE_LSHIFT] - || SDL_GetKeyboardState(NULL)[SDL_SCANCODE_RSHIFT]; + bool f1_down = SDL_GetKeyboardState(NULL)[SDL_SCANCODE_F1]; - bool open_hover = shift_down || hover->time >= settings->hover_time; + bool open_hover = f1_down || hover->time >= settings->hover_time; hover->time += dt; @@ -39,11 +39,11 @@ lsp-enabled = yes # display function signature help? (only with LSP running) # this is the thing at the bottom of ted which shows the parameters to the function you're calling signature-help-enabled = yes -# display hover info when shift key is pressed? (only with LSP running) +# display hover info when F1 key is pressed? (only with LSP running) hover-enabled = yes # if this is set to x, then hover info will be displayed without shift key after x seconds (with LSP running) hover-time = 1e10 -# highlight instances of the variable under the cursor when the ctrl key is pressed? (only with LSP running) +# highlight instances of the variable under the cursor when the F2 key is pressed? (only with LSP running) highlight-enabled = yes # don't require ctrl key for highlighting highlight-auto = no |