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

unreal/init.lua is empty #1

Closed
ShaolunWang opened this issue Oct 16, 2023 · 4 comments
Closed

unreal/init.lua is empty #1

ShaolunWang opened this issue Oct 16, 2023 · 4 comments

Comments

@ShaolunWang
Copy link

ShaolunWang commented Oct 16, 2023

https://github.com/zadirion/Unreal.nvim/blob/main/lua/unreal/init.lua is empty. Is this intended?


I'm receiving the error :

Error executing Lua callback: ...Local/nvim-data/lazy/Unreal.nvim/lua/unreal/commands.lua:180: attempt to call a nil value
stack traceback:
        ...Local/nvim-data/lazy/Unreal.nvim/lua/unreal/commands.lua:180: in main chunk
        [C]: in function 'require'
        ...pData/Local/nvim-data/lazy/Unreal.nvim/plugin/unreal.lua:13: in function <...pData/Local/nvim-data/lazy/Unreal.nvim/plugin/unreal.lua:12>

My guess is that the empty init file caused this.

@zadirion
Copy link
Owner

The fact it's empty is intended, although whether it's a correct intention or not remains to be seen, I will check tonight when I get home
Is this a one-time error or does it keep happening? What are the steps to reproduce this issue?

@ShaolunWang
Copy link
Author

I just took another look and here are some issues I encountered:

  1. Hard-coded packer path for loading inspect.lua, Can be reproduced by using a different package manager. It's also used as deps without mentioning that in the readme.
  2. Using vim-dispatch without mentioning in readme.
    Based on my experience with neovim's lua support, it's possible just to use libuv (vim.loop) for this simple call instead of depending on external plugins.

I'm also having clang issues because I'm using the visual studio one, installing clang from scoop. I think this is largely a weird issue on my side because without installing clang outside of visual studio, there is no clang in $PATH.

@zadirion
Copy link
Owner

@ShaolunWang
Thanks for the detailed info

  1. To be honest that dependeny on inspect.lua shouldn't really be imposed on anyone else, it was more for myself so I could debug the lua tables. I could probably rewrite any code that calls it to check for a debug flag first
  2. I made the dependency on vim-dispatch official, it is now mentioned in the readme, thank you for pointing this out.
    I'll take a look at vim.loop as well, though at first glance I couldn't find much info. Seems like a built-in library for imlementing async code?

Regarding clang, indeed the visual studio one does not automatically put it in path. Which is probably for the better, as that can break existing dev stacks, I've seen it first hand. I clarified the readme to mention it needs to be put in the system Path by hand, I'd rather people know that it's there now.
I could find a way to figure out the path myself but then people won't be able to do what you did and use a different source for the clang compiler.
I'm open to suggestions here, at the time just picking whatever clang is in path seemed good enough

Thanks again for your time and detailed feedback

@ShaolunWang
Copy link
Author

For vim.loop it's just a libuv wrapper, I don't know much about async so I can't help much on that unfortunately. I've tried to used it but I'm not very good at writing it. Alternatively there is plenary.nvim which I also don't know much about.

As for clang it might make sense to declare in the json file...? Since the file already has the engine path declared there, it also makes sense for the clang path to be there.

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