Current NEOVIM config
Let's use this post to share neovim setups for mojo!

14 Replies
2024-12-30
~/.congif/nvim/lua/plugins/mojo-conf.lua
I'm using LazyVim with neovim 0.10 (it works on MacOS, but not on Linux)i see
This is my tree-sitter config for Mojo, using Lazy:
Installed with
:TSInstall mojo2025-01-03
~/.congif/nvim/lua/plugins/mojo-conf.lua
I have not yet managed to get magic shell to run automatically on linux. But with this configuration at least a solution is offered through a notification.With Astronvim, I only have to configure this in astrolsp.lua -
also worked with lazyvim before I removed the
.modular folder to use magic only.
@Kennit could you share your installation details?https://discord.com/channels/1087530497313357884/1268303557900238958 I have it here. But basically I start a Neovim instance inside a magic shell, that way mojo lsp is available to Neovim.
You can do this with
magic run nvim .hmm I didn't get this working
this script works well on macOS
but on Linux, you need to run manually
magic shell and then nvim 🫤Oh wow
oh oh... I'm testing on macos, and it doesn't work either... some how I get
mojo-lsp-server installed inside ~/.modular/pkg/...
This is the best I can do 😦

2025-01-03
After some iterations, I realized it was impossible to run
magic shell once nvim started (neither on macOS nor Linux).
So this config requires you to run magic shell before starting nvim If so, it will run the LSPWhere are you all getting your language server? I can't find it anywhere on the Modular website or in the magic --help menu. Is it bundled into "magic shell" somehow?
Oh, nevermind
figured it out
Yes, as I pointed out at the end, you need to run
magic shell before starting neovim