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

Use local project configs #909

Closed
aareman opened this issue Jun 24, 2019 · 3 comments
Closed

Use local project configs #909

aareman opened this issue Jun 24, 2019 · 3 comments

Comments

@aareman
Copy link

aareman commented Jun 24, 2019

Is your feature request related to a problem? Please describe.
To add project based config files.

Describe the solution you'd like
for example, In one project i want prettier to format on save, in another (legacy project where things could break) i want it to not do anything. so just to have a coc-settings.json in a project that overrides the global configs. maybe in a .vim folder in the root of the project.

Describe alternatives you've considered
I have none currently and couldn't find out how to get this working if it does exist already.

@iamcco
Copy link
Contributor

iamcco commented Jun 24, 2019

@chemzqm
Copy link
Member

chemzqm commented Jun 24, 2019

It's supported, add .vim/coc-settings.json to your project root or parent folder of project root.

@chemzqm chemzqm closed this as completed Jun 24, 2019
@aareman
Copy link
Author

aareman commented Jun 25, 2019

Thank you for the quick replies! :)

I have .vim/coc-settings.json in my project root.

inside it has

{
    "coc.preferences.formatOnSaveFiletypes": ["javascript", "javascriptreact", "css"]
}

i also have coc-prettier installed. And a prettierrc in the project root as well.

When i put that config in my global config CocConfig it works.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants