-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
After upgrade to 105 Emacs freezes in nim-mode in auto-complete #4403
Comments
To help with reproducing:
proc After proc and blank the auto-complete jumps in and there will be a timeout from the epc server(s). |
Hi, although I'm not spacemacs user, eventually I found this issue. If you set up https://github.com/nim-lang/nimsuggest,
in your init.el (or spacemacs does in other ways?) By the way, does anyone have electric-indent-mode trouble in spacemacs' nim-mode? |
I bit researched inside spacemacs and it seems already using company-mode... |
Yes, company-mode is the default for auto-completion in spacemacs. The problem with the epc servers still persists. The nim-mode package contains a nim-suggest.el but it doesn't contain a version number. The nim-mode.el has just Version: 0.2.0. |
When typing something in a nim-mode buffer comany mode jumps in, and the session hangs till getting a timeout. In the Messages buffer I found: Company: An error occurred in auto-begin |
I'm not sure, but I seem it's failing to communicate nimsuggest via epc. |
Hi Yuuta, What I did.
Now it works fine. What does it mean for this issue? On the one hand it could be closed? On the other hand the need of a binary nimsuggest for working correctly (in nim-mode) with comany mode should be made clear in the layer documentation of nim-mode. Thanks again, Yuuta. |
Sounds like a documentation bug, then. |
Yes, I think so. But people who use nim-mode should satisfy that prerequisite. |
That's good manfredlotz. (about this issue: nim-lang/nim-mode#54) What I wanted to ask is "can |
I copied the code from that issue into a new buffer x.nim. Then I enterered (starting in column 0) and after pressing the ENTER-Key the cursor is in the next line in column 3 (directly below the 'r' in for). |
In latest nim-mode return-key should behave as just new line, so |
The nim-mode in spacemacs contains nim-eldoc.el. I like the automatic indentation. |
Perhaps for clarification. In my example above the indentation of the line |
Thanks manfredlotz about that information. |
I don't think that spacemacs has done anything bad to nim-mode. I don't know nim-mode very good as I stumbled over nim 4 weeks ago. Then, I was looking for a major mode providing nim support in Emacs. Found nim-mode and in the meantime it works quite ok. So I don't know (perhaps have to look up the sources) if there are ways to press enter with indentation and without. |
@manfredlotz are you using emacs 24.4? can you configure this: (add-hook 'nim-mode-hook
(add-to-list 'electric-indent-functions-without-reindent
'nim-indent-line-function)) This configuration add nim-mode's indentation function to |
I tried it but this is not what I want as I don't have any indentation automatically when pressing ENTER. |
I think you can use C-j instead of ENTER for insert newline and next line's auto indentation (if spacemacs doesn't change from default) EDIT: (add-hook 'nim-mode
(lambda ()
(define-key nim-mode-map (kbd "RET") 'newline-and-indent))) Please discuss this issue inside spacemacs group because one spacemacs user asked at |
I think there should be a PR -- I don't personally care enough to make it...but someone should make a PR to fix this ;) |
I am not surce if this is related to this bug, but I simply can not get nim-mode to work with auto completion. I simply don't what is going wrong or how to find out what is going wrong, because I am new to spacemacs. But there is something that I think might be one of the reasons why auto completion doesn't work for me. It is this: In the documentation of nim-mode it mentions that I have to add company-nim-builtin to the
But in package.el it only adds company-nim.
Unfortunately changis this line alone didn't change anything for me, so there has to be something that is wrong, too. |
You have nimsuggest installed and it is to be found in your path? |
yes it is found, this is what describe-variable RET nim-nimsuggest-path gives:
I did not set the variable manually, I just added "/home/arne/.nimble/bin" to my path |
I checked my .spacemacs, and saw that I only set the path for nimsuggest in nim-nimsuggest-path. Nothing else. I have no freeze in nim-mode. In the nim-mode documentation I cannot find anything that tells me I have to add company-nim-builtin to the company-backends. |
@krux02 and @manfredlotz the configuration about So, if you don't get any completion, maybe there is another reason. |
@krux02 To narrow your problem, I suggest following things:
EDIT: |
So yes there is something not working. |
I have no idea what's happening... The error message means:
I think same thing is happening for auto-completion because it I think there is nothing we can examine from emacs side. |
Funny thing is, that in plain emacs, without spacemacs, all worked fine with the autocompletion. So I also have no idea what might have caused that error. Could there be any paths wrong that link to standard library or something? |
so Is there anything I can do from my side? Because syntax checking does work properly, and when I have errors there, I see the correct alternatives listed properly as it should be. |
This is because spacemacs (flycheck-nim.el) uses The |
Remove |
You can set this variable by No need to manually edit files. |
Perhaps this would be a better default, since it's causing some users issues? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid! |
After upgrade to 105 Emacs freeze in nim-mode in auto-complete. Same happens when running emacs -nw
After a while a message
Timeout server response.
Then when quitting Emacs a couple of processes will be displayed like this
epc:server:2 run epc:server:2 /dev/pts/19 --verbosity:0 --epc /home/manfred/t.nim
epc:server:3 run epc:server:3 /dev/pts/20 --verbosity:0 --epc /home/manfred/t.nim
epc:server:4 run epc:server:4 /dev/pts/21 --verbosity:0 --epc /home/manfred/t.nim
...
epc:server:8 run epc:server:8 /dev/pts/25 --verbosity:0 --epc /home/manfred/t.nim
The text was updated successfully, but these errors were encountered: