Code Monkey home page Code Monkey logo

coc-yaml's Introduction

coc-yaml

Fork of vscode-yaml that works with coc.nvim

Install

In your vim/neovim, run command:

:CocInstall coc-yaml

Features

  1. YAML validation:
    • Detects whether the entire file is valid yaml
    • Detects errors such as:
      • Node is not found
      • Node has an invalid key node type
      • Node has an invalid type
      • Node is not a valid child node
  2. Document Outlining (:CocOutline):
    • Provides the document outlining of all completed nodes in the file
  3. Auto completion:
    • Auto completes on all commands
    • Scalar nodes autocomplete to schema's defaults if they exist
  4. Hover support:
    • Hovering over a node shows description if provided by schema
  5. Formatter:
    • Allows for formatting the current file
    • On type formatting auto indent for array items

Auto completion and hover support are provided by the schema. Please refer to Language Server Settings to setup a schema

YAML version support

Starting from 1.0.0 the extension uses eemeli/yaml as the new YAML parser, which strictly enforces the specified YAML spec version. Default YAML spec version is 1.2, it can be changed with yaml.yamlVersion setting.

Extension commands

  • yaml.selectSchema: Choose yaml schema for current file, update configuration in user's coc-settings.json

Extension Settings

The following settings are supported:

  • yaml.enable: Enable/disable coc-yaml (requires restart)
  • yaml.execArgv: The execArgv option for node running yaml language server.
  • yaml.yamlVersion: Set default YAML spec version (1.2 or 1.1)
  • yaml.format.enable: Enable/disable default YAML formatter (requires restart)
  • yaml.format.singleQuote: Use single quotes instead of double quotes
  • yaml.format.bracketSpacing: Print spaces between brackets in objects
  • yaml.format.proseWrap: Always: wrap prose if it exeeds the print width, Never: never wrap the prose, Preserve: wrap prose as-is
  • yaml.format.printWidth: Specify the line length that the printer will wrap on
  • yaml.validate: Enable/disable validation feature
  • yaml.hover: Enable/disable hover
  • yaml.completion: Enable/disable autocompletion
  • yaml.schemas: Helps you associate schemas with files in a glob pattern
  • yaml.schemaStore.enable: When set to true the YAML language server will pull in all available schemas from JSON Schema Store
  • yaml.schemaStore.url: URL of a schema store catalog to use when downloading schemas.
  • yaml.customTags: Array of custom tags that the parser will validate against. It has two ways to be used. Either an item in the array is a custom tag such as "!Ref" and it will automatically map !Ref to scalar or you can specify the type of the object !Ref should be e.g. "!Ref sequence". The type of object can be either scalar (for strings and booleans), sequence (for arrays), mapping (for objects).
  • yaml.maxComputedItems: The maximum number of outline symbols and folding regions computed (limited for performance reasons).
  • yaml.disableDefaultProperties: Disable adding not required properties with default values into completion text (default is false).
  • [yaml]: VSCode-YAML adds default configuration for all yaml files. More specifically it converts tabs to spaces to ensure valid yaml, sets the tab size, and allows live typing autocompletion and formatting, also allows code lens. These settings can be modified via the corresponding settings inside the [yaml] section in the settings:
    • editor.tabSize
    • editor.formatOnType
    • editor.codeLens
  • http.proxy: The URL of the proxy server that will be used when attempting to download a schema. If it is not set or it is undefined no proxy server will be used.
  • http.proxyStrictSSL: If true the proxy server certificate should be verified against the list of supplied CAs. Default is false.

in to your settings.

Adding custom tags

In order to use the custom tags in your YAML file you need to first specify the custom tags in the setting of your code editor. For example, you can have the following custom tags:

"yaml.customTags": [
    "!Scalar-example scalar",
    "!Seq-example sequence",
    "!Mapping-example mapping"
]

The !Scalar-example would map to a scalar custom tag, the !Seq-example would map to a sequence custom tag, the !Mapping-example would map to a mapping custom tag.

You can then use the newly defined custom tags inside the YAML file:

some_key: !Scalar-example some_value
some_sequence: !Seq-example
  - some_seq_key_1: some_seq_value_1
  - some_seq_key_2: some_seq_value_2
some_mapping: !Mapping-example
  some_mapping_key_1: some_mapping_value_1
  some_mapping_key_2: some_mapping_value_2

Associating schemas

YAML Language support uses JSON Schemas to understand the shape of a YAML file, including its value sets, defaults and descriptions. The schema support is shipped with JSON Schema Draft 7.

We support schemas provided through JSON Schema Store. However, schemas can also be defined in a workspace.

The association of a YAML file to a schema can be done either in the YAML file itself using a modeline or in the User or Workspace settings under the property yaml.schemas.

Associating a schema in the YAML file

It is possible to specify a yaml schema using a modeline.

# yaml-language-server: $schema=<urlToTheSchema>

Associating a schema to a glob pattern via yaml.schemas:

yaml.schemas applies a schema to a file. In other words, the schema (placed on the left) is applied to the glob pattern on the right. Your schema can be local or online. Your schema must be a relative path and not an absolute path. The entrance point for yaml.schemas is location in user and workspace settings

When associating a schema it should follow the format below

"yaml.schemas": {
    "url": "globPattern",
    "Kubernetes": "globPattern"
}

e.g.

yaml.schemas: {
    "https://json.schemastore.org/composer": "/*"
}

e.g.

yaml.schemas: {
    "kubernetes": "/myYamlFile.yaml"
}

e.g.

yaml.schemas: {
    "https://json.schemastore.org/composer": "/*",
    "kubernetes": "/myYamlFile.yaml"
}

On Windows with full path:

yaml.schemas: {
    "C:\\Users\\user\\Documents\\custom_schema.json": "someFilePattern.yaml",
}

On Mac/Linux with full path:

yaml.schemas: {
    "/home/user/custom_schema.json": "someFilePattern.yaml",
}

Since 0.11.0 YAML Schemas can be used for validation:

 "/home/user/custom_schema.yaml": "someFilePattern.yaml"

A schema can be associated with multiple globs using a json array, e.g.

yaml.schemas: {
    "kubernetes": ["filePattern1.yaml", "filePattern2.yaml"]
}

e.g.

"yaml.schemas": {
    "http://json.schemastore.org/composer": ["/*"],
    "file:///home/johnd/some-schema.json": ["some.yaml"],
    "../relative/path/schema.json": ["/config*.yaml"],
    "/Users/johnd/some-schema.json": ["some.yaml"],
}

e.g.

"yaml.schemas": {
    "kubernetes": ["/myYamlFile.yaml"]
}

e.g.

"yaml.schemas": {
    "http://json.schemastore.org/composer": ["/*"],
    "kubernetes": ["/myYamlFile.yaml"]
}

Multi root schema association:

You can also use relative paths when working with multi root workspaces.

Suppose you have a multi root workspace that is laid out like:

My_first_project:
   test.yaml
   my_schema.json
My_second_project:
   test2.yaml
   my_schema2.json

You must then associate schemas relative to the root of the multi root workspace project.

"yaml.schemas": {
    "My_first_project/my_schema.json": "test.yaml",
    "My_second_project/my_schema2.json": "test2.yaml"
}

yaml.schemas allows you to specify json schemas that you want to validate against the yaml that you write. Kubernetes is a reserved keyword field. It does not require a url as the language server will provide that. You just need the keyword kubernetes and a glob pattern.

Mapping a schema in an extension

  • Supports yamlValidation point which allows you to contribute a schema for a specific type of yaml file (Similar to jsonValidation) e.g.
{
  "contributes": {
    "yamlValidation": [
      {
        "fileMatch": "yourfile.yml",
        "url": "./schema.json"
      }
    ]
  }
}

Contribute

Consider support coc.nvim development on Patreon or PayPal:

Patreon donate button PayPal donate button

coc-yaml's People

Contributors

bamzi avatar chemzqm avatar chitoku-k avatar dependabot[bot] avatar elliottcable avatar frederick888 avatar hurou927 avatar kevinhwang91 avatar masaeedu avatar onsails avatar pappasam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

coc-yaml's Issues

Linting works, formatting doesn't

Hi @chemzqm 👋

I'm having a similar issue as #8 (comment). Linting works fine, but <Plug>(coc-format-selected) doesn't do anything. When I look at :CocOpenLog, the following log entry sticks out to me:

2021-01-02T23:58:52.962 WARN (pid:55705) [handler-format] - format provider not found!

I also have formatting enabled in coc-settings.json. Is there anything else I can do to help you figure this out?

Feature request: load/merge settings.json from current directory

It would be nice to have, if coc-yaml would load and merge the yaml.schemas from within the current working directory. I work on a project where we use custom schemas for yaml files. VSCode loads the schemas from the local directory .vscode/settings.json where.

Providing a option to enable and configure local project configuration would be great.

coc-yaml cannot resolve $ref for ansiblem.json schema

Coc-yaml 1.8.0 reports the following error every time I open a *.yml file related to Ansible tasks.

[E][cocyaml] $ref '%2F%24defs%2Ftasks' in 'https://raw.githubusercontent.com/ansible-community/schemas/main/f/ansible.json' can not be resolved.

I have not seen this error in previous coc-yaml versions.

My setup is:

  • vim 9.0
  • coc-yaml 1.8.0
  • vim plugins
    • neoclide/coc.nvim, 'release' branch
    • pearofducks/ansible-vim
    • dense-analysis/ale

My :CocConfig is:

{
  "diagnostic.displayByAle": true,
  "suggest.autoTrigger": "always",
  "suggest.triggerCompletionWait": 400,
  "languageserver": {}
}

These are the CoC extensions I install via .vimrc:

let g:coc_global_extensions = [
            \'coc-docker',
            \'coc-go',
            \'coc-json',
            \'coc-pyright',
            \'coc-sh',
            \'coc-yaml',
\]

My knowledge about this topic is very limited, the URL for the ansible.json schema exists and there is a section for /$defs/tasks in it.

Can a license be added?

Hello, thanks for this great plugin.

I was planning to use it for work-related code, but I couldn't find an attached license explicitly allowing it. I'm not a legal expert, but according to this website, https://choosealicense.com/no-permission/, "no license" implies "no permission".
If there isn't one, can an open source license such as MIT or similar be added?

Thanks!

Command support

It would be nice to provide command so that user can apply schema to current buffer on the fly. Right now schemas apply to specified filename patterns, this could not cover all condition where filename don't follow convention.

Can't download and apply YAML custom schema

Versions
vim version: NVIM v0.4.3
node version: v13.7.0
coc.nvim version: 0.0.74-6700e7468d
term: iTerm.app
platform: darwin

Hello,
I can't get coc to registrar the custom schema. My coc-settings.json has the following...

{
...
"yaml.schemas": {
      "http://json.schemastore.org/drone": "*"
    },
...
}

I can see the following config in the logs

[Trace - 10:25:54 AM] Sending notification 'workspace/didChangeConfiguration'.
Params: {
    "settings": {
        "yaml": {
            "execArgv": [],
            "trace": {
                "server": "verbose"
            },
            "schemas": {
                "http://json.schemastore.org/drone": "*"
            },
            "format": {
                "enable": false,
                "singleQuote": false,
                "bracketSpacing": true,
                "proseWrap": "preserve"
            },
            "validate": true,
            "hover": true,
            "completion": true,
            "customTags": []
        },
        "http": {
            "proxyStrictSSL": true
        }
    }
}

but I see no change in behavior and have the following in the logs...

[Trace - 10:25:54 AM] Sending notification 'json/schemaAssociations'.
Params: {}


[Trace - 10:25:54 AM] Sending notification 'yaml/registerCustomSchemaRequest'.
No parameters provided.


[Trace - 10:25:54 AM] Received request 'custom/schema/request - (0)'.
Params: "file:///Users/davidwilliams/git/api-gateway/.drone.yml"


[Trace - 10:25:54 AM] Sending response 'custom/schema/request - (0)'. Processing request took 0ms
No result returned.

Am I missing something? Thank you for your help!

Crashes immediately after updating to 1.4.1

Hey and thanks for all your work on coc.nvim and all the useful extensions! 😃
After updating coc-yaml to version 1.4.1 I always get a server crash when coc-yaml is activated:

TypeError: Cannot read property 'length' of undefined
    at SettingsHandler.setConfiguration (/home/imeyer/.config/coc/extensions/node_modules/coc-yaml/node_modules/yaml-language-server/out/server/src/languageserver/handlers/settingsHandlers.js:79:51)
    at SettingsHandler.<anonymous> (/home/imeyer/.config/coc/extensions/node_modules/coc-yaml/node_modules/yaml-language-server/out/server/src/languageserver/handlers/settingsHandlers.js:56:18)
    at Generator.next (<anonymous>)
    at fulfilled (/home/imeyer/.config/coc/extensions/node_modules/coc-yaml/node_modules/yaml-language-server/out/server/src/languageserver/handlers/settingsHandlers.js:5:58)
[Info  - 9:16:12 AM] Connection to server got closed. Server will restart.
/home/imeyer/.config/coc/extensions/node_modules/coc-yaml/node_modules/yaml-language-server/out/server/src/languageserver/handlers/settingsHandlers.js:79
                if (settings.yaml.schemaStore.url.length !== 0) {
                                                  ^

I am on a Linux box with the latest coc.nvim version.

completion for yaml is partially working

i'm using spacevim with coc lately for kubernetes yaml. it works for pod.spec.but when i entered pod.spec.livenessCheck, no completion prompts. the same configuration for VS Code is working.

"yaml.schemas": {
    
    "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.17.0-standalone-strict/all.json":"/*.yaml"
},

No file not starting language server

Hi,
When opening a kubernetes manifest, immediately it's being recognized, the language server kicks in, and the schema is loaded:
image

However, when I'm opening a "nofile", when running this command for example:

kubectl get deployment hello-world -oyaml | vim

The filetype is detected, however the language server doesn't start.
image

:CocCommand document.echoFiletype
yaml

I tried :CocRestart, I tried setting the filetype again setf yaml
Nothing helped.
It works when I open a file with .yaml extension, or a plain text file and then I set the filetype,
It also works when I open a blank file, paste yaml content and set the filetype.
For some weird reason, if I open vim from pipe, the languageserver doesn't start.
Ideas?

Plugin is not working

nvim version:

NVIM v0.4.3
Build type: Release
Lua 5.3
Compilation: /usr/bin/clang -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DNVIM_UNIBI_HAS_VAR_FROM -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_editors_neovim/neovim/work/build/config -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_editors_neovim/neovim/work/neovim-0.4.3/src -I/opt/local/include -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_editors_neovim/neovim/work/build/src/nvim/auto -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_editors_neovim/neovim/work/build/include
Compiled by [email protected]

Features: +acl +iconv +tui

Using [email protected]

When I have a .yaml file open in vim, I check the process tree (ps aux | grep yaml) and I see the server.js start:

esn89              7618   0.0  0.3  4632184  49360   ??  S    11:14PM   0:00.49 /opt/local/bin/node /Users/esn89/.config/coc/extensions/node_modules/coc-yaml/node_modules/yaml-language-server/out/server/src/server.js --node-ipc --node-ipc --clientProcessId=6969

Output of :CocOpenLog:

2020-06-19T23:16:44.209 INFO (pid:7862) [services] - registered service "languageserver.bash"
2020-06-19T23:16:44.246 INFO (pid:7862) [services] - registered service "yaml"
2020-06-19T23:16:44.247 INFO (pid:7862) [services] - yaml server state change: stopped => starting
2020-06-19T23:16:44.248 INFO (pid:7862) [plugin] - coc.nvim 0.0.78 initialized with node: v10.21.0 after 180ms
2020-06-19T23:16:44.251 INFO (pid:7862) [language-client-index] - yaml started with 7916
2020-06-19T23:16:44.432 INFO (pid:7862) [services] - yaml server state change: starting => running
2020-06-19T23:16:44.439 INFO (pid:7862) [services] - service yaml started

And this is what my :CocConfig looks like:

{
	"diagnostic.errorSign": " ", "diagnostic.warningSign": "⚠",
	"diagnostic.infoSign": "☞",
	"diagnostic.hintSign": "☀",
	"diagnostic.displayByAle": true,
	"coc.preferences.hoverTarget": "float",
	"coc.preferences.formatOnSaveFiletypes": ["go"],
	"list.insertMappings": {
		"<C-x>": "action:split",
		"<C-s>": "action:vsplit"
	},
	"list.normalMappings": {
		"<C-x>": "action:split",
		"<C-s>": "action:vsplit"
	},
	"suggest.timeout": 500,
	"suggest.completionItemKindLabels": {
		"variable": "⬥",
		"function": "𝑓",
		"class": "↣",
		"interface": "☍",
		"module": "{}",
		"keyword": "≔",
		"property": "⚲",
		"value": "◰",
		"enum": "◰",
		"field": "☐",
		"method": "𝑓",
		"file": "\uf24a",
		"folder": "\uf114"
	},
	"python.linting.flake8Path": "/Users/esn89/Library/Python/3.7/bin/flake8",
	"python.linting.flake8Enabled": true,
	"python.linting.enabled": false,
	"python.jediEnabled": false,
	"python.sortImports.path": "/Users/esn89/Library/Python/3.7/bin/isort",
	"yaml.trace.server": "verbose",
	"yaml.customTags": [
		"!Ref",
		"!GetAtt",
		"!fn",
		"!And",
		"!And sequence",
		"!If",
		"!Condition sequence",
		"!Condition scalar",
		"!If sequence",
		"!Not sequence",
		"!Equals sequence",
		"!Or",
		"!FindInMap sequence",
		"!Base64",
		"!Cidr",
		"!Sub sequence",
		"!Sub scalar",
		"!GetAZs",
		"!ImportValue",
		"!Select",
		"!Split",
		"!stack_output_external",
		"!stack_output",
		"!Join sequence"
	],
	"yaml.trace.server": "verbose",
	"yaml.validate": true,
	"yaml.completion": true,
	"yaml.format.enable": true,
	"languageserver": {
	  "bash": {
	    "command": "bash-language-server",
	    "args": ["start"],
	    "filetypes": ["sh"],
	    "ignoredRootPaths": ["~"]
		}
	}
}

Any help would be appreciated.

How to make it work?

CocInstall coc-yaml
My coc-settings.json:

{
  "yaml.trace.server": "verbose",
  "yaml.schemas": {
    "http://json.schemastore.org/ansible-stable-2.7": "*"
  }
}

:CocOpenLog:

2020-01-22T13:21:10.633 INFO (pid:29611) [services] - registered service "diagnostic-languageserver"
2020-01-22T13:21:10.669 INFO (pid:29611) [services] - registered service "eslint"
2020-01-22T13:21:10.683 INFO (pid:29611) [services] - registered service "highlight"
2020-01-22T13:21:10.693 INFO (pid:29611) [language-client-index] - highlight started with 29654
2020-01-22T13:21:10.701 INFO (pid:29611) [plugin] - coc 0.0.74-db5ffd2ff0 initialized with node: v13.7.0
2020-01-22T13:21:10.774 INFO (pid:29611) [services] - highlight server state change: starting => running

Nothing happen When i trying to open any of *.yml files except yaml.ansible extension in status bar.

Kubernetes schema not working

Hi.
I'm trying to configure completion for k8s manifests, but with no luck.
I have tried various settings eg.

"yaml.schemas": {
            "url": "globPattern",
            "Kubernetes": "globPattern"
    },

and

"yaml.schemas": {
    "kubernetes": ["/*.yaml"]
}

without success.
What could be the cause?

I'm using neovim

NVIM v0.4.3
Build type: Release
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-gOb7vg/neovim-0.4.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=1 -DDISABLE_LOG -Wdate-time -D_FORTIFY_SOURCE=1 -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim-gOb7vg/neovim-0.4.3/build/config -I/build/neovim-gOb7vg/neovim-0.4.3/src -I/usr/include -I/usr/include/lua5.1 -I/build/neovim-gOb7vg/neovim-0.4.3/build/src/nvim/auto -I/build/neovim-gOb7vg/neovim-0.4.3/build/include
Compiled by [email protected]

Vim's config is pure, taken from coc-nvim help.

CocConfig:

  {
    "languageserver": {
        "golang": {
          "command": "gopls",
          "rootPatterns": ["go.mod"],
          "filetypes": ["go"]
        }
    },

    "yaml.schemas": {
            "url": "globPattern",
            "Kubernetes": "globPattern"
    },
    "coc.preferences.extensionUpdateCheck": "daily",
    "yaml.completion": true,
    "yaml.validate": true,
    "yaml.trace.server": "verbose",
    "yaml.schemaStore.enable": true,
    "yaml.schemaStore.url": "https://www.schemastore.org/api/json/catalog.json",
    "yaml.disableAdditionalProperties": false
  }

Help with azure-pipelines.yml

Hi,
I'm getting different results between vscode and vim (coc-yaml extension installed) whilst opening the following file (azure-pipelines.yml):

  # Starter pipeline
  # Start with a minimal pipeline that you can customize to build and deploy your code.
  # Add steps that build, run tests, deploy, and more:
  # https://aka.ms/yaml

  trigger:
  - master

  stages:
  - stage: Plan
    jobs:
    - job: running_terraform_plan
      displayName: Running Terraform Plan
      pool:
        vmImage: 'ubuntu-latest'
      steps:
>>      - task: AzureCLI@1
          displayName: Terraform
>>        inputs:
            azureSubscription: 'asubscription'
>>          scriptLocation: inlineScript
>>          addSpnToEnvironment: true
>>          inlineScript: |
              make apply

my coc-settings.json looks like this:

  {
    "languageserver": {
      "golang": {
        "command": "gopls",
        "rootPatterns": ["go.mod", ".vim/", ".git/", ".hg/"],
        "filetypes": ["go"]
      },
      "terraform": {
        "command": "terraform-lsp",
        "filetypes": ["terraform", "tf"]
      },
      "bash": {
        "command": "bash-language-server",
        "args": ["start"],
        "filetypes": ["sh"],
        "ignoredRootPaths": ["~"]
      }
    },
    "yaml.schemas": {
      "http://json.schemastore.org/ansible-stable-2.7": "/*.yml",
      "kubernetes": "/*.yaml",
      "https://raw.githubusercontent.com/docker/compose/master/compose/config/config_schema_v3.7.json": "/docker-compose.yml",
      "https://raw.githubusercontent.com/microsoft/azure-pipelines-vscode/master/service-schema.json": "/azure-pipelines.yml"
    },
    "yaml.trace.server": "verbose",
    "coc.preferences.extensionUpdateCheck": "daily"
  }

What I might be missing here? Why the file is parsed correctly (it is a valid azure-pipelines.yml file) ?

Hovering over the task entry the error is as follow:

[yaml] [E] String does not match the pattern of "^AzureVmssDeployment@0$".

and when looking at the schema it is clear the in vim we don't match the patterns correctly?

Thanks in advance!

Disable quote replacement

In yaml single and double quotes have different meanings (https://yaml-multiline.info/) and I want to be able to auto format my file but keep the quotes as they are.
I see an option to choose between single or double quotes but no option to just keep them as they are.

docker-compose

When i edit dokcer-compose.yml, coc-yaml always don't working. I don't know how to check.

How do I configure a schema that uses a "bundle" format?

See here: https://github.com/ansible/schemas#schema-bundle

The Ansible schemas have migrated to using this new bundle format but coc-yaml cannot seem to resolve the schema in this format.

image

I have my yaml.schemas configured as they suggest in the linked documentation:

image

For the filetypes in the image above that use the non-bundle format (ansible-meta, ansible-vars), the schema works just fine, but the bundle ones (lines 114, 115) i get the errors above.

Can coc-yaml resolve these types of URLs?

Overlapping globs patterns

Is it possible to have overlapping globs patterns and specify which has to be used for a specific file afterwards?
I've tried this:

"yaml.schemas": {
    "kubernetes": "/*.y*ml",
    "http://json.schemastore.org/ansible-stable-2.5": "/*.y*ml"
  }

but coc is trying to validate a .yml kubernetes file using the ansible schema (probably because it's the last matching pattern declared).

help for settings of yaml.schemas

it seems that coc-yaml supports k8s .yaml format,but i can't figure out how to config coc-yaml to support it ;

is there anyone who had practiced with issue ?

waiting online for response ...

Is it possible to override tab size as in vscode?

To override the tab size the readme says:
...

  • [yaml]: VSCode-YAML adds default configuration for all yaml files. More specifically it converts tabs to spaces to ensure valid yaml, sets the tab size, and allows live typing autocompletion. These settings can be modified via the corresponding settings inside the [yaml] section in the settings:
    • editor.insertSpaces
    • editor.tabSize
    • editor.quickSuggestions

...

But when I try adding these settings at the top level I get the following:
image

Maybe I'm just missing where this config should go 🤔 thanks.

Kubernetes schemas

Hello,

In the demo, there is a "kubernetes.yml" configuration file which allows smart completion. I can't seem to find it anywhere. In VScode, enabling it is as simple as adding this to your settings:

"yaml.schemas": {
  "Kubernetes": "*.yaml"
}

There is no Kubernetes schema in http://schemastore.org/json/. I tried using kustomization.yaml (http://json.schemastore.org/kustomization), but it doesn't work as in the demo.

Any help would be much appreciated.

Strange spaces are inserted if coc.preferences.formatOnType is set

When I insert a bullet in yaml with coc.preferences.formatOnType enabled, it inserts weirdly

Peek.2021-11-17.23-38.mp4

neovim version: v0.6.0-dev+582-g87a053f12

minimal init.lua

vim.cmd [[syntax enable]]
vim.cmd [[filetype plugin indent on]]

local execute = vim.api.nvim_command
local install_path = vim.fn.stdpath('data')..'/site/pack/packer/opt/packer.nvim'

if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
  execute('!git clone https://github.com/wbthomason/packer.nvim '..install_path)
end

vim.cmd [[packadd packer.nvim]]

-- trailing whitespace
vim.cmd [[
hi TrailingWhitespace ctermbg=red guibg=red
call matchadd("TrailingWhitespace", '\v\s+$')
]]

return require('packer').startup(function()
  use {'wbthomason/packer.nvim', opt = true}
  use {'neoclide/coc.nvim',
    branch = 'release',
    config = function()
       vim.cmd[[call coc#config('coc.preferences.formatOnType', 'true')]]
       vim.g.coc_global_extensions = {'coc-yaml'}
    end}
end)
~

Some schemas missing in selectSchema list

I've confirmed that the Argo Workflows schema is located in the default schemastore url https://www.schemastore.org/api/json/catalog.json, but it doesn't appear when I run CocCommand yaml.selectSchema (even though tons of others do.

I'm on CocUpdate 1.7.5 and latest coc version.

.gitlab-ci schema not working

I have these lines in my coc-settings.json

"https://json.schemastore.org/gitlab-ci.json": [
    "*gitlab-ci*"
]

But the plugin (or LSP) is ignoring them, I have no completion or validation in any of my .gitlab-ci.yml or .gitlab-ci.yaml files.

[Trace - 2:56:12 PM] Sending request 'textDocument/completion - (2)'.
Params: {
    "textDocument": {
        "uri": "file:///home/user/Development/redacted/.gitlab-ci.yml"
    },
    "position": {
        "line": 12,
        "character": 4
    },
    "context": {
        "triggerKind": 1
    }
}


[Trace - 2:56:12 PM] Received request 'custom/schema/request - (12)'.
Params: [
    "file:///home/user/Development/redacted/.gitlab-ci.yml"
]


[Trace - 2:56:12 PM] Sending response 'custom/schema/request - (12)'. Processing request took 0ms
Result: []


[Trace - 2:56:12 PM] Received response 'textDocument/completion - (2)' in 9ms.
Result: {
    "items": [],
    "isIncomplete": false
}
## versions

vim version: NVIM v0.5.0
node version: v16.5.0
coc.nvim version: 0.0.80-fe35d5fe2b
coc.nvim directory: /home/user/.vim/plugged/coc.nvim
term: screen-256color
platform: linux

I added the same config lines in my VSCode-yaml config, and completion works fine. Also, coc-yaml actually works with other file schemas, for example, I managed to set up ansible without a problem, so it's something weird with gitlab-ci specifically. Could you please help me with troubleshooting this issue to set up the plugin properly?


Here is the full coc-settings.json file

{
    "yaml.schemas": {
        "https://json.schemastore.org/ansible-inventory.json": "inventory/*.yml",
        "https://json.schemastore.org/ansible-playbook.json": [
            "playbooks/*.yml",
            "*.playbook.yml"
        ],
        "https://json.schemastore.org/ansible-role-2.9.json": [
            "roles/*/tasks/*.yml"
        ],
        "https://json.schemastore.org/gitlab-ci.json": [
            "*gitlab-ci*"
        ]
    },
    "yaml.completion": true,
    "yaml.validate": true,
    "json.format.enable": true,
    "yaml.format.enable": true,
    "yaml.trace.server": "verbose",
    "yaml.schemaStore.enable": true,
    "languageserver": {
        "terraform": {
            "command": "terraform-ls",
            "args": [
                "serve"
            ],
            "filetypes": [
                "terraform",
                "tf"
            ],
            "initializationOptions": {}
        }
    }
}

Autoformat is broken

vimrc:
let g:coc_global_extensions = [ \ 'coc-yaml', \ ] let g:coc_filetype_map = { \ 'yml': 'yaml', \ }

coc-settings.json :
{ "coc.preferences.formatOnSaveFiletypes": [ "yaml" ], "yaml.trace.server": "verbose", "yaml.format.singleQuote": true, "yaml.format.enable": true }

log:
2021-02-06T00:00:22.379 INFO (pid:827) [plugin] - coc.nvim 0.0.80-1e2652e725 initialized with node: v14.15.4 after 52ms 2021-02-06T00:02:35.209 INFO (pid:827) [attach] - receive notification: doHover [] 2021-02-06T00:02:35.210 WARN (pid:827) [Handler] - hover provider not found! 2021-02-06T00:02:35.347 INFO (pid:827) [language-client-index] - yaml started with 844 2021-02-06T00:02:36.083 INFO (pid:827) [attach] - receive notification: doHover [] 2021-02-06T00:02:36.192 INFO (pid:827) [attach] - receive request: CocAutocmd [ 'BufWritePre', 2 ] 2021-02-06T00:02:37.026 INFO (pid:827) [attach] - receive notification: doHover [] 2021-02-06T00:02:40.232 INFO (pid:827) [attach] - receive notification: openLog []
yml files autoformat on save not works (same problem with .yaml)

YAML files inside a dir named tasks are incorrectly parsed

neovim: v0.4.4

Any yaml files that I put inside a directory called tasks are incorrectly parsed by coc-yaml. I confirmed this by removing coc-yaml and I no longer got the syntax error popping up.

Incorrect type. Expected "array".
[yaml-schema: Ansible 2.9:]

I have no clue if Ansible is at all relevant to the problem. I don't use ansible or have any of it's related apps installed on my system.

My file.yaml

some: value
keys: 123
lists:
  - item1
  - item2

maps_here:
  thing: here
  other: thing here

Expected Results

YAML files are correctly parsed.

Actual Results

The yaml file inside tasks is incorrectly parsed. Files inside any other dir are correctly parsed.
image

After removing coc-yaml
image

Error for coc-yaml

I install the coc-yaml extention, but when I want to add any field about yaml, such as yaml.trace.server , I get the following error:

QQ截图20200319214011

The CocInfo is:

vim version: NVIM v0.4.3
node version: v12.15.0
coc.nvim version: 0.0.77-b7a597f7ae
term: xterm-256color
platform: linux

and my CocConfig file is:
QQ图片20200319214153

try to see a CocOpenLog:
QQ截图20200319214348

Have tried to uninstall the coc-yaml, uninstall coc-neovim and reinstall them, but none of these worked. So anything I can do to fix this?

npx causing issues

I had an issue installing this pack on my Mac via vim-plug.

During installation this line "prepare": "npx npm-run-all clean build" failed for me. I got the error message below. I noticed that other similar projects don't use npx, so I tried to remove it, and then everything worked perfectly.

Found & ignored ./node_modules ; is listed in .gitignore

Starting: clean
node:internal/modules/cjs/loader:928
  throw err;
  ^

Error: Cannot find module '/Users/<username>/.local/share/nvim/plugged/coc-yaml/clean'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:925:15)
    at Function.Module._load (node:internal/modules/cjs/loader:769:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}```

Property DeletionPolicy is not allowed

Hey! Thanks for this extension!
I'm having some troubles when I try to write a yml for serverless framework.
I receive the error Property DeletionPolicy is not allowed, but the configuration is correct.

Screenshot from 2022-03-05 17-12-46

Can you see if I'm doing something wrong?

about docker-compose.yml

When I edit the docker-compose.yml file, it cannot be completed normally, starting from the third line of image
image

yaml.schema incorrectly flags property

My coc-settings.json file has the following setting:

{
  "yaml.schemas": {}
}

That's not a typo. I do not have any yaml schemas configured in my coc-settings.json file.

The Problem

When I edit a yaml file in .semaphore/deploy.yml, coc-yaml flags all the top-level properties as invalid with the following message:

[yaml-schema: https://raw.githubusercontent.com/deployphp/deployer/master/src/schema.json] [E] Property version is not allowed.

Why is coc-yaml pulling a schema from deployphp/deployer? This doesn't happen for all yaml files.

JSON schemas with a `required` attribute cause `coc-yaml` to break the LSP contract on `textDocument/completion` request

coc.nvim: 0.0.81
coc-yaml: 1.7.5 (the bug does not appear on 1.6.1)

When using JSON schema documents with a required attribute, coc-yaml incorrectly generates that value as completion item. This ultimately leads to coc.nvim complaining that the server gave a completion item with a label attribute, [against the LSP spec] (https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItem).

This can be observed by editing e.g. github workflows yaml files: I've made a screencast.

asciicast

The cast shows the following:

  • I inspect the JSON schema document, showing the fragment "required": ["on", "jobs"].
  • I edit an arbitrary yaml file merge-upstream.yml that uses the schema, and try to do a completion, receiving an error like
2022-06-27T18:40:13.946 ERROR (pid:152449) [node-client] - Cannot read properties of undefined (reading 'trim') TypeError: Cannot read properties of undefined (reading 'trim')
    at LanguageSource.convertVimCompleteItem (/home/psacawa/.vim/bundle/coc.nvim/build/index.js:62595:32)
    at /home/psacawa/.vim/bundle/coc.nvim/build/index.js:62468:27
    at Array.map (<anonymous>)
    at LanguageSource.doComplete (/home/psacawa/.vim/bundle/coc.nvim/build/index.js:62467:35)
2022-06-27T18:40:13.946 ERROR (pid:152449) [completion-complete] - Complete error: yaml TypeError: Cannot read properties of undefined (reading 'trim')
    at LanguageSource.convertVimCompleteItem (/home/psacawa/.vim/bundle/coc.nvim/build/index.js:62595:32)
    at /home/psacawa/.vim/bundle/coc.nvim/build/index.js:62468:27
    at Array.map (<anonymous>)
    at LanguageSource.doComplete (/home/psacawa/.vim/bundle/coc.nvim/build/index.js:62467:35)
  • I open the servers responses with workspace.showOutput coc-yaml. There, I find that in response to textDocument/completion, it gave a completion item like
        {
            "insertText": "on\njobs:\n  ",
            "insertTextFormat": 2,
            "documentation": {
                "kind": "markdown",
                "value": "The name of the GitHub event that triggers the workflow. You can provide a single event string, array of events, array of event types, or an event configuration map that schedules a workflow or restricts the execution of a workflow to specific files, tags, or branch changes. For a list of available events, see https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows.\n\n----\n\n```yaml\non\njobs:\n  \n```"
            },
            "textEdit": {
                "range": {
                    "start": {
                        "line": 3,
                        "character": 0
                    },
                    "end": {
                        "line": 3,
                        "character": 1
                    }
                },
                "newText": "on\njobs:\n  "
            },
            "sortText": "_undefined",
            "kind": 7
        },

which seems to be the result of erroneously taking the required attribute of the JSON schema and turning it into a completion item.

String of type integer gets pasted as int

In some schemes a string containing a number is listed, but the extension will insert the number without quotes (and then it will give an error because it doesn't match the options). And this can be a problem with values like 3.10 vs "3.10" (the former could get parsed as 3.1).

Looks like this problem was fixed upstream in redhat-developer/yaml-language-server#340

Question: How to customize filetypes

I don't know if this is the right place to ask this question, but I would like to know how to enable this extension on filetypes other than yaml. For instance, using the vim-ansible plugin, it adds a new yaml.ansible filetype. I'd like to enable coc-yaml on this filetype, but am not quite understanding how to do it. Any help or advice would be greatly appreciated.

Kustomize schemas getting ignored.

It seems as though the kustomization schema is being totally ignored. Below is a valid kustomization.yaml (but with errors highlighted):

>>apiVersion: kustomize.config.k8s.io/v1beta1
>>kind: Kustomization

  resources:
>>  - deployment.yaml
>>  - pdb.yaml
>>  - service.yaml
>>  - serviceaccount.yaml

>>commonLabels:
    app.kubernetes.io/component: swagger-apis
    app.kubernetes.io/name: swagger-apis
    app.kubernetes.io/part-of: service1

Hovering over the errors, I get stuff like:

[yaml-schema: https://raw.githubusercontent.com/instrumenta/kubernetes-json-schema/master/v1.17.0-standalone-strict/_definitions.json] \
[E] Missing property "groupVersion"

We can see it's targeting the Kubernetes schema even though I specified another schema. If I remove reference to Kubernetes schema, then it works as expected. Initially I thought it was something I was doing wrong and it didn't respect precedence, but it works as expected for other schemas such as docker-compose or circleconfig. This is my cog-settings.json so far.

{
  "languageserver": {
      "golang": {
        "command": "gopls",
        "rootPatterns": ["go.mod"],
        "filetypes": ["go"]
      },

      "terraform": {
        "command": "terraform-ls",
        "filetypes": ["terraform", "tf"]
      }
  },

  "yaml.format.enable": true,
  "yaml.schemas": {
      "kubernetes": "/*.yaml",
      "https://json.schemastore.org/kustomization.json": "/kustomization.yaml",
      "https://json.schemastore.org/circleciconfig.json": ".circleci/config.yaml",
      "https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json": "/docker-compose.ya?ml"
  },

    "coc.preferences.extensionUpdateCheck": "daily"
}

Can't configure with Kubernetes schema

Hello.
Can't configure with Kubernetes schema.

In config (CocConfig) set:
$ cat ~/.vim/coc-settings.json { "yaml.trace.server": "verbose", "python.linting.flake8Enabled": true, "python.linting.enabled": true, "yaml.format.enable": true, "yaml.validate": true, "json.format.enable": true, "yaml.schemas": { "kubernetes": ["/*.yaml"] } }

versions

`
vim version: VIM - Vi IMproved 8.1 8012269
node version: v12.22.6
coc.nvim version: 0.0.80-daab29410d
coc.nvim directory: /home/pilot/.vim/plugged/coc.nvim
term: dumb
platform: linux

Log of coc.nvim

2021-09-02T09:13:41.354 INFO (pid:1898) [plugin] - coc.nvim 0.0.80-daab29410d initialized with node: v12.22.6 after 73ms
2021-09-02T09:13:44.964 INFO (pid:1898) [attach] - receive notification: showInfo []
`

CocTrace:
[Trace - 9:19:23] Sending notification 'workspace/didChangeConfiguration'. Params: { "settings": { "yaml": { "execArgv": [], "trace": { "server": "verbose" }, "schemas": { "kubernetes": [ "/*.yaml" ] }, "format": { "enable": true, "singleQuote": false, "bracketSpacing": true, "proseWrap": "preserve", "printWidth": 80 }, "validate": true, "hover": true, "completion": true, "customTags": [], "schemaStore": { "enable": true, "url": "https://www.schemastore.org/api/json/catalog.json" }, "disableAdditionalProperties": false, "maxItemsComputed": 5000 }, "http": { "proxyStrictSSL": true }, "[yaml]": {} } }
What am I doing wrong? Can you help me, please

Wrong configuration of LS "yaml.schemas", filetypes not found

I try to use this plugin to have the autocompletion and definitons of kubernetes in yaml.

Install the plugin with :CocInstall coc-yaml

And this is my conf:

{
  "suggest.echodocSupport": true,
  "diagnostic.checkCurrentLine": true,
  "suggest.noselect": false,
  "coc.preferences.formatOnSaveFiletypes": ["*"],
  "prettier.eslintIntegration": true,
  "coc.preferences.rootPatterns": [".gitmodules", ".vim"],
  "languageserver": {
    "yaml.schemas": {
      "kubernetes": "*.yaml"
    },
    "golang": {
      "command": "gopls",
      "rootPatterns": ["go.mod"],
      "trace.server": "verbose",
      "filetypes": ["go"]
    },
    "ccls": {
      "command": "ccls",
      "filetypes": ["c", "cpp", "objc", "objcpp"],
      "rootPatterns": [
        ".ccls",
        "compile_commands.json",
        ".vim/",
        ".git/",
        ".hg/"
      ],
      "initializationOptions": {
        "cache": {
          "directory": "/tmp/ccls"
        }
      }
    }
  }
}

And i got Wrong configuration of LS "yaml.schemas", filetypes not found when i open nvim

## versions

vim version: NVIM v0.5.0-nightly
node version: v15.14.0
coc.nvim version: 0.0.80-ba262ef030
coc.nvim directory: /Users/chris/.vim/bundle/coc.nvim
term: tmux
platform: darwin

## Log of coc.nvim

2021-04-16T14:04:59.029 INFO (pid:47661) [services] - registered service "languageserver.yaml.schemas"
2021-04-16T14:04:59.036 INFO (pid:47661) [services] - registered service "languageserver.golang"
2021-04-16T14:04:59.037 INFO (pid:47661) [services] - registered service "languageserver.ccls"
2021-04-16T14:04:59.717 INFO (pid:47661) [plugin] - coc.nvim 0.0.80-ba262ef030 initialized with node: v15.14.0 after 841ms
2021-04-16T14:05:15.054 INFO (pid:47661) [attach] - receive notification: showInfo []

I miss something?

Extended glob matching for schema

I'd like to apply the kubernetes schema to all yaml or yml file in a directory, but not files containing the word values, since these are Helm files and the schema does not apply. With extended glob this is very easy to accomplish: **/k8s/**/!(*values).+(yaml|yml)". It does not seem to be working with coc-yaml. Is there a way to accomplish this task?

formatting not respecting yaml spec 1.2 for Collections

I have configure the yaml.format.enable to true and I'm using the Azure pipelines yaml schema. I also have the coc configuration format on save set to true. When I save the document, it indents my collection elements instead of keeping them on the same vertical line.
Example:
Before

steps:
- task: ABC
  inputs:
    test: hello

After formatting:

steps:
  - task: ABC
    inputs:
      test: hello

The formatting shouldn't change the indentation of the collection if we follow the yaml spec 1.2. Why is this happening?

The language server crashes when specifying a custom schema

I tried this first with a local config, but it happens with the global config as well. As soon as I add this to the config, the server starts crashing and never recovers.

{
  "yaml.schemas": {
    "https://some.company.host/path/to/some/schema.json": ["*file-glob.yaml"]
  }
}

I checked in a browser that I can reach the URL and it does respond with a JSON file.

This is the output of CocCommand workspace.showOutput and selecting yaml when prompted.

C:\Users\XXX\.config\coc\extensions\node_modules\coc-yaml\node_modules\yaml-language-server\out\server\src\languageservice\services\yamlSchemaService.js:231
                        schema.schema.url = schemaHandle.url;
                                          ^

TypeError: Cannot create property 'url' on string 'en'
    at C:\Users\XXX\.config\coc\extensions\node_modules\coc-yaml\node_modules\yaml-language-server\out\server\src\languageservice\services\yamlSchemaService.js:231:43
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Here is some version info

vim version: NVIM v0.6.0-dev+12-gf515baedc
node version: v16.7.0
coc.nvim version: 0.0.80-3086844413
coc.nvim directory: C:\Users\XXX\AppData\Local\nvim-data\site\pack\packer\start\coc.nvim
term: vtpcon
platform: win32
coc-yaml: 1.4.2

can't resolve yaml-language-server

I installed both: coc-yaml extension and yaml-language-server (with yarn global add), but it says:

[coc.nvim]Can't resolve yaml-language-server

Extension failing to start with error: "The "yaml" server crashed 5 times in the last 3 minutes. The server will not be restarted"

The error happened as soon as I opened the first yaml file after install. Below is debug output from CocCommand workspace.showOutput

node:internal/modules/cjs/loader:903
  throw err;
  ^

Error: Cannot find module 'vscode-json-languageservice/lib/umd/services/jsonDefinition'
Require stack:
- <HOME>/.config/coc/extensions/node_modules/coc-yaml/node_modules/yaml-language-server/out/server/src/languageservice/services/yamlDefinition.js
- <HOME>/.config/coc/extensions/node_modules/coc-yaml/node_modules/yaml-language-server/out/server/src/languageservice/yamlLanguageService.js
- <HOME>/.config/coc/extensions/node_modules/coc-yaml/node_modules/yaml-language-server/out/server/src/server.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:900:15)
    at Function.Module._load (node:internal/modules/cjs/loader:745:27)
    at Module.require (node:internal/modules/cjs/loader:972:19)
    at require (node:internal/modules/cjs/helpers:88:18)
    at Object.<anonymous> (<HOME>/.config/coc/extensions/node_modules/coc-yaml/node_modules/yaml-language-server/out/server/src/languageservice/services/yamlDefinition.js:5:26)
    at Module._compile (node:internal/modules/cjs/loader:1083:30)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1112:10)
    at Module.load (node:internal/modules/cjs/loader:948:32)
    at Function.Module._load (node:internal/modules/cjs/loader:789:14)
    at Module.require (node:internal/modules/cjs/loader:972:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '<HOME>/.config/coc/extensions/node_modules/coc-yaml/node_modules/yaml-language-server/out/server/src/languageservice/services/yamlDefinition.js',
    '<HOME>/.config/coc/extensions/node_modules/coc-yaml/node_modules/yaml-language-server/out/server/src/languageservice/yamlLanguageService.js',
    '<HOME>/.config/coc/extensions/node_modules/coc-yaml/node_modules/yaml-language-server/out/server/src/server.js'
  ]
}
[Info  - 6:44:16 PM] Connection to server got closed. Server will restart.

Here is also the contents of the directory node_modules/vscode-json-languageservice/lib/umd/services/ showing that the module jsonDefinition does not exist:

❯ tree node_modules/vscode-json-languageservice/lib/umd/services/
node_modules/vscode-json-languageservice/lib/umd/services/
├── configuration.js
├── jsonCompletion.js
├── jsonDocumentSymbols.js
├── jsonFolding.js
├── jsonHover.js
├── jsonLinks.js
├── jsonSchemaService.js
├── jsonSelectionRanges.js
└── jsonValidation.js

0 directories, 9 files

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.