Coc.nvim: Use local project configs

Created on 24 Jun 2019  ·  3Comments  ·  Source: neoclide/coc.nvim

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.

Most helpful comment

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

All 3 comments

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andys8 picture andys8  ·  3Comments

iago-lito picture iago-lito  ·  3Comments

cvlmtg picture cvlmtg  ·  3Comments

tom-james-watson picture tom-james-watson  ·  3Comments

zhou13 picture zhou13  ·  3Comments