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

LSP[solc] not functional #2478

Open
zeroknots opened this issue Feb 24, 2023 · 4 comments
Open

LSP[solc] not functional #2478

zeroknots opened this issue Feb 24, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@zeroknots
Copy link

Description

Trying to use solc LSP in lazyvim
simply installed solc lsp, and it throws error with every character I type

LSP[solc]: Error INVALID_SERVER_MESSAGE: {
  error = {
    code = -32803,
    message = "Unknown file: file:///Users/ops/work/*****/foundry/playground/src/Counter.sol"
  },
  jsonrpc = "2.0"

Neovim version

NVIM v0.8.0
Build type: Release
LuaJIT 2.1.0-beta3

Nvim-lspconfig version

91998ce

Operating system and version

MacOS 12.6

Affected language servers

solc

Steps to reproduce

  1. install solc
  2. mkdir foobar
  3. forge init
  4. nvim ./src/Counter.sol
  5. type anything in nvim
  6. -> errors appear as documentented below

Actual behavior

LSP[solc]: Error INVALID_SERVER_MESSAGE: {
error = {
code = -32803,
message = "Unknown file: file:///Users/ops/work/*****/foundry/playground/src/Counter.sol"
},
jsonrpc = "2.0"

Expected behavior

No response

Minimal config

:LspInstall solc

LSP log

@zeroknots zeroknots added the bug Something isn't working label Feb 24, 2023
@zeroknots zeroknots changed the title solc lsp throws errors with evey character typed into nvim LSP[solc] not functional Feb 24, 2023
@glepnir
Copy link
Member

glepnir commented Feb 24, 2023

looks like the server not handle the schema + filename.

@zeroknots
Copy link
Author

@glepnir is there anything I can do to config this?

@dalechyn
Copy link

I also confirm this bug with trying to get solc --lsp working in the nvim environment.

@iFrostizz
Copy link

You can use the hardhat solidity extension which is to date probably the best one: NomicFoundation/hardhat-vscode#362

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants