3 ms·
I'm getting back into Nim after a little break. I really enjoy the language. I'm having a helluva time trying to get some basic tooling set up though. I wanted
by xwowsersx 3y ago
I'm getting back into Nim after a little break. I really enjoy the language. I'm having a helluva time trying to get some basic tooling set up though. I wanted to install nimlsp[0] so I uninstalled the nim I had installed with homebrew and started over with choosenim. Still running into issues. `nimble install nimlsp` results in:
nimble install nimlsp
Downloading https://github.com/PMunch/nimlsp using git
Verifying dependencies for nimlsp@0.4.4
Info: Dependency on jsonschema@>= 0.2.1 already satisfied
Verifying dependencies for jsonschema@0.2.1
Info: Dependency on ast_pattern_matching@any version already satisfied
Verifying dependencies for ast_pattern_matching@1.0.0
Info: Dependency on asynctools@>= 0.1.1 already satisfied
Verifying dependencies for asynctools@0.1.1
Installing nimlsp@0.4.4
Building nimlsp/nimlsp_debug using c backend
/Users/me/.nimble/pkgs2/ast_pattern_matching-1.0.0-b5b08c554b072eed227f98a437f7333584cf957e/ast_pattern_matching.nim(575, 28) Error: invalid indentation
Prompt: Build failed for 'nimlsp@0.4.4', would you like to try installing 'nimlsp@#head' (latest unstable)? [y/N]
Answer: n
Tip: 12 messages have been suppressed, use --verbose to show them.
nimble.nim(729) install
Error: Aborting installation due to build failure.
Then I read on some old issue[1] that I should uninstall ast_pattern_matching. I assumed this meant `nimble uninstall ast_pattern_matching` so I did that, but there's nothing to delete..
Error: Failed uninstall - no packages to delete
Anyone have some advice or can provide guidance on getting nimlsp up and running? My ultimate goal is to have some basic stuff working in neovim so I can move on with writing some nim.
[0]: https://github.com/PMunch/nimlsp https://github.com/PMunch/nimlsp
[1]: https://github.com/PMunch/nimlsp/issues/156 https://github.com/PMunch/nimlsp/issues/156
- michaelsbradley 3y agoMaybe give nimlangserver a shot, it's an alternative to nimlsp: https://github.com/nim-lang/langserver https://github.com/nim-lang/langserver nimble install nimlangserver
- xwowsersx 3y agoThank you! Will give that a shot.
- fyzix 3y agoSame experience. It was smooth 2 years ago when I tried it so I thought it be more polished now... Color me frustrated
- xwowsersx 3y agoAs recommended by michaelsbradley below, I installed https://github.com/nim-lang/langserver https://github.com/nim-lang/langserver. I'm using coc.nvim (https://github.com/neoclide/coc.nvim https://github.com/neoclide/coc.nvim) so I followed the instructions here from nim langserver https://github.com/nim-lang/langserver#vimneovim https://github.com/nim-lang/langserver#vimneovim and seems to be working well!
- fyzix 3y agoI got it working but I have to restart constantly because it chokes on bad syntax errors. It also doesn't show method docs unless it's being used correctly, so I end up having to browse the web docs.
- PMunch 3y agoPlease report this kind of stuff as a GitHub issue.. The odds of getting a problem solved (and not just by jumping to another solution) is way higher. If I where to guess uninstalling Nim through Homebrew still left some packages behind and now you're seeing some conflicts. Try to delete `~/.nimble/pkgs` and `~/.nimble/pkgs2` to make sure you're starting fresh and then try again.
- xwowsersx 3y agoI appreciate your response, I will give that a try. It's important to acknowledge that while users should ideally report issues to benefit the community, there are situations where immediate problem-solving takes precedence. So, if finding an alternative solution works, that's often the practical choice, even if they plan to report the issue simultaneously.
- xwowsersx 3y agoThat did, indeed, resolve the issue. Would it help if I created an Issue for this along with the resolution? Thanks again for the help.
- PMunch 3y agoYes that would be nice. That way it at least shows up in searches. Thanks for trying out my solution.