Closed blakat360 closed 2 years ago
Hello! In order to build the nimlsp, you need to have nimsuggest
installed. They go into more details in their README. I'm not familiar with Nim myself, but I remember reading that they recommended using choosenim
to install nim, as it will include all useful nim sources.
I already have nimsuggest installed.
% nimsuggest --version
Nim Compiler Version 1.4.8 [Linux: amd64]
Compiled at 2021-06-07
Copyright (c) 2006-2021 by Andreas Rumpf
active boot switches: -d:release -d:danger --gc:markAndSweep
Ah ok, hmm interesting. It seems like it assumes that nimsuggest
exists at ../../nimsuggest/nimsuggest.nim
, relative to the path of the nim
executable. Not sure why, but I guess that's the structure in which choosenim
installs things. What does the following produce:
% which nim
% which nimsuggest
% which nim
/usr/bin/nim
% which nimsuggest
/usr/bin/nimsuggest
I uninstalled nim and re-installed with choosenim. I now get this and the server installs.
% which nim
~/.nimble/bin/nim
% which nimsuggest
~/.nimble/bin/nimsuggest
However... vim doesn't seem to detect the nim file type which means that the lsp doesn't attach and when I have the list of possible LSPs it doesn't suggest nimls :(
edit 1:
:set filetype=nim
makes the lsp autoattach - however there is no syntax highlighting :(
:set filetype=nim
makes the lsp autoattach - however there is no syntax highlighting :(
Yeah it'll only start when it finds buffers with the nim
filetype. I would assume that neovim had builtin detection for nim files, but apparently not. You can always add the following to your config:
autocmd BufRead,BufReadPost,BufNewFile *.nim set filetype=nim
As for syntax, I assume you're using treesitter for syntax highlighting. I don't believe there's a treesitter grammar for Nim. Maybe you can find some luck with https://github.com/zah/nim.vim?
Problem description
I want to install nimls but the installation fails
Neovim version (>= 0.6)
NVIM v0.6.0 Build type: Release LuaJIT 2.0.5 Compiled by builduser
Features: +acl +iconv +tui See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
Operating system/version
Linux manjaro 5.4.169-1-MANJARO #1 SMP PREEMPT x86_64 GNU/Linux
I've recently downloaded the latest plugin version of both nvim-lsp-installer and nvim-lspconfig
Affected language servers
nimls
Actual behavior
:lspinstallinfo
/nimls
i
i get an install failure (documented below)
Expected behavior
I would expect successful installation
LspInstallInfo output
Installation log
Healthcheck
Screenshots
No response