-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add Vue Language Support #784
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
Conversation
MischaPanch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice PR, solid contribution, thank you!
I did a first shallow review, pls make sure tests pass in windows and dependencies are downloaded on the fly. When that's done I will review one more time in more detail.
One thing that would be very useful if you have the capacity to do that is to extract a more general pattern - a language server that uses another language server for cross-reference finding. This would also make it possible to implement svelte support without much hassle.
As it stands, we would get Vue support, but for svelte support the generalization would need to happen to keep the code clean, which would be a somewhat large refactoring. If you do have time, it would be great to address this already (you don't have to add the Svelte support yourself now, of course)
* Test on windows * fixing up tests for windows * Remove debug workflow
@MischaPanch I did go ahead and create another branch that extracts this to a more general pattern. If you check out tylersatre#2 you'll need the changes compared to this branch, to make it easier to look at just the companion server changes instead of adding Vue + companion server all together. Let me know what you think and if you like it I can open the PR to merge it back to here instead of just showing the changes against my branch. |
Conflicts: docs/01-about/020_programming-languages.md
…of files (adding priority to the Language enum, deprioritising languages that are supersets of others)
|
@tylersatre would you say we are ready for the merge now? Once thing I thought was missing was an explicit tie-breaking strategy (which I added with the most recent commit). Previously the preference for TypeScript/JavaScript over Vue when a project contains no .vue files was basically coincidental. |
I think so! Good catch and fix on the tie-breaking strategy. |
|
Great! The macOS failure is an unrelated random failure. Thanks a lot, @tylersatre. |
|
@tylersatre I had to squash the changes for the merge. I have recreated your In the future, if you want us to merge your PRs without squashing, keep the history clean by using amend and interactive rebase, such that every commit represents a well-defined, meaningful addition. |
Adds full Vue.js language support to Serena using the official
@vue/language-server.Key Changes
New Vue Language Server (
src/solidlsp/language_servers/vue_language_server.py)@vue/language-serverfor Vue SFC (.vue) file supportSymbol Resolution Fix (
src/serena/code_editor.py)defineExpose({ pressCount })where the same symbol appears as both definition and shorthand property referenceConfiguration & Integration
VUElanguage enum and file matchers for.vueand TypeScript/JavaScript variants_get_language_id_for_file()hook inSolidLanguageServerfor language-specific file type handlingTests
Comprehensive test suite covering:
Test repository includes Vue components, composables, Pinia stores, and TypeScript type definitions to validate real-world Vue project patterns.