GithubHelp home page GithubHelp logo

Comments (10)

b-erhart avatar b-erhart commented on June 16, 2024 2

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.

RayGuo-ergou avatar RayGuo-ergou commented on June 16, 2024 1

I cannot reproduce this with same config.
image

are you running volar and ts plugin under same version?

from language-tools.

b-erhart avatar b-erhart commented on June 16, 2024 1

Thank you very much for your support @RayGuo-ergou :)

from language-tools.

b-erhart avatar b-erhart commented on June 16, 2024

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.

hkeidesen avatar hkeidesen commented on June 16, 2024

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.

RayGuo-ergou avatar RayGuo-ergou commented on June 16, 2024

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)
image
image

Could you check the lspinfo and lsplog to see if there has any error/warnings?

from language-tools.

hkeidesen avatar hkeidesen commented on June 16, 2024

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:

Screenshot 2024-05-15 at 13 04 32

And no error in the buffer itself:
image

from language-tools.

b-erhart avatar b-erhart commented on June 16, 2024

Could you check the lspinfo and lsplog 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.

RayGuo-ergou avatar RayGuo-ergou commented on June 16, 2024

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.

RayGuo-ergou avatar RayGuo-ergou commented on June 16, 2024

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.
image
image

My best guess as mentioned above is neovim version

from language-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.