Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsdoc enhance problem #221

Closed
songhn233 opened this issue May 28, 2021 · 5 comments
Closed

jsdoc enhance problem #221

songhn233 opened this issue May 28, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@songhn233
Copy link

#105 add the jsdoc support, but if using @description or other symbols, will show Request textDocument/hover failed.

/**
 * @description: something
 * @param {type} something
 * @return something
 */

Can support more symbols?

@IWANABETHATGUY
Copy link
Contributor

could not reproduce,

Header.vue

<template>
  <div>header</div>
</template>

<script lang="ts">
export default {
  props: {
    /**
     * @description: String
     * @deprecated
     * @param {type} String
     * @return something
     */
    test: String
  }
}
</script>

<style lang="less" scoped></style>

App.vue

<template>
  <div class="app-layout">
    <router-view v-if="fullScreenMode" />
    <div class="app-content" v-else>
      <app-header :test="text" />
      <div id="nav">
        <router-link to="/">Home</router-link> |
        <router-link to="/about">About</router-link> |
        <router-link to="/contact">Contact</router-link> |
        <router-link to="/tests">组件测试</router-link>
      </div>
      <router-view />
      <app-footer />
    </div>
  </div>
</template>

<script lang="ts">
import AppFooter from './Footer.vue'
import AppHeader from './Header.vue'
import { defineComponent, ref, watch } from 'vue'
import { useRouter } from 'vue-router'

export default defineComponent({
  components: {
    AppFooter,
    AppHeader
  },
  data() {
    return {
      text: ''
    }
  },
  setup() {
    const fullScreenMode = ref(true)
    const router = useRouter()
    watch(router.currentRoute, () => {
      fullScreenMode.value = Boolean(router.currentRoute.value.meta?.fullScreen)
    })

    return {
      fullScreenMode
    }
  }
})
</script>

<style lang="less" scoped>
.app-layout {
  height: 100%;
}
.app-content {
  position: relative;
  padding: 0;
  margin: 0;
}
.router-view {
  margin: 0;
  padding: 0;
}
</style>

image

Could you give a demo repo so that we could reproduce and resolved it.

@songhn233
Copy link
Author

<script lang="ts">
export default {
  props: {
    /**
     * @description: String
     * @deprecated
     * @param {type} String
     * @return something
     */
    text: String
  }
}
</script>

When i try to hover the text:

image

@johnsoncodehk
Copy link
Member

Can't reproduce, please provide your VSCode info from Help: About command, and your Volar version.

@johnsoncodehk johnsoncodehk added bug Something isn't working need info labels May 29, 2021
@songhn233
Copy link
Author

Can't reproduce, please provide your VSCode info from Help: About command, and your Volar version.

My Vscode info:

Version: 1.57.0-insider
Commit: 541a5d4fa70ab3095f23b28b88914e1f6a8f65c4
Date: 2021-05-28T09:50:27.880Z
Electron: 12.0.9
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Darwin arm64 20.4.0

Volar version:

0.25.14

@IWANABETHATGUY
Copy link
Contributor

I am pretty sure this bug is related to latest vscode insider, I could not reproduce this bug before i upgrade my vscode insider

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants