TypeFox / monaco-components

Monaco Editor and Language Client Wrapper, plus Monaco Editor React Component
MIT License
42 stars 13 forks source link

How to modify client's capabilities? #61

Closed jadestrong closed 8 months ago

jadestrong commented 8 months ago

There seems not to export an interface to modify the initialize request's capabilities params? I want to disable workspace.didChangeWatchedFiles capability, because there are no corresponding files to watch.

kaisalmen commented 8 months ago

@jadestrong the languageclient configuration options are only partially exposed and in contrast to monaco-languageclient you cannot fully pass a full LanguageClientOptions object. This is too limiting and needs to be enhanced/fixed.

kaisalmen commented 8 months ago

@jadestrong It is now possible to provide and fully override both monaco-languageclient's clientOptions and connectionProvider. New releases are available: https://www.npmjs.com/package/monaco-editor-wrapper/v/3.6.0 https://www.npmjs.com/package/@typefox/monaco-editor-react/v/2.6.0

It is briefly demonstrated here: https://github.com/TypeFox/monaco-components/blob/main/packages/examples/src/reactPython.tsx#L45-L52