neoclide / coc-html

Html language server extension for coc.nvim.
207 stars 6 forks source link

How should i open configuration options for coc-html ? #15

Closed adityabads closed 4 years ago

adityabads commented 4 years ago

You have written to configure coc-html.. like this..

Configuration options html.enable set to false to disable html language server. html.trace.server set trace level of LSP traffic. html.execArgv add execArgv to child_process.spawn html.filetypes default [ "html", "handlebars", "htmldjango" ]. html.format.enable enable format support. html.validate.scripts validate for embedded scripts. html.validate.styles validate for embedded styles. html.autoClosingTags Enable/disable autoClosing of HTML tags. Trigger completion in coc-settings.json for complete list.

But didn't told how should i open configuration options?

chemzqm commented 4 years ago

https://github.com/neoclide/coc.nvim/wiki/Using-the-configuration-file

adityabads commented 4 years ago

But when i open :CocConfigure in vim it's empty, nothing is present in that file. So how should i configure coc-html? As stated-

Configuration options html.enable set to false to disable html language server. html.trace.server set trace level of LSP traffic. html.execArgv add execArgv to child_process.spawn html.filetypes default [ "html", "handlebars", "htmldjango" ]. html.format.enable enable format support. html.validate.scripts validate for embedded scripts. html.validate.styles validate for embedded styles. html.autoClosingTags Enable/disable autoClosing of HTML tags. Trigger completion in coc-settings.json for complete list.

chemzqm commented 4 years ago

You need learn json first.

adityabads commented 4 years ago

I'll...but Can you please help just to configure coc-html?

chemzqm commented 4 years ago

Can't help, I don't know what's your problem.

tillydray commented 4 years ago

@adityabads the answer is in https://github.com/neoclide/coc.nvim/wiki/Using-the-configuration-file, but it isn't very friendly for people who are new to json config files.

coc.nvim uses jsonc as configuration file format, the same as VSCode. It's json that supports comments, like:

{
  // my variable
  "foo": "bar"
}

What this is saying, is your config file starts with { and ends with }, and has config options in between. So "foo": "bar" means "configOptionName": "configOptionValue", or more concretely

{
  "html.enable": true, 
  "html.filetypes": ["html", "handlebars", "htmldjango"],
}