diff --git a/404.html b/404.html index 87d41d2..07c8c2c 100644 --- a/404.html +++ b/404.html @@ -13,13 +13,13 @@ - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- + \ No newline at end of file diff --git a/assets/js/49e395fe.652f8f04.js b/assets/js/49e395fe.652f8f04.js new file mode 100644 index 0000000..2bbd024 --- /dev/null +++ b/assets/js/49e395fe.652f8f04.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[274],{3905:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return d}});var l=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function r(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=l.createContext({}),p=function(e){var t=l.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},u=function(e){var t=p(e.components);return l.createElement(s.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return l.createElement(l.Fragment,{},t)}},m=l.forwardRef((function(e,t){var n=e.components,i=e.mdxType,o=e.originalType,s=e.parentName,u=a(e,["components","mdxType","originalType","parentName"]),m=p(n),d=i,f=m["".concat(s,".").concat(d)]||m[d]||c[d]||o;return n?l.createElement(f,r(r({ref:t},u),{},{components:n})):l.createElement(f,r({ref:t},u))}));function d(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,r=new Array(o);r[0]=m;var a={};for(var s in t)hasOwnProperty.call(t,s)&&(a[s]=t[s]);a.originalType=e,a.mdxType="string"==typeof e?e:i,r[1]=a;for(var p=2;p= ",(0,o.kt)("inlineCode",{parentName:"p"},"0.0.55"),"."),(0,o.kt)("h4",{id:"neovim"},"Neovim"),(0,o.kt)("p",null,"Neovim support for ",(0,o.kt)("inlineCode",{parentName:"p"},"lets self lsp")," can be added manually:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"Add new filetype:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-lua"},'vim.filetype.add({\n filename = {\n ["lets.yaml"] = "yaml.lets",\n },\n})\n')),(0,o.kt)("ol",{start:2},(0,o.kt)("li",{parentName:"ol"},"In your ",(0,o.kt)("inlineCode",{parentName:"li"},"neovim/nvim-lspconfig")," servers configuration:")),(0,o.kt)("p",null,"In order for ",(0,o.kt)("inlineCode",{parentName:"p"},"nvim-lspconfig")," to recognize ",(0,o.kt)("inlineCode",{parentName:"p"},"lets lsp")," we must define config for ",(0,o.kt)("inlineCode",{parentName:"p"},"lets_ls")," (lets_ls is just a conventional name because we are not officially added to ",(0,o.kt)("inlineCode",{parentName:"p"},"neovim/nvim-lspconfig"),")"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-lua"},'require("lspconfig.configs").lets_ls = {\n default_config = {\n cmd = { \n "lets self lsp",\n },\n filetypes = { "yaml.lets" },\n root_dir = util.root_pattern("lets.yaml"),\n settings = {},\n },\n}\n')),(0,o.kt)("ol",{start:3},(0,o.kt)("li",{parentName:"ol"},"And then enable lets_ls in then servers section:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-lua"},'return {\n "neovim/nvim-lspconfig",\n opts = {\n servers = {\n lets_ls = {},\n pyright = {}, -- pyright here just as hint to where we should add lets_ls\n },\n },\n}\n')),(0,o.kt)("h3",{id:"json-schema"},"JSON Schema"),(0,o.kt)("p",null,"In order to get autocomplete and filetype support in any editor, you can use the JSON schema file provided by Lets."),(0,o.kt)("h4",{id:"vscode-1"},"VSCode"),(0,o.kt)("p",null,"To use the JSON schema in VSCode, you can use the ",(0,o.kt)("a",{parentName:"p",href:"https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml"},"YAML extension"),"."),(0,o.kt)("p",null,"Add the following to your ",(0,o.kt)("inlineCode",{parentName:"p"},"settings.json"),":"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "yaml.schemas": {\n "https://lets-cli.org/schema.json": [\n "**/lets.yaml",\n "**/lets*.yaml",\n ]\n }\n}\n')),(0,o.kt)("h4",{id:"neovim-1"},"Neovim"),(0,o.kt)("p",null,"To use the JSON schema in Neovim, you can use the ",(0,o.kt)("inlineCode",{parentName:"p"},"nvim-lspconfig")," with ",(0,o.kt)("inlineCode",{parentName:"p"},"SchemaStore")," plugin."),(0,o.kt)("p",null,"In your ",(0,o.kt)("inlineCode",{parentName:"p"},"nvim-lspconfig")," configuration, add the following:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-lua"},'servers = {\n yamlls = {\n on_new_config = function(new_config)\n local yaml_schemas = require("schemastore").yaml.schemas({\n extra = {\n {\n description = "Lets JSON schema",\n fileMatch = { "lets.yaml", "lets*.yaml" },\n name = "lets.schema.json",\n url = "https://lets-cli.org/schema.json",\n },\n },\n })\n new_config.settings.yaml.schemas = vim.tbl_deep_extend("force", new_config.settings.yaml.schemas or {}, yaml_schemas)\n end,\n },\n}\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/49e395fe.815c0e69.js b/assets/js/49e395fe.815c0e69.js deleted file mode 100644 index e6a6cb1..0000000 --- a/assets/js/49e395fe.815c0e69.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[274],{3905:function(e,t,n){n.d(t,{Zo:function(){return p},kt:function(){return d}});var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=r.createContext({}),c=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),m=c(n),d=o,f=m["".concat(s,".").concat(d)]||m[d]||u[d]||i;return n?r.createElement(f,a(a({ref:t},p),{},{components:n})):r.createElement(f,a({ref:t},p))}));function d(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,a=new Array(i);a[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l.mdxType="string"==typeof e?e:o,a[1]=l;for(var c=2;c=c)&&Object.keys(o.O).every((function(e){return o.O[e](n[u])}))?n.splice(u--,1):(a=!1,c0&&e[d-1][2]>c;d--)e[d]=e[d-1];e[d]=[n,r,c]},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},o.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var c=Object.create(null);o.r(c);var f={};t=t||[null,n({}),n([]),n(n)];for(var a=2&r&&e;"object"==typeof a&&!~t.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).forEach((function(t){f[t]=function(){return e[t]}}));return f.default=function(){return e},o.d(c,f),c},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.f={},o.e=function(e){return Promise.all(Object.keys(o.f).reduce((function(t,n){return o.f[n](e,t),t}),[]))},o.u=function(e){return"assets/js/"+({13:"01a85c17",27:"f562e57c",30:"09d5ad39",53:"935f2afb",80:"9beb87c2",83:"35a82133",89:"a6aa9e1f",103:"ccc49370",172:"a3bcb54c",186:"6984a306",195:"c4f5d8e4",258:"ac5e7154",274:"49e395fe",328:"407321c4",345:"0e9752f3",369:"f18e8f34",446:"9225b3a9",465:"0ba3c3f2",468:"1a20bc57",477:"b2f554cd",483:"62400c1a",514:"1be78505",533:"b2b675dd",535:"814f3328",590:"2c769b4f",593:"89ea30f7",607:"9851d47d",608:"9e4087bc",610:"6875c492",615:"4b80c3bd",618:"8f030830",713:"a7023ddc",735:"4ba7e5a3",776:"f11f4132",918:"17896441",920:"1a4e3797",924:"d962a851",927:"5281b7a2",930:"fa4d91bf"}[e]||e)+"."+{13:"2d7c8566",27:"c5b6b43f",30:"8e29eb59",48:"bd65c16c",53:"48903a3d",80:"33b70d5a",83:"5dd03c60",89:"d7e65bed",103:"7c8d2d83",172:"1a540836",186:"2f697f85",195:"05ed6d8a",258:"3ddf2e95",274:"815c0e69",328:"edd6568b",345:"2b22236a",369:"4ab2c877",446:"64fd7fa8",465:"d097aa52",468:"84cdfcaf",477:"b22095b4",483:"81ad704f",514:"9467fc9b",533:"8c7fcd8d",535:"f9dd8e48",556:"3fbc3c87",590:"5d9f4c9c",593:"4c7234e7",607:"e2b863cb",608:"de4f7012",610:"e94d51fe",615:"ce5d6394",618:"81d71e67",713:"128ce7ce",735:"8f4f7753",776:"a7adae44",780:"bd759000",894:"bcdd1ef4",918:"bbe5b28f",920:"6aa3c83f",924:"c68b7857",927:"7eaa228c",930:"6774fc1b",945:"88902ab3",972:"3fb5fa31"}[e]+".js"},o.miniCssF=function(e){},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},c="docs:",o.l=function(e,t,n,f){if(r[e])r[e].push(t);else{var a,u;if(void 0!==n)for(var i=document.getElementsByTagName("script"),d=0;d=c)&&Object.keys(o.O).every((function(e){return o.O[e](n[u])}))?n.splice(u--,1):(f=!1,c0&&e[d-1][2]>c;d--)e[d]=e[d-1];e[d]=[n,r,c]},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},o.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var c=Object.create(null);o.r(c);var a={};t=t||[null,n({}),n([]),n(n)];for(var f=2&r&&e;"object"==typeof f&&!~t.indexOf(f);f=n(f))Object.getOwnPropertyNames(f).forEach((function(t){a[t]=function(){return e[t]}}));return a.default=function(){return e},o.d(c,a),c},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.f={},o.e=function(e){return Promise.all(Object.keys(o.f).reduce((function(t,n){return o.f[n](e,t),t}),[]))},o.u=function(e){return"assets/js/"+({13:"01a85c17",27:"f562e57c",30:"09d5ad39",53:"935f2afb",80:"9beb87c2",83:"35a82133",89:"a6aa9e1f",103:"ccc49370",172:"a3bcb54c",186:"6984a306",195:"c4f5d8e4",258:"ac5e7154",274:"49e395fe",328:"407321c4",345:"0e9752f3",369:"f18e8f34",446:"9225b3a9",465:"0ba3c3f2",468:"1a20bc57",477:"b2f554cd",483:"62400c1a",514:"1be78505",533:"b2b675dd",535:"814f3328",590:"2c769b4f",593:"89ea30f7",607:"9851d47d",608:"9e4087bc",610:"6875c492",615:"4b80c3bd",618:"8f030830",713:"a7023ddc",735:"4ba7e5a3",776:"f11f4132",918:"17896441",920:"1a4e3797",924:"d962a851",927:"5281b7a2",930:"fa4d91bf"}[e]||e)+"."+{13:"2d7c8566",27:"c5b6b43f",30:"8e29eb59",48:"bd65c16c",53:"48903a3d",80:"33b70d5a",83:"5dd03c60",89:"d7e65bed",103:"7c8d2d83",172:"1a540836",186:"2f697f85",195:"05ed6d8a",258:"3ddf2e95",274:"652f8f04",328:"edd6568b",345:"2b22236a",369:"4ab2c877",446:"64fd7fa8",465:"d097aa52",468:"84cdfcaf",477:"b22095b4",483:"81ad704f",514:"9467fc9b",533:"8c7fcd8d",535:"f9dd8e48",556:"3fbc3c87",590:"5d9f4c9c",593:"4c7234e7",607:"e2b863cb",608:"de4f7012",610:"e94d51fe",615:"ce5d6394",618:"81d71e67",713:"128ce7ce",735:"8f4f7753",776:"a7adae44",780:"bd759000",894:"bcdd1ef4",918:"bbe5b28f",920:"6aa3c83f",924:"c68b7857",927:"7eaa228c",930:"6774fc1b",945:"88902ab3",972:"3fb5fa31"}[e]+".js"},o.miniCssF=function(e){},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},c="docs:",o.l=function(e,t,n,a){if(r[e])r[e].push(t);else{var f,u;if(void 0!==n)for(var i=document.getElementsByTagName("script"),d=0;d