reykjalin / kakoune-mode

Provides a kakoune mode for VSCode. Mirror of https://git.sr.ht/~reykjalin/kakoune-mode
MIT License
21 stars 1 forks source link

JSON.ParseError? #2

Open CosineP opened 4 years ago

CosineP commented 4 years ago

i wasn't sure if i installed it right, what i did is ran the commands on the readme then symlinked the whole thing to ~/.vscode/extensions

now when i try to press any key besides i, i get

log.ts:197   ERR Json.ParseError (2 errors in total) (2 errors in total)

in the developer console. i and a work fine (altho a acts like i), and i rebound escape and that works too

totally fine if this is all there is obviously, just want to see if there's something i'm doing wrong. thanks!

also in the beginning of the dev console i have:

  ERR spawn : ENOENT: Error: spawn : ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:77:11)

but i don't know if this is related. i tested this with kakoune master and debian testing's kakoune, same result. killing kakoune leads to different errors so i think it is finding kakoune okay

reykjalin commented 4 years ago

Thank you for reporting this!


That json parsing error definitely doesn't sound right. I'm pretty sure I'm handling all the exceptions, but I might be wrong; I'll double check when I get to looking into this. I haven't personally tried to install the extension (or create a release for that matter) since this isn't really ready for actual use; I've been developing this by debugging (running) the code from VSCode. I've never seen this issue happen during development.


My guess is the child process error is happening because closing Kakoune isn't handled at all right now. When the editor is closed the node runtime is left to stop the process.


If I'm being honest, these issues are probably caused by me trying to get the extension to a point where I can use it as my daily driver as fast as possible and cutting some corners 😅.

The only really functional thing right now is selections and movement. I'm working on syncing the text between VSCode and Kakoune, which is made sort of complicated by the fact that I want to use VSCode in insert mode (to get things like IntelliSense, auto-close brackets/parens, etc. out of the box) and Kakoune all other times — this makes it so I have to sync text both ways, it's not just from one to the other. I'm working on it, but it'll be a bit before that's ready.

Once the text is being properly-ish synced is when I'll start to actively use the extension for myself. When I get to that point I'll work on making an actual release and testing this more, and specifically look into what's going on here 🙂.

Again, thank you for reporting this!

CosineP commented 4 years ago

ahh, that makes sense. thanks for checking it out. i'll keep my eyes on the project then. thanks for making it happen