volarjs / volar.js

💙🌊
https://volarjs.dev/
MIT License
963 stars 47 forks source link

refactor(language-server): respect server capabilities when register language features handlers #212

Closed johnsoncodehk closed 2 months ago

johnsoncodehk commented 2 months ago

Language features handlers should be registered with respect to language server capabilities. This can avoid unnecessary registration and go some way to solving the problem of hidden side effects discovered by @Andarist.

Additionally, the refactoring mentioned at https://github.com/mdx-js/mdx-analyzer/pull/446#discussion_r1632408332 was also implemented.