uiwjs / uiwjs/react-codemirror

override autocompletion keymap

Open
#410 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.3k
Forks
161
PR merge metrics
No merged PRs in 30d

Description

Hello again,
I'm trying to override the default keymap for acceptCompletion which is binded to "Enter", because it's not very user friendly when you don't want to accept the completion and just insert a new line, but it accepts the completion which you didnt want.

I tried to override it with keymap.of, and setting completionKeymap or defaultKeymap in basicSetup to false, but none of it helped and the completion is still accepted with "Enter".

What's the correct way to do this, or is it even possible? Without "hacking" it through DOM selectors somehow..
Thanks

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the keymap.of configuration and the basicSetup options mentioned in the issue, focusing on completionKeymap, defaultKeymap, and acceptCompletion. Determine whether Enter can be overridden without DOM selectors, and document or demonstrate the supported configuration; done means Enter inserts a newline without accepting a completion.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.