Comments (7)
I did go over the API, forums, LLMs, for all 3 of these, and couldn't find an elegant way to resolve this 😅
I was just about to type this.
The only other way I thought of was to do something like this:
local keys_to_disable =
{ "a", "A", "i", "I", "o", "O", "s", "S", "x", "d", "D", "c", "C", "p", "P", "u", "U", "J", "r", "R", ".", }
for _, key in pairs(keys_to_disable) do
vim.keymap.set("n", key, "<nop>", { buffer = 0 })
end
But it's very hacky, there are a lot of edge cases that aren't covered.
Also, when I tried using the solution you proposed in PR, I noticed that the error it was throwing was not the same as the ones that block your Neovim instance (I don't know what are they called), as I thought at first. So I think this solution is good enough until the better one emerges.
PS: I will not merge your PR, because it uses the API function that is deprecated in nightly versions, and the "use instead" function already exists in versions 0.9.x
from speedtyper.nvim.
Yeah that is a hell of a hack but it could do the trick - as long as the user can't enter insert mode 👍
Great that it got solved - thanks 🙏
from speedtyper.nvim.
Thanks again for the help 😁. The solution you proposed in PR makes sense, but I would like to suppress the error, I'll look into it and try to come up with a different solution. If I don't make any progress, I will merge the PR (it's much better than the current state 😀).
from speedtyper.nvim.
Yeah - it would be better for sure 👍
I did go over the API, forums, LLMs, for all 3 of these, and couldn't find an elegant way to resolve this 😅
Maybe you have better luck 😉
from speedtyper.nvim.
I keep getting the E21
errors all the time 😅
Can you still merge the hack that disables all inserting commands? 🙏
from speedtyper.nvim.
Do you mind testing it now, @gerazov? I will leave this issue open for now.
from speedtyper.nvim.
Works great - thanks 🤟
from speedtyper.nvim.
Related Issues (11)
- Choosing text for typing HOT 6
- Error when closing window HOT 4
- Countdown game resets WPM on word list refresh HOT 1
- Countdown game word list size doesn't increase if float window height is increased HOT 1
- Add sentence mode HOT 1
- WPM calculated based on the final words typed HOT 3
- Stopwatch game doesn't trigger end_game(true) HOT 2
- Words can overflow window width HOT 4
- Speedtyper window does not close when opening netrw inside of it
- netrw text 'merges' with the current buffer text
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from speedtyper.nvim.