Skip to content

vue_ts_plugin_location() returns empty string when plugin is absent, passing invalid location to ts_ls #83

@ooloth

Description

@ooloth

Why

When @vue/typescript-plugin is not installed, vue_ts_plugin_location() returns '', which is passed directly as the location field to ts_ls. LSP servers receiving an empty string as a plugin location may error or behave unexpectedly rather than gracefully skipping the plugin.

Current state

lua/config/plugins/lang/vue.lua lines 6–9: the fallback return '' is returned when the plugin is absent. Line 17: location = vue_ts_plugin_location() passes this value directly into the ts_ls plugins table without a guard. An empty string location is invalid and may cause ts_ls startup errors.

Ideal state

  • When @vue/typescript-plugin is not found, the function returns nil and the plugins table omits the entry entirely (or a condition disables it).
  • ts_ls is never given an empty string as a plugin location.

Starting points

  • lua/config/plugins/lang/vue.lua — lines 6–9 (vue_ts_plugin_location return) and line 17 (call site)

QA plan

  1. On a machine without @vue/typescript-plugin, open Neovim and check :LspInfo — expect ts_ls starts without errors related to a missing or empty plugin location.
  2. On a machine with the plugin installed, confirm Vue TypeScript support still works normally.

Done when

ts_ls receives no location entry (rather than an empty-string location) when @vue/typescript-plugin is absent.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions