vuejs / vetur

Vue tooling for VS Code.
https://vuejs.github.io/vetur/
MIT License
5.75k stars 593 forks source link

[VTI] Configuration options #2325

Open andrewisaburden opened 4 years ago

andrewisaburden commented 4 years ago

Feature Request

Currently VTI uses the configuration settings in initParams.ts. It would be useful to be able to configure those settings.

There seems to be a few options:

  1. Read a vscode settings.json file for the relevant vetur settings (this could be configurable by a CLI parameter, and default to the first found in the working directory)

  2. Provide CLI parameters to configure the settings

  3. Some other config file provided in the working directory.

I would like to implement one of these. 1 seems the most intuitive, except for projects that want to use VTI in their CI pipelines even though they don't typically/always use VSCode as their IDE. It seems a little odd to pollute a project with a vscode-specific settings.json, if vscode is not the mandated editor.

yoyo930021 commented 4 years ago

I think we can add vetur.config.js?

yoyo930021 commented 4 years ago

Here are my personal ideas:

  1. We can use vetur.config.js for vscode some settings and VTI settings.

    I can share the settings between VSCode and VTI. I agree with reading vscode settings.json is strange. If use vscode settings.json, I need to add this file to git, but It have some personal setting.

  2. The vetur.config.js add monorepo setting for support.

    I've been thinking about monorepo support. I'm not sure about package.json or tsconfig.json prevail in monorepo. I think it might be better if I set it up.

kytosai commented 4 years ago

Here are my personal ideas:

  1. We can use vetur.config.js for vscode some settings

    I can share the settings between VSCode and VTI. I agree with reading vscode settings.json is strange. If use vscode settings.json, I need to add this file to git, but It have some personal

Here are my personal ideas:

  1. We can use vetur.config.js for vscode some settings and VTI settings.

I can share the settings between VSCode and VTI. I agree with reading vscode settings.json is strange. If use vscode settings.json, I need to add this file to git, but It have some personal setting.

  1. The vetur.config.js add monorepo setting for support.

I've been thinking about monorepo support. I'm not sure about package.json or tsconfig.json prevail in monorepo. I think it might be better if I set it up.

I think this is a good solution for monorepo setup

Having an independent config file will help us be more proactive in setting up monorepo with different paths instead of depending on tsconfig file.

yoyo930021 commented 4 years ago

Hi everyone, 
If you interested this issue,
 you can go to https://github.com/vuejs/vetur/pull/2377 and https://github.com/vuejs/vetur/pull/2378. View and post your ideas.