juanfranblanco / vscode-solidity

Visual Studio Code language support extension for Solidity smart contracts in Ethereum https://marketplace.visualstudio.com/items?itemName=JuanBlanco.solidity
MIT License
871 stars 187 forks source link

lsp repsponse 'InitializeResult' doesn't include 'documentFormattingProvider' capability #442

Open sify21 opened 5 months ago

sify21 commented 5 months ago

I'm using this as a language server together with foundry and coc.nvim. Since it's not published on npm yet, I installed locally

git clone git@github.com:juanfranblanco/vscode-solidity.git
cd  vscode-solidity
npm ci
npm run prepublishOnly
npm link

Readme says formatting can be provided by forge, but 'InitializeResult' lsp response doesn't include this capability. see issue https://github.com/neoclide/coc.nvim/issues/4869

juanfranblanco commented 4 months ago

@sify21 that is not done in the lsp it is done via the client side.

sify21 commented 4 months ago

Oh, I thought lsp was working like a proxy, directing formatting request to the actual formatting provider which is Forge or Prettier

juanfranblanco commented 4 months ago

In this scenario it works in the "client" side not the lsp

juanfranblanco commented 4 months ago

It will need to be investigated how to move it all to the lsp