;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\303\304\305\306\307\301\310\311\312\313& \210\314\315\316\317\320DD\321\322\323\307\304\312\324& \210\314\325\316\317\326DD\327\322\323\307\304\312\330& \210\314\331\316\317\332DD\333\322\323\307\304\312\334& \210\314\335\316\317\336DD\337\322\340\307\304\312\341& \210\314\342\316\317\343DD\344\322\345\307\304\312\346& \210\314\347\316\317\350DD\351\322\323\307\304\312\352& \210\314\353\316\317\354DD\355\322\323\307\304\312\356& \210\314\357\316\317\360DD\361\322\323\307\304\312\362& \210\314\363\316\317\364DD\365\322\366\307\304\312\367& \210\314\370\316\317\371DD\372\322\323\307\304\312\373& \210\314\374\316\317\375DD\376\322\377\307\304\312\201@& \210\314\201A\316\317\201BDD\201C\322\201D\307\304&\210\314\201E\316\317\201FDD\201G\322\201H\307\304&\210\314\201I\316\317\201JDD\201K\322\345\307\304\312\201L& \207" [require lsp-mode dash custom-declare-group lsp-yaml nil "LSP support for YAML, using yaml-language-server." :group :link (url-link "https://github.com/redhat-developer/yaml-language-server") :package-version (lsp-mode . "6.2") custom-declare-variable lsp-yaml-format-enable funcall function #[0 "\300\207" [t] 1] "Enable/disable default YAML formatter." :type boolean (lsp-mode . "6.2") lsp-yaml-single-quote #[0 "\300\207" [nil] 1] "Use single quote instead of double quotes." (lsp-mode . "6.2") lsp-yaml-bracket-spacing #[0 "\300\207" [t] 1] "Print spaces between brackets in objects." (lsp-mode . "6.2") lsp-yaml-prose-wrap #[0 "\300\207" [#1="preserve"] 1 #1#] "Options for prose-wrap.\n Always: wrap prose if it exceeds the print width.\n Never: never wrap the prose.\n Preserve: wrap prose as-is." (choice (const "always") (const "never") (const "preserve")) (lsp-mode . "6.2") lsp-yaml-print-width #[0 "\300\207" [80] 1] "Specify the line length that the printer will wrap on." number (lsp-mode . "6.2") lsp-yaml-validate #[0 "\300\207" [t] 1] "Enable/disable validation feature." (lsp-mode . "6.2") lsp-yaml-hover #[0 "\300\207" [t] 1] "Enable/disable hover feature." (lsp-mode . "6.2") lsp-yaml-completion #[0 "\300\207" [t] 1] "Enable/disable completion feature." (lsp-mode . "6.2") lsp-yaml-schemas #[0 "\300\207" [nil] 1] "Associate schemas to YAML files in a glob pattern." (alist :key-type (symbol :tag "schema") :value-type (lsp-string-vector :tag "files (glob)")) (lsp-mode . "6.2") lsp-yaml-schema-store-enable #[0 "\300\207" [t] 1] "Enable/disable JSON Schema store. When set to true, available YAML\n schemas will be automatically pulled from the store." (lsp-mode . "6.2") lsp-yaml-custom-tags #[0 "\300\207" [nil] 1] "Custom tags for the parser to use." (lsp-repeatable-vector string) (lsp-mode . "6.2") lsp-yaml-schema-store-uri #[0 "\300\207" [#2="https://www.schemastore.org/api/json/catalog.json"] 1 #2#] "URL of schema store catalog to use." string lsp-yaml-schema-store-local-db #[0 "\300\301\302\303\304\305#!!\207" [expand-file-name locate-user-emacs-file f-join ".cache" "lsp" "lsp-yaml-schemas.json"] 6] "Cached databse of schema store." file lsp-yaml-max-items-computed #[0 "\300\207" [5000] 1] "The maximum number of outline symbols and folding regions computed.\nLimited for performance reasons." (lsp-mode . "7.1")] 10) #@47 A list of schemas fetched from schema stores. (defvar lsp-yaml--schema-store-schemas-alist nil (#$ . 3331)) (byte-code "\300\301!\210\302\303\304\305\306DD\307\310\311\312\313\314\315& \210\316\317\320\321#\210\322\323\324\325\326!\327\330\331\332\333\334\335\336\337\340&\f!\207" [lsp-register-custom-settings (("yaml.format.enable" lsp-yaml-format-enable t) ("yaml.format.singleQuote" lsp-yaml-single-quote t) ("yaml.format.bracketSpacing" lsp-yaml-bracket-spacing) ("yaml.format.proseWrap" lsp-yaml-prose-wrap) ("yaml.format.printWidth" lsp-yaml-print-width) ("yaml.validate" lsp-yaml-validate t) ("yaml.hover" lsp-yaml-hover t) ("yaml.completion" lsp-yaml-completion t) ("yaml.schemas" lsp-yaml-schemas) ("yaml.schemaStore.enable" lsp-yaml-schema-store-enable t) ("yaml.schemaStore.url" lsp-yaml-schema-store-uri) ("yaml.customTags" lsp-yaml-custom-tags) ("yaml.maxItemsComputed" lsp-yaml-max-items-computed)) custom-declare-variable lsp-yaml-server-command funcall function #[0 "\300\207" [("yaml-language-server" "--stdio")] 1] "Command to start yaml-languageserver." :type (repeat string) :group lsp-yaml :package-version (lsp-mode . "6.2") lsp-dependency yaml-language-server (:system "yaml-language-server") (:npm :package "yaml-language-server" :path "yaml-language-server") lsp-register-client make-lsp-client :new-connection lsp-stdio-connection #[0 "\301@!\206\n\302\303!AB\207" [lsp-yaml-server-command executable-find lsp-package-path yaml-language-server] 2] :major-modes (yaml-mode k8s-mode) :priority 0 :server-id yamlls :initialized-fn #[257 "\211\301\302\303!!)\207" [lsp--cur-workspace lsp--set-configuration lsp-configuration-section "yaml"] 4 "\n\n(fn WORKSPACE)"] :download-server-fn #[1028 "\300\301#\207" [lsp-package-ensure yaml-language-server] 8 "\n\n(fn CLIENT CALLBACK ERROR-CALLBACK UPDATE\\=\\?)"]] 14) (defconst lsp-yaml--built-in-kubernetes-schema '((name . "Kubernetes") (description . "Built-in kubernetes manifest schema definition") (url . "kubernetes") (fileMatch . ["*-k8s.yaml" "*-k8s.yml"]))) #@185 Download the remote schema store at `lsp-yaml-schema-store-uri' into local cache. Set FORCE-DOWNLOADING to non-nil to force re-download the database. (fn &optional FORCE-DOWNLOADING) (defalias 'lsp-yaml-download-schema-store-db #[256 "\211\204 \302!?\205\303\304!!\204\305\304!!\210\306 #\207" [lsp-yaml-schema-store-local-db lsp-yaml-schema-store-uri file-exists-p file-directory-p file-name-directory mkdir url-copy-file] 5 (#$ . 5380) "P"]) #@40 Get out the list of supported schemas. (defalias 'lsp-yaml--get-supported-schemas #[0 "\203 \204\304 \210\305\306\307\n!\"\310\311 C #\207" [lsp-yaml-schema-store-enable lsp-yaml--schema-store-schemas-alist lsp-yaml-schema-store-local-db lsp-yaml--built-in-kubernetes-schema lsp-yaml-download-schema-store-db alist-get schemas json-read-file seq-concatenate list] 4 (#$ . 5841)]) #@72 Set yaml schema for the current buffer to URI-STRING. (fn URI-STRING) (defalias 'lsp-yaml-set-buffer-schema #[257 "\301!\302\303\304 !\305\304 !\"\306P\307\"\211\205\211A\203E\310\311\"\235\204Y\312\313!\"\314\315\316\317 \"\"\"BB\266\203\202Y\313!\315\316\320\"\"BB\266\203\321\322\323!!\207" [lsp-yaml-schemas intern file-relative-name lsp--uri-to-path lsp--buffer-uri lsp-workspace-root "/" assoc append nil vconcat vector assq-delete-all mapcar make-closure #[257 "\301\300\"\207" [V0 lsp-yaml--remove-glob] 4 "\n\n(fn X)"] #[257 "\301\300\"\207" [V0 lsp-yaml--remove-glob] 4 "\n\n(fn X)"] lsp--set-configuration lsp-configuration-section "yaml"] 14 (#$ . 6233) "MURI: "]) #@78 Select schema for the current buffer based on the list of supported schemas. (defalias 'lsp-yaml-select-buffer-schema #[0 "\300\301\302 \303\304\305%\306\307\"\310!\207" [lsp--completing-read "Select buffer schema: " lsp-yaml--get-supported-schemas #[257 "\300\301\302\303\"\302\304\"#\207" [format "%s: %s" alist-get name description] 7 "\n\n(fn SCHEMA)"] nil t alist-get url lsp-yaml-set-buffer-schema] 6 (#$ . 6951) nil]) #@21 (fn MAPPING GLOB) (defalias 'lsp-yaml--remove-glob #[514 "A@\300\301\302\303\"\304\305\"\"\305\"B\207" [vconcat -filter make-closure #[257 "\211\300\232?\207" [V0] 3 "\n\n(fn P)"] append nil] 10 (#$ . 7386)]) (defconst lsp-yaml-plist-value-when-compiled nil) (provide 'lsp-yaml)