Skip to content
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

Error/Notice: Mkdnflow is already running! #60

Closed
Normanras opened this issue Jul 7, 2022 · 9 comments
Closed

Error/Notice: Mkdnflow is already running! #60

Normanras opened this issue Jul 7, 2022 · 9 comments
Assignees

Comments

@Normanras
Copy link

Normanras commented Jul 7, 2022

Currently running:

NVIM v0.8.0-dev+2023-gc84ae5706
Build type: Release
LuaJIT 2.1.0-beta3

iTerm2 on Mac M1

Issue: I'm not sure if this is a true issue, but definitely a quirk. When I open neovim and then open to an md file, I get a red warning in my nvim footer bar that says ⬇️ Mkdnflow is already running! . I've attached a screenshot.

This happens whether I open neovim directly into an md file or open it to my dashboard and then open an md file. I noticed that the opposite was happening with Issue #5 where it wasn't starting and you added the wonderful :mkdnflow<CR> which can turn it on. However, it seems like mine doesn't turn off?

It's interesting that this happens even after completely quitting iTerm2 and reopening it. I also sometimes use tmux but can confirm this happens both inside and outside of tmux. As I tested this alert, I'm also making sure I completely kill all tmux sessions. It still happens.

Not sure if it's just my setup or if you've been noticing it as well. It's not a huge deal, but seeing a red warning in my nvim bar always gives me pause. I also didn't see anything else in the issues or documentation, so please let me know if i missed something.

Thanks again for this amazing plugin! Am considering contributing it if I can find some time soon.

Screen Shot 2022-07-07 at 11 21 35 AM

@jakewvincent
Copy link
Owner

jakewvincent commented Jul 7, 2022

Interesting, I haven't seen this yet! Definitely annoying even if it isn't a functionality bug. I'm also running nvim in iterm2 on an M1 Mac at work, but I'm on nvim 0.7, so I wonder if this has something to do with autocommands in 0.8. I'll try to see if I can reproduce this later today.

@Normanras
Copy link
Author

Normanras commented Jul 8, 2022

I don't know if you've updated the plugin - I quickly updated everything via Packer this morning but didn't read carefully (🤦🏼‍♂️), but I've gotten a new error. When I start nvim it says:

Error running config for mkdnflow.nvim ... /pack/packer/start/mkdnflow.nvim/lua/mkdnflow/init.lua:191: bad arguement #1 to 'next' (table expected, got nil)

And here's what that code block says (lines 189-196):

    -- Before fully loading config see if the plugin should be started
    local load_on_ft = default_config.filetypes
    if next(user_config) then
        if user_config.filetypes then
            load_on_ft = MergeConfigs(load_on_ft, user_config.filetypes)
        end
        init.user_config = user_config
    end

Line 191 is if next(user_config) then

If you're actively updating this, ignore me! We just happen to upload and download updates at the same time. Just thought I'd chime in again.

@jakewvincent
Copy link
Owner

Thanks for the update! Interestingly, I haven't pushed any updates, so it seems like this latter issue is coming out of nowhere, but I wonder if it's related to the message you were initially reporting here. I played around with nvim 0.7 and 0.8 with and without tmux last night and couldn't manage to trigger the "Mkdnflow is already running" message, so I wonder if these two things are related somehow. Would you mind copying in your config for the plugin? Are you calling the setup function via Packer's config key, like below?

use({
    'jakewvincent/mkdnflow.nvim',
    config = function()
        require('mkdnflow').setup({})
    end
})

@jakewvincent
Copy link
Owner

jakewvincent commented Jul 8, 2022

I think you may be calling the setup function without an empty table. I was actually already intending to make both require('mkdnflow').setup() and require('mkdnflow').setup({}) work--and it's an extremely quick fix--so give me like two minutes to update that and then I'll ask you to update and see if the second error message goes away.

EDIT: OK, just changed that. Can you :PackerSync and let me know what happens when you reopen a markdown file?

@jakewvincent jakewvincent self-assigned this Jul 8, 2022
@Normanras
Copy link
Author

Sorry for the delay - busy day here. Update works! Same with the config! Interestingly, I had almost the same config already in my plugins.lua file, the only thing that I was missing was the outer parenthesis.

Either way, thanks so much for the quick responses and fixes! Closed everything and opened it back up and no errors appeared.

@jakewvincent
Copy link
Owner

Good to hear! So no "already running" messages anymore either?

@Normanras
Copy link
Author

Nope, neither!

I did want to ask another off-topic question about the plugin (I've been using it daily and love it). But I think I might know the answer, I just want to dig into your plugin files first to see if I can find it. Also, don't know if an issue thread is the best place for more general thoughts or questions! I swear I'm not using you as support, just really enjoying this plugin.

@jakewvincent
Copy link
Owner

jakewvincent commented Jul 11, 2022

You're welcome to use the discussions feature for this repo! I enabled it a while back but never made an introductory post or anything like that, but ideally I'd like that to be a place where people can ask questions that aren't issues per se and/or share interesting configs they've set up for their use case.

Very glad you're getting some use and enjoyment from the plugin! This started off as just a small "for fun" project early last year when I was finishing my dissertation/looking for a distraction from writing. I started developing it much more heavily this year after starting work in industry, mainly because I use it to take notes & manage my workload and work projects (lots of "oh, x/y/z feature would be nice..." moments). It could just be something I use for myself, but it's even better that other people find it useful!

@Normanras
Copy link
Author

Wow, neat! I started using it literally because of the same use case. I deal mostly with clients and product discovery and I need to categorize them along with sub-topics. This plugin came about exactly because I would get the "that would be a nice feature" mid-conversation and I have to quickly tag it.

Thanks for the discussion link, I'll use that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants