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

Migrate to Lua #55

Merged
merged 62 commits into from
Oct 16, 2021
Merged

Migrate to Lua #55

merged 62 commits into from
Oct 16, 2021

Conversation

luan
Copy link
Owner

@luan luan commented Jul 17, 2021

For user config something like this is necessary: luan/dotfiles@c6387cb

Everything else should just work. But I'm keeping this on a branch for a little bit.

If you would like to try this out, just git checkout lua at ~/.config/nvim and start vim again. You might get some errors, if you do, post them here. You can probably unblock yourself by running :PackerSync manually.

@kirederik
Copy link
Contributor

kirederik commented Sep 8, 2021

Pulled the latest changes, started to get some errors at startup

^Ino field package.preload['plugins.compe']
^Ino file './plugins/compe.lua'
^Ino file '/usr/local/Cellar/luajit-openresty/2.1-20210510/share/luajit-2.1.0-beta3/plugins/compe.lua'
^Ino file '/usr/local/share/lua/5.1/plugins/compe.lua'
^Ino file '/usr/local/share/lua/5.1/plugins/compe/init.lua'
^Ino file '/usr/local/Cellar/luajit-openresty/2.1-20210510/share/lua/5.1/plugins/compe.lua'
^Ino file '/usr/local/Cellar/luajit-openresty/2.1-20210510/share/lua/5.1/plugins/compe/init.lua'
^Ino file '/Users/ederik/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/plugins/compe.lua'
^Ino file '/Users/ederik/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/plugins/compe/init.lua'
^Ino file '/Users/ederik/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/plugins/compe.lua'
^Ino file '/Users/ederik/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/plugins/compe/init.lua'
^Ino file './plugins/compe.so'
^Ino file '/usr/local/lib/lua/5.1/plugins/compe.so'
^Ino file '/usr/local/Cellar/luajit-openresty/2.1-20210510/lib/lua/5.1/plugins/compe.so'
^Ino file '/usr/local/lib/lua/5.1/loadall.so'
^Ino file '/Users/ederik/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/plugins/compe.so'
^Ino file './plugins.so'
^Ino file '/usr/local/lib/lua/5.1/plugins.so'
^Ino file '/usr/local/Cellar/luajit-openresty/2.1-20210510/lib/lua/5.1/plugins.so'
^Ino file '/usr/local/lib/lua/5.1/loadall.so'
Press ENTER or type command to continue
^Ino file '/Users/ederik/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/plugins.so'
Press ENTER or type command to continue
packer.nvim: Error running config for auto-session: [string "..."]:0: module 'auto-session' not found:
^Ino field package.preload['auto-session']
^Ino file './auto-session.lua'
^Ino file '/usr/local/Cellar/luajit-openresty/2.1-20210510/share/luajit-2.1.0-beta3/auto-session.lua'
^Ino file '/usr/local/share/lua/5.1/auto-session.lua'
^Ino file '/usr/local/share/lua/5.1/auto-session/init.lua'
^Ino file '/usr/local/Cellar/luajit-openresty/2.1-20210510/share/lua/5.1/auto-session.lua'
^Ino file '/usr/local/Cellar/luajit-openresty/2.1-20210510/share/lua/5.1/auto-session/init.lua'
^Ino file '/Users/ederik/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/auto-session.lua'
^Ino file '/Users/ederik/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/auto-session/init.lua'
^Ino file '/Users/ederik/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/auto-session.lua'
^Ino file '/Users/ederik/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/auto-session/init.lua'
^Ino file './auto-session.so'
^Ino file '/usr/local/lib/lua/5.1/auto-session.so'
^Ino file '/usr/local/Cellar/luajit-openresty/2.1-20210510/lib/lua/5.1/auto-session.so'
^Ino file '/usr/local/lib/lua/5.1/loadall.so'
Press ENTER or type command to continue

:PackerSync fixed the above

@jaresty
Copy link
Contributor

jaresty commented Sep 24, 2021

Are you open to switching the test runner back to the tmux test runner? That was working better for me.

@benmoss
Copy link
Contributor

benmoss commented Sep 29, 2021

Some of the g shortcuts in https://github.com/luan/nvim/pull/55/files#diff-8c1ed0d247790076998896e30817a1b777a758bdcb2ca459440dd8f502f4a2afR76-R85 are colliding with the ones that come with which-key.nvim: https://github.com/folke/which-key.nvim/blob/b582c9d78f0d105041ed29ec3a8ee11d98ddfd50/lua/which-key/plugins/presets/misc.lua#L72-L80

gi for instance is the one I really am missing. Any desire to remap these? Or just get rid of the which-key defaults? I tried to but couldn't figure out how to set it which-key configuration.

My g completion:
Screen Shot 2021-09-29 at 3 09 52 PM

@luan
Copy link
Owner Author

luan commented Oct 4, 2021

Some of the g shortcuts in https://github.com/luan/nvim/pull/55/files#diff-8c1ed0d247790076998896e30817a1b777a758bdcb2ca459440dd8f502f4a2afR76-R85 are colliding with the ones that come with which-key.nvim: https://github.com/folke/which-key.nvim/blob/b582c9d78f0d105041ed29ec3a8ee11d98ddfd50/lua/which-key/plugins/presets/misc.lua#L72-L80

gi for instance is the one I really am missing. Any desire to remap these? Or just get rid of the which-key defaults? I tried to but couldn't figure out how to set it which-key configuration.

My g completion: Screen Shot 2021-09-29 at 3 09 52 PM

Oh man, that's annoying; I didn't realize I was overriding defaults with that one (which-key just re-maps defaults for documentation purposes). I'll switch "go to implementation" to gm

@benmoss
Copy link
Contributor

benmoss commented Oct 6, 2021

Whenever I do a :ConfigUpdate when there are remote changes I get this error:

#[packer.nvim] [ERROR 10:05:30] async.lua:20: Error in coroutine: /home/cesium/.config/nvim/lua/plugins.lua:5: E5560: nvim_exec must not be called in a lua loop callback

I found a similar issue in packer itself, but not clear how to fix it here.

@luan
Copy link
Owner Author

luan commented Oct 16, 2021

Whenever I do a :ConfigUpdate when there are remote changes I get this error:

#[packer.nvim] [ERROR 10:05:30] async.lua:20: Error in coroutine: /home/cesium/.config/nvim/lua/plugins.lua:5: E5560: nvim_exec must not be called in a lua loop callback

I found a similar issue in packer itself, but not clear how to fix it here.

I think it should be fixed now in 5eb47f0 (but you'll get the error one more time when you pull that one down)

@jfmyers9
Copy link

At this point why don't you just merge this. It works fine imo.

@luan
Copy link
Owner Author

luan commented Oct 16, 2021 via email

@luan
Copy link
Owner Author

luan commented Oct 16, 2021

Eh, i tried it for 2 minutes, it's not worth it. Merging it

@luan luan merged commit 0a3d808 into main Oct 16, 2021
@luan
Copy link
Owner Author

luan commented Oct 16, 2021

You'all all need to manually switch back to main.

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

Successfully merging this pull request may close these issues.

6 participants