Skip to content

add vue support for ts_ls#1310

Open
miaapancake wants to merge 7 commits intoNotAShelf:mainfrom
miaapancake:vue_language_server
Open

add vue support for ts_ls#1310
miaapancake wants to merge 7 commits intoNotAShelf:mainfrom
miaapancake:vue_language_server

Conversation

@miaapancake
Copy link

@miaapancake miaapancake commented Dec 26, 2025

In this PR I've added support for vue in the ts_ls language server.

Sanity Checking

  • I have updated the changelog as per my changes
  • I have tested, and self-reviewed my code
  • My changes fit guidelines found in hacking nvf
  • Style and consistency
    • I ran Alejandra to format my code (nix fmt)
    • My code conforms to the editorconfig configuration of the project
    • My changes are consistent with the rest of the codebase
  • If new changes are particularly complex:
    • My code includes comments in particularly complex areas
    • I have added a section in the manual
    • (For breaking changes) I have included a migration guide
  • Package(s) built:
    • .#nix (default package)
    • .#maximal
    • .#docs-html (manual, must build)
    • .#docs-linkcheck (optional, please build if adding links)
  • Tested on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin

Add a 👍 reaction to pull requests you find important.

@github-actions
Copy link

github-actions bot commented Dec 26, 2025

🚀 Live preview deployed from ef1f22e

View it here:

Debug Information

Triggered by: miaapancake

HEAD at: vue_language_server

Reruns: 1755

Copy link
Owner

@NotAShelf NotAShelf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few notes regarding the correctness of the implementation and some formatting nits.

I'm not opposed to merging, but we should probably avoid polluting the closure for TS users while they haven't opted in to use Vue explicitly. The vue_ls server addition is fine, but I believe the plugin should not be added by default. I for one never use Vue anymore, but this would pull the LSP anyway and subject me to more rebuilds & cache hits for no reason.

You'll also want to update the v0.9 changelog (in docs/release-notes) with an entry.

@miaapancake
Copy link
Author

I've implemented the changes you requested. My bad on the formatting, I forgot to use alejandra instead of nixfmt.
I opted to separate the vue language support into its own module. I took the existing svelte one as a base to work off of.

I'm pretty new to nix so bare with me if I make some silly mistakes or assumptions. ;^^

github-actions bot pushed a commit that referenced this pull request Dec 26, 2025
@miaapancake miaapancake requested a review from NotAShelf January 12, 2026 09:57
Comment on lines +93 to +94
formatType =
enum (attrNames formats);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this type is wrong and errors when evaluating, since you expect a single value, but you're setting a list above.
see here:
https://github.com/miaapancake/nvf/blob/533135a95d147110e581da686975cd0312e4aac6/modules/plugins/languages/vue.nix#L67-L73

Looking at what you've been setting in defaultFormat above, you probably want this:

Suggested change
formatType =
enum (attrNames formats);
formatType =
nonEmptyListOf (enum (attrNames formats));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants