pmizio / typescript-tools.nvim

⚡ TypeScript integration NeoVim deserves ⚡
MIT License
1.45k stars 40 forks source link

Open vue file with `vim_lsp_semantic_tokens` error. #250

Closed chaozwn closed 3 months ago

chaozwn commented 7 months ago

reproduce

  1. simple config

        ["typescript-tools"] = { -- enable inlay hints by default for `typescript-tools`
          filetypes = {
            "javascript",
            "javascriptreact",
            "javascript.jsx",
            "typescript",
            "typescriptreact",
            "typescript.tsx",
            "vue",
          },
          settings = {
            separate_diagnostic_server = true,
            tsserver_max_memory = "auto",
            code_lens = "all",
            tsserver_file_preferences = {
              includeInlayParameterNameHints = "all",
              includeInlayParameterNameHintsWhenArgumentMatchesName = false,
              includeInlayFunctionParameterTypeHints = false,
              includeInlayVariableTypeHints = false,
              includeInlayVariableTypeHintsWhenTypeMatchesName = false,
              includeInlayPropertyDeclarationTypeHints = true,
              includeInlayFunctionLikeReturnTypeHints = true,
              includeInlayEnumMemberValueHints = true,
              includeCompletionsForModuleExports = true,
              quotePreference = "auto",
            },
            tsserver_format_options = {
              allowIncompleteCompletions = false,
              allowRenameOfImportPath = false,
            },
            tsserver_plugins = {
              "@vue/typescript-plugin",
              "@styled/typescript-styled-plugin",
            },
            expose_as_code_action = "all",
            jsx_close_tag = {
              enable = true,
              filetypes = { "javascriptreact", "typescriptreact" },
            },
          },
        }
  2. install vue

    npm install -g @vue/typescript-plugin
  3. create vue project

    yarn create vue
    image
  4. yarn install

    yarn
    image
CofCat456 commented 6 months ago

Can temporarily solve the problem

on_attach = function(client)
  client.server_capabilities.semanticTokensProvider = false
end,

But I still hope @pmizio can take some time to look into these issues 🙏

KostkaBrukowa commented 3 months ago

hey @chaozwn . Can you check if linked PR solves the issue?

chaozwn commented 3 months ago

hey @chaozwn . Can you check if linked PR solves the issue?

works well.