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

Impatient.nvim does not properly load Mkdnflow #49

Closed
kraxli opened this issue Jun 10, 2022 · 17 comments
Closed

Impatient.nvim does not properly load Mkdnflow #49

kraxli opened this issue Jun 10, 2022 · 17 comments
Assignees
Labels
compatibility There is a compatibility issue with another plugin

Comments

@kraxli
Copy link

kraxli commented Jun 10, 2022

Executing MkdnToggleToDo or a corresponding mapping on a todo item (- [ ] todo1) throws the following error:

mkdn_todotoggle

Nvim: 0.7
OS: Ubuntu
Shell: Zsh

@jakewvincent
Copy link
Owner

When was the last time you updated the plugin? This looks like a general message about not being able to find the lists module. I'm not sure why that would happen, but one possibility is you're working with an outdated version of the plugin?

@kraxli
Copy link
Author

kraxli commented Jun 10, 2022

installed right now

@jakewvincent
Copy link
Owner

Hmm, weird. Can you show me what your mkdnflow config looks like?

@kraxli
Copy link
Author

kraxli commented Jun 10, 2022

potentially a related error (error loading module 'mkdnflow.lists') occurs with lua require('telekasten').insert_link({ i=true })<CR>

Screenshot from 2022-06-10 23-16-52

@jakewvincent
Copy link
Owner

Are you using the default config? (just require('mkdnflow').setup({}))?

@kraxli
Copy link
Author

kraxli commented Jun 10, 2022

Yes, but I have also tried to use the defaults explicitly

@jakewvincent
Copy link
Owner

jakewvincent commented Jun 10, 2022

Got it. How are you loading the plugin? In the traceback above it looks like the error occurs after the plugin is force started? Is it trying to load after you select a file in telescope? Can you toggle a to-do status if you open the same markdown file from the command line? (nvim my_file.md)

@kraxli
Copy link
Author

kraxli commented Jun 11, 2022

unfortunately nvim my_file.md is also not working. I load the plugin with Packer, as you suggest in the README.md

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

Some stuff works. E.g. the function MkdnCreateLink creates the link but not the file

image

And it only does sth through the command not the key mapped to it

@jakewvincent
Copy link
Owner

jakewvincent commented Jun 11, 2022

Interesting, thanks. It seems like the plugin is not fully initializing. I can reproduce this partially--the mappings are not working if I start from Telescope. Somehow the BufEnter event is not occurring, so the autocommand isn't being triggered. Just to double check, the file you're experiencing this in has a .md extension, right? Can you double-check the nvim version for me by pasting the output of nvim --version here?

@jakewvincent
Copy link
Owner

Just pushed a small change that may fix at least the mappings problem. Can you pull the update and report back?

@kraxli
Copy link
Author

kraxli commented Jun 12, 2022

Thanks, I have pulled but still no luck :-/
Is there a way I can debug and provide more info?

@kraxli
Copy link
Author

kraxli commented Jun 12, 2022

nvim --version

nvim --version
NVIM v0.7.0
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-11 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=malloc -Wsuggest-attribute=cold -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/runner/work/neovim/neovim/build/config -I/home/runner/work/neovim/neovim/src -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/runner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include
Compiled by runner@fv-az316-460

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "
/home/runner/work/neovim/neovim/build/nvim.AppDir/usr/share/nvim"

@jakewvincent jakewvincent self-assigned this Jun 13, 2022
@jakewvincent jakewvincent added the bug Something isn't working label Jun 13, 2022
@jakewvincent
Copy link
Owner

Thanks for the info. It should be good of course with 0.7.0, which is the same version I test and use the plugin on. The only thing I can think is that this somehow has to do with your specific config/other plugins. Do you have your vim dotfiles posted somewhere so I can try them out and see if I can reproduce what's happening on your end? If that still doesn't provide any clues, I may need to patch together some logging functionality so we can see where in the plugin startup process things are going awry. Thx for your patience... this is a tricky one.

@kraxli
Copy link
Author

kraxli commented Jun 14, 2022

many thanks for taking up this challenge!
my config is based on AstroNvim and you can find my personal config on nvim-config-astroVim/tree/mkdnflow_test

@jakewvincent
Copy link
Owner

jakewvincent commented Jun 14, 2022

I was able to reproduce this with your config, but the issue doesn't seem to be caused by mkdnflow. It has something to do with how impatient.nvim caches plugins and runs plugin setup. If I comment out the first line in your init.vim (see below), mkdnflow loads just fine. Since I'm not aware of the inner workings of impatient.nvim, I would probably recommend filing an issue with them. If you do, you can reference this issue and/or tag me.

--local impatient_ok, impatient = pcall(require, "impatient")

This error message seems relevant:

packer.nvim: Error running config for mkdnflow.nvim: ...ck/packer/start/impatient.nvim/lua/impatient/profile.lua:216: attempt to index a nil value

@jakewvincent jakewvincent changed the title MkdnToggleToDo not working Impatient.nvim does not properly load Mkdnflow Jun 14, 2022
@jakewvincent jakewvincent added compatibility There is a compatibility issue with another plugin and removed bug Something isn't working labels Jun 14, 2022
@kraxli
Copy link
Author

kraxli commented Jun 16, 2022

Many thanks @jakewvincent for tracking this down! I will file a bug report with impatient

@kraxli
Copy link
Author

kraxli commented Jun 19, 2022

After deleting any potential caching, it worked with a minimal init.lua. So it seems to be in between impatient.nvim and mkdnflow.nvim. I will investigate a bit further what the real root cause is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility There is a compatibility issue with another plugin
Projects
None yet
Development

No branches or pull requests

2 participants