As I have been preparing to dive into Mojo, I have had trouble finding a definitive guide on setting up the LSP and syntax highlighting for Mojo in Neovim, or any other editor for that matter.
I think this would be a great place to document solutions tips for those of us trying to configure our editor of choice.
Note that you will want to run Neovim from a terminal where you first ran magic shell. That will set up the paths proper to that the mojo-lsp-server executable is available.
That worked, thank you for the response! Hadn’t seen the magic shell solution anywhere so glad we could document that here.
Now for parsing. As I understand, the Mojo parser is not currently open sourced, but I have seen community efforts to build a tree sitter grammar forked from python. Is that the best solution for the time being?
That is likely the best solution. I’m not as familiar with what is happening in that space yet though. What problem, specifically, are you trying to solve?
At the moment the most popular setup in neovim is using nvim-lspconfig to get sensible configurations for lsp servers, mason-lspconfig to install lsp servers and nvim-treesitter to install the language parser to enable things like syntax highlighting for example. Now the problem is these repositories need to be able to download these tools which needs them to be open source (see 2710) OR a way to call them similar to what lspconfig does atm.