-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: close markmap when watched buffer is closed #16
base: main
Are you sure you want to change the base?
Conversation
I've been testing the solution and I like it but there is a problem I'm not sure it has solution:
Advantages
Disadvantages
Failed solutions
Potencially viable solutions
Give me a bit more of time to think. |
You could relatively easily store the jobs by buffer in a table and make a simple lookup before spawning a new job. This would allow for watching of multiple buffers, but prevents launching a second one. You would have to rework |
@Zeioth I added my suggestions in a couple (hopefully digestible) commits. Watching multiple buffers should now handle appropreatly. On windows, you will receive an error when you try to start multiple instances. Generally you will now receive an error if
Let me know what you think. |
@MarcoBuess It doesn't seem to be working correctly currently: Manual test
Manual test 2
More info
|
@Zeioth Please try and update your node.js version. I had this issue happen with v18 on Windows and thought it was Windows specific. The Problem was gone after updating to v20+. v18 would not spawn another instance on a different port but rather tries to reuse port 3000 which will be blocked by the running node instance. |
Waiting for feedback: markmap/markmap#250 |
This was a late one for me. Let me know how you like it, or if you can spot major flaws right away. cheers and happy easter. :)
removed `remove_trailing_seperators` option, which would prevent stylua from formatting
To handle that windows can't have multiple instances of markmapcli running I added a passthrough, so that I can handle appropreatly when markmapcli errors. I deregister autocmds and take the buffer from the watch list.
Looks like I've broken open and save after adding opts. This should adress this. For some reason vim.fn.jobstart() can't handle an empty table as opts. Maybe someone has a better solution that this, but this works for now.
This was a late one for me. Let me know how you like it, or if you can spot major flaws right away. cheers and happy easter. :)