Comments (10)
Can confirm, using the nightly version of Neovim solves the issue. I guess we'll have to use that, wait for the next stable release, or use non-hybrid mode in the mean time.
from language-tools.
I cannot reproduce this with same config.
are you running volar and ts plugin under same version?
from language-tools.
Thank you very much for your support @RayGuo-ergou :)
from language-tools.
Both volar and the TS plugin are running version 2.0.17
:
$ npm list -g @vue/language-server
/home/b-erhart/.local/share/npm/lib
└── @vue/[email protected]
$ npm list -g @vue/typescript-plugin
/home/b-erhart/.local/share/npm/lib
├─┬ @vue/[email protected]
│ ├─┬ @vue/[email protected]
│ │ └── @vue/[email protected] deduped
│ └── @vue/[email protected]
└── @vue/[email protected]
Installing the typescript plugin for the project instead of globally doesn't change anything. Setting up the LSP with Mason instead of installing it globally with npm also doesn't change the behavior. If I find the time, I will check if I can replicate this on a different machine with a minimal neovim config.
from language-tools.
I have the same config as OP, but I don't get "Element is missing end tag" with either Hybrid mode on or off.
from language-tools.
hybrid
mode should not matter at all as it's purely provided by vue-language-server
, e.g. I can get that error even without javascript support (hybrid mode on, tsserver disabled)
Could you check the lspinfo
and lsplog
to see if there has any error/warnings?
from language-tools.
I tried your neovim config (from your repo), so that we could at least eliminate any configuration errors.
LspInfo:
8 client(s) attached to this buffer:
Client: typos_lsp (id: 1, bufnr: [38, 16])
filetypes: *
autostart: true
root directory: Running in single file mode.
cmd: /Users/hk/.local/share/nvim/mason/bin/typos-lsp
Client: tailwindcss (id: 2, bufnr: [38, 16])
filetypes: aspnetcorerazor, astro, astro-markdown, blade, clojure, django-html, htmldjango, edge, eelixir, elixir, ejs, erb, eruby, gohtml, gohtmltmpl, haml, handlebars, hbs, html, html-eex, heex, jade, leaf, liquid, markdown, mdx, mustache, njk, nunjucks, php, razor, slim, twig, css, less, postcss, sass, scss, stylus, sugarss, javascript, javascriptreact, reason, rescript, typescript, typescriptreact, vue, svelte, templ
autostart: true
root directory: /Users/hk/Projects/mlink-vue3-frontend/webapp
cmd: /Users/hk/.local/share/nvim/mason/bin/tailwindcss-language-server --stdio
Client: eslint (id: 3, bufnr: [38, 16])
filetypes: typescript, javascript, javascriptreact, typescriptreact, vue, json, jsonc, markdown, yaml, yaml.docker-compose, yaml.gitlab
autostart: true
root directory: /Users/hk/Projects/mlink-vue3-frontend/webapp
cmd: /Users/hk/.local/share/nvim/mason/bin/vscode-eslint-language-server --stdio
Client: tsserver (id: 4, bufnr: [38, 16])
filetypes: javascript, javascriptreact, javascript.jsx, typescript, typescriptreact, typescript.tsx, vue
autostart: true
root directory: /Users/hk/Projects/mlink-vue3-frontend/webapp
cmd: /Users/hk/.local/share/nvim/mason/bin/typescript-language-server --stdio
Client: null-ls (id: 5, bufnr: [38, 16])
filetypes: php, zsh
autostart: false
root directory: /Users/hk/Projects/mlink-vue3-frontend
cmd: <function>
Client: copilot (id: 6, bufnr: [38, 16])
filetypes:
autostart: false
root directory: /Users/hk/Projects/mlink-vue3-frontend/webapp
cmd: node /Users/hk/.local/share/nvim/lazy/copilot.lua/copilot/index.js
Client: emmet_ls (id: 7, bufnr: [38])
filetypes: astro, css, eruby, html, htmldjango, javascriptreact, less, pug, sass, scss, svelte, typescriptreact, vue
autostart: true
root directory: /Users/hk/Projects/mlink-vue3-frontend
cmd: /Users/hk/.local/share/nvim/mason/bin/emmet-ls --stdio
Client: volar (id: 8, bufnr: [38])
filetypes: vue
autostart: true
root directory: /Users/hk/Projects/mlink-vue3-frontend/webapp
cmd: /Users/hk/.local/share/nvim/mason/bin/vue-language-server --stdio
Other clients that match the filetype: vue
Config: unocss
filetypes: html, javascriptreact, rescript, typescriptreact, vue, svelte
root directory: Not found.
cmd: /Users/hk/.local/share/nvim/mason/bin/unocss-language-server --stdio
cmd is executable: true
autostart: true
custom handlers:
LspLog:
[START][2024-05-15 12:50:34] LSP logging initiated
[WARN][2024-05-15 12:50:34] ...lsp/handlers.lua:137 "The language server eslint triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless"
[WARN][2024-05-15 12:50:34] ...lsp/handlers.lua:137 "The language server copilot triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless"
[WARN][2024-05-15 12:52:55] ...lsp/handlers.lua:137 "The language server emmet_ls triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless"
[WARN][2024-05-15 12:52:55] ...lsp/handlers.lua:137 "The language server emmet_ls triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless"
I notice when I leave Insert mode after I remove the end tag, I get this error:
And no error in the buffer itself:
from language-tools.
Could you check the
lspinfo
andlsplog
to see if there has any error/warnings?
I don't see any errors or warnings there.
To isolate the issue, I've created the following minimal Neovim configuration that I can reproduce the issue with:
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
{ "neovim/nvim-lspconfig", lazy = false },
})
local lspconfig = require("lspconfig")
lspconfig.tsserver.setup({
init_options = {
plugins = {
{
name = "@vue/typescript-plugin",
location = "/home/b-erhart/.local/share/npm/lib/node_modules/@vue/typescript-plugin",
languages = {"javascript", "typescript", "vue"},
},
},
},
filetypes = { "javascript", "typescript", "vue" },
})
lspconfig.volar.setup({})
Maybe you can reproduce the issue with this configuration (+ Volar and TS plugin version 2.0.17
) @RayGuo-ergou?
If it can't be reproduced with that config, I think its safe to say that the issue is not with the neovim configuration but occurs somewhere else.
from language-tools.
I probably know where's the issue is. I am running nightly neovim:
vim -v
NVIM v0.10.0-dev-3135+g7acf39dda
Build type: RelWithDebInfo
LuaJIT 2.1.1713484068
Run "nvim -V1 -v" for more info
It might be new vue-language-server uses lsp event 0.9.5 does not support yet.
Can you guys try with nightly neovim and see if the problem solved? ( download binary problem the quickest way)
from language-tools.
Maybe you can reproduce the issue with this configuration (+ Volar and TS plugin version 2.0.17) @RayGuo-ergou?
Lazy to do things here and there to make this config working, but I tried with nvim.kickstater
( should be minimal enough) and still cannot reproduce this.
My best guess as mentioned above is neovim version
from language-tools.
Related Issues (20)
- The code style is abnormal. HOT 1
- vue-tsc 2.0.18: Property 'xyz' does not exist on type 'abc' when using v-for HOT 5
- Event listeners type issues after upgrade `'($event: any) => void' is not assignable to type '() => any'` HOT 1
- 升级到 2.0.18后在组件上使用 v-for 会导致 style等部分属性报 ts类型错误 HOT 2
- 编译崩溃 HOT 1
- 开发微信小程序,view标签会类型错误提示 HOT 2
- Type assertions in setup are not narrowed in template
- How to comment tempalte code with <!-- --> ,not {{/* */}}? HOT 1
- Vue - Official v2.0.19 Cannot automatically complete @ events, such as click events HOT 3
- Document required node version HOT 1
- High CPU usage
- Why color styling is broken? HOT 4
- Cannot find module '@uni' or its corresponding type declarations. HOT 6
- vue-tsc actual readme HOT 1
- Module `@vue/runtime-core` cannot be reconized by language server HOT 2
- Duplicate intellisense
- Incorrect auto-complete for tag-like string in template literals
- v2.0.17之后自定义组件的HoverTip没了
- .vscode typescript settings not respected in .vue files HOT 6
- configuring tags?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from language-tools.