Skip to content
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

crash on start in neovim #221

Closed
doongjohn opened this issue Jul 22, 2024 · 7 comments
Closed

crash on start in neovim #221

doongjohn opened this issue Jul 22, 2024 · 7 comments
Assignees

Comments

@doongjohn
Copy link

neovim LspLog:

[START][2024-07-22 23:25:54] LSP logging initiated
[ERROR][2024-07-22 23:25:54] .../vim/lsp/rpc.lua:770	"rpc"	"/home/doongjohn/.nimble/bin/nimlangserver"	"stderr"	"DBG Router: dispatching                        method=initialize id=1\nDBG Initialize received...                    \nDBG Registering monitor for process            pid=14409\n"
[ERROR][2024-07-22 23:25:54] .../vim/lsp/rpc.lua:770	"rpc"	"/home/doongjohn/.nimble/bin/nimlangserver"	"stderr"	"DBG Initialize completed. Trying to start nimsuggest instances\nDBG Router: sending response                   method=initialize id=1\n"
[ERROR][2024-07-22 23:25:54] .../vim/lsp/rpc.lua:770	"rpc"	"/home/doongjohn/.nimble/bin/nimlangserver"	"stderr"	'DBG Shutting down due to an error:             msg="input(1, 0) Error: { expected"\nDBG Stack trace:                               stack_trace="parsejson.nim(518)       raiseParseErr\\n???                      start (Async)\\nasyncfutures.nim(381)    read\\n"\nShutting down due to an error: input(1, 0) Error: { expected\nparsejson.nim(518)       raiseParseErr\n???                      start (Async)\nasyncfutures.nim(381)    read\n\n'

neovim lsp config:

lsp.nim_langserver.setup {
  settings = {
    nim = {
      projectMapping = {
        {
          projectFile = 'tests/all.nim',
          fileRegex = 'tests/.*\\.nim'
        },
        {
          projectFile = 'main.nim',
          fileRegex = '.*\\.nim'
        },
      },
    },
  },
}

neovim version: v0.10.0
nimlangserver version: 1.4.0

@michaelsbradleyjr
Copy link

michaelsbradleyjr commented Jul 26, 2024

I'm experiencing essentially the same with Emacs after building-installing HEAD: nimble install nimlangserver@#head.

Recent changes seem to make some hard assumptions about a .json configuration file/s, i.e. assumptions that weren't made previously.

@jmgomez jmgomez self-assigned this Jul 28, 2024
@jmgomez
Copy link
Collaborator

jmgomez commented Jul 28, 2024

@doongjohn I installed nvim and checked it out and it does crash. However, it crashes for me in 1.2.0 as well. Can you confirm that for you it only crashes in 1.4.0?

BTW the issue seem to be in fileRegex if you remove it, it should work.

@doongjohn
Copy link
Author

@jmgomez version 1.2.0 crashes for me as well. However removing the fileRegex doesn't seem to fix the crash.

jmgomez added a commit to jmgomez/langserver that referenced this issue Jul 29, 2024
@jmgomez
Copy link
Collaborator

jmgomez commented Jul 29, 2024

@doongjohn can you confirm it doesnt crash for you anymore? Feel free to reopen if it does.

@doongjohn
Copy link
Author

How can I download the master branch via nimble? It seems like nimble is keep downloading 1.4.0 even with @#head
image

@jmgomez
Copy link
Collaborator

jmgomez commented Jul 30, 2024

How can I download the master branch via nimble? It seems like nimble is keep downloading 1.4.0 even with @#head

The version is not bump yet. If you want to be certain, you can clone the repro and do nimble build then replace the binary

@doongjohn
Copy link
Author

doongjohn commented Jul 30, 2024

@jmgomez master branch is not crashing for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants