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

Add support for window/progress notification #151

Open
3 tasks done
ssipos90 opened this issue Feb 11, 2023 · 0 comments
Open
3 tasks done

Add support for window/progress notification #151

ssipos90 opened this issue Feb 11, 2023 · 0 comments
Labels
type: enhancement Proposed improvement

Comments

@ssipos90
Copy link

Describe the request

Either implement or at least stop crashing when notifying for that.

Describe the current behavior

Neovim has this function that you can check if a server is ready, vim.lsp.buf.server_ready() which returns bool. If you call this function, arduino language server crashes, it can't handle that event (might be clangd who can't handle it). The function uses window/progress notification as seen in the source code:

function M.server_ready()
  return not not vim.lsp.buf_notify(0, 'window/progress', {})
end

The error logged by neovim's LSP is:

Panic: unimplemented notification: window/progress

goroutine 21 [running]:
runtime/debug.Stack()
	/usr/local/go/src/runtime/debug/stack.go:24 +0x65
github.com/arduino/arduino-language-server/streams.CatchAndLogPanic()
	/home/build/streams/panics.go:29 +0x74
panic({0xa353e0, 0xc0000fd8d0})
	/usr/local/go/src/runtime/panic.go:838 +0x207
go.bug.st/lsp.(*Server).notificationDispatcher(0xc000240c00, {0xc447e0, 0xc0004045d0}, {0xc000421530, 0xf}, {0xc000421520, 0x2, 0x8})
	/go/pkg/mod/go.bug.st/lsp@v0.1.2/server.go:252 +0xed4
go.bug.st/lsp/jsonrpc.(*Connection).handleIncomingNotification(0xc000190c00, 0xc00004ab80)
	/go/pkg/mod/go.bug.st/lsp@v0.1.2/jsonrpc/jsonrpc_connection.go:192 +0x1e3
go.bug.st/lsp/jsonrpc.(*Connection).handleIncomingData(0xc000190c00, {0xc000162700, 0x39, 0x39})
	/go/pkg/mod/go.bug.st/lsp@v0.1.2/jsonrpc/jsonrpc_connection.go:130 +0x156
go.bug.st/lsp/jsonrpc.(*Connection).Run(0xc000190c00)
	/go/pkg/mod/go.bug.st/lsp@v0.1.2/jsonrpc/jsonrpc_connection.go:119 +0x98
go.bug.st/lsp.(*Server).Run(...)
	/go/pkg/mod/go.bug.st/lsp@v0.1.2/server.go:134
github.com/arduino/arduino-language-server/ls.(*IDELSPServer).Run(...)
	/home/build/ls/lsp_server_ide.go:53
github.com/arduino/arduino-language-server/ls.NewINOLanguageServer.func1()
	/home/build/ls/ls.go:167 +0x5b
created by github.com/arduino/arduino-language-server/ls.NewINOLanguageServer
	/home/build/ls/ls.go:165 +0x6dc

Arduino Language Server version

0.7.4

Arduino CLI version

0.29.0-arch

Operating system

Linux

Operating system version

ManjaroLinux 22.0.1

Additional context

No response

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest version
  • My request contains all necessary details
@ssipos90 ssipos90 added the type: enhancement Proposed improvement label Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

1 participant