Skip to content
/ lsp-yaml Public

[DEPRECATED] YAML support for lsp-mode (YAML support is included in lsp-mode)

Notifications You must be signed in to change notification settings

iquiw/lsp-yaml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lsp-yaml

CircleCI Coverage Status

YAML support for lsp-mode using yaml-language-server.

Setup

Prerequisite

Install yaml-language-server (>= v0.4.0) by npm.

$ npm install -g yaml-language-server

Dependency

Configuration

To enable lsp-yaml in yaml-mode buffer, with use-package,

(use-package lsp-yaml
  :after lsp
  :config
  (add-hook 'yaml-mode-hook #'lsp))

Customization

lsp-yaml-format-enable

Specify whether to enable YAML format feature.

Default is nil.

lsp-yaml-format-options

Specify YAML format options as plist, alist or hash table. Specified options are converted to JSON object under yaml.format and sent to the server as is.

For example,

(:singleQuote t :bracketSpacing :json-false :proseWrap "preserve")

will be sent as

{
  "yaml": {
    "format": {
      "singleQuote": true,
      "bracketSpacing": false,
      "proseWrap": "preserve"
    }
  }
}

Refer to Language Server Settings of yaml-language-server for the detail.

Default is nil.

lsp-yaml-language-server-dir

Directory where yaml-language-server is installed.

Default is yaml-language-server installed under global NPM prefix directory.

lsp-yaml-schemas

Schemas plist or alist that associates schema with glob patterns. This can be also a hash table.

For example,

(setq lsp-yaml-schemas '(:kubernetes "/*-k8s.yaml"))

Default is nil.

lsp-yaml-validate

Specify whether to enable YAML validation feature.

Default is t.

lsp-yaml-hover

Specify whether to enable hover feature.

Default is t.

lsp-yaml-completion

Specify whether to enable YAML autocompletion feature.

Default is t.

About

[DEPRECATED] YAML support for lsp-mode (YAML support is included in lsp-mode)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published