Skip to content

Neovim Volar extension isn't providing code completion within <script> tag #4912

@yuzhen1024

Description

@yuzhen1024

Vue - Official extension or vue-tsc version

VSCode version

NVIM v0.11.0

Vue version

2.6.14

TypeScript version

System Info

System: OS: Linux 6.10 Debian GNU/Linux trixie/sid Container: Yes Shell: 5.9 - /usr/bin/zsh Binaries: Node: 20.17.0 - /usr/bin/node npm: 9.2.0 - /usr/bin/npm pnpm: 9.9.0 - /usr/local/bin/pnpm

package.json dependencies

No response

Steps to reproduce

图片
图片
图片
图片
ok

图片
图片
not ok

What is expected?

require'lspconfig'.volar.setup{ filetypes = { "vue", "javascript" }, init_options = { typescript = { tsdk = "/home/xxx/.local/share/pnpm/global/5/node_modules/typescript/lib"	}, vue = { -- takeOverMode = { -- ["*.vue"] = true, -- }, vueFeatures = { globalComponents = true, optionsApi = true, filters = true, compositionApi = false, jsx = false, slots = true, templateRefs = true, directives = true,	}	} } }

What is actually happening?

Link to minimal reproduction

No response

Any additional comments?

I want to configure Neovim for Vue 2 development.
I followed the steps here to install and configure: https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#volar
Currently template and style tags are supported, but js syntax in script is not supported.

:LspLog
[WARN][2024-10-09 10:14:43] ...lsp/handlers.lua:626 "[Vue Named Pipe Client] No server found for /home/.../index.vue"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions