serdarciplak / BlazorMonaco

Blazor component for Microsoft's Monaco Editor which powers Visual Studio Code.
https://serdarciplak.github.io/BlazorMonaco/
MIT License
441 stars 99 forks source link

Add support for markers and completion items #61

Closed LePtitDev closed 1 year ago

LePtitDev commented 2 years ago
serdarciplak commented 1 year ago

I’m currently working on aligning BlazorMonaco’s structure and class names better with MonacoEditor. I’ll add this feature after that is done.

KTAlcoda commented 1 year ago

An issue I encountered when playing with the code is the improper disposing of the completionItemProvider. When creating multiple instances accross multiple razor pages of the blazor monaco editor, code completion items get reregistered on every page switch.

There are multiple ways of dealing with this, see for instance https://github.com/microsoft/monaco-editor/issues/2217 or https://github.com/microsoft/monaco-editor/issues/2084. One option could be to save a reference of the completion item provider and dispose that reference when disposing monaco editor in jsInterop. That is upon call of 'create' or 'dispose'.

owaits commented 1 year ago

This PR seems to have been up for a while now, is there any possibility of this feature being merged a published in a nuget update?

adam-dot-cohen commented 1 year ago

@owaits - been waiting on this for 8 months too. I created a copy and merged @LePtitDev's code w/ the upgrade to 0.33 in the meantime while we wait for @serdarciplak to get around to it...

https://github.com/adam-dot-cohen/BlazorMonacoCodeCompletion

adam-dot-cohen commented 1 year ago

Any updates on this?

serdarciplak commented 1 year ago

This PR is not up to date with v3.0.0 and cannot be merged. I'm making the same changes in the latest version. I'll let you know and close this PR when I'm done.

serdarciplak commented 1 year ago

Closing this PR as #99 made the same changes on the up-to-date version and aligned the interface of these methods with the original Monaco Editor.

The changes are released in v3.1.0