From 8fad9a5ecddc88d57a531e4b0084544984f23d25 Mon Sep 17 00:00:00 2001 From: Jacob McDonnell Date: Sat, 16 Jul 2022 18:13:16 -0400 Subject: Added profile and other missing configs --- .config/coc/extensions/node_modules/coc-html/lib/index.js | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .config/coc/extensions/node_modules/coc-html/lib/index.js (limited to '.config/coc/extensions/node_modules/coc-html/lib/index.js') diff --git a/.config/coc/extensions/node_modules/coc-html/lib/index.js b/.config/coc/extensions/node_modules/coc-html/lib/index.js new file mode 100644 index 0000000..51e957e --- /dev/null +++ b/.config/coc/extensions/node_modules/coc-html/lib/index.js @@ -0,0 +1,2 @@ +var me=Object.create;var N=Object.defineProperty;var de=Object.getOwnPropertyDescriptor;var ve=Object.getOwnPropertyNames;var ye=Object.getPrototypeOf,be=Object.prototype.hasOwnProperty;var ne=l=>N(l,"__esModule",{value:!0});var Ce=(l,p)=>{for(var C in p)N(l,C,{get:p[C],enumerable:!0})},re=(l,p,C,d)=>{if(p&&typeof p=="object"||typeof p=="function")for(let f of ve(p))!be.call(l,f)&&(C||f!=="default")&&N(l,f,{get:()=>p[f],enumerable:!(d=de(p,f))||d.enumerable});return l},q=(l,p)=>re(ne(N(l!=null?me(ye(l)):{},"default",!p&&l&&l.__esModule?{get:()=>l.default,enumerable:!0}:{value:l,enumerable:!0})),l),xe=(l=>(p,C)=>l&&l.get(p)||(C=re(ne({}),p,1),l&&l.set(p,C),C))(typeof WeakMap!="undefined"?new WeakMap:0);var we={};Ce(we,{activate:()=>ge});var P=q(require("coc.nvim"));var O=q(require("coc.nvim"));function oe(l,p,C){let d,f=!1,v,b={autoQuote:!1,autoClose:!1};O.workspace.document.then(n=>{d=n.bufnr,t(n.bufnr)});function t(n){var u,h;f=!1;let i=O.workspace.getDocument(n);if(!i||!i.attached||!p[i.textDocument.languageId])return;let c=O.workspace.getConfiguration("html",i.uri);b.autoQuote=(u=c.get("autoCreateQuotes"))!=null?u:!1,b.autoClose=(h=c.get("autoClosingTags"))!=null?h:!1,f=b.autoQuote||b.autoClose}O.events.on("BufEnter",async n=>{d=n,v&&clearTimeout(v);let i=O.workspace.getDocument(d);i||(i=await O.workspace.document),t(i?i.bufnr:-1)},null,C),O.events.on("TextInsert",(n,i,c)=>{if(!f)return;let u=O.workspace.getDocument(n);if(!u||!u.attached||!p[u.textDocument.languageId])return;v&&clearTimeout(v);let h={line:i.lnum-1,character:i.pre.length};b.autoQuote&&c==="="?a("autoQuote",u,h,c):b.autoClose&&(c===">"||c==="/")&&a("autoClose",u,h,c)},null,C);function a(n,i,c,u){let h=i.changedtick;i.patchChange(!0),v=setTimeout(()=>{l(n,i.textDocument,c).then(m=>{if(m&&b[n]&&d==i.bufnr&&i.changedtick==h){let g={character:c.character,line:c.line};u==="/"&&i.getline(c.line)[c.character]==">"&&(g.character=c.character+1),O.workspace.nvim.call("coc#_cancel",[],!0),O.snippetManager.insertSnippet(m,!0,{start:c,end:g})}}),v=void 0},100)}}var S=q(require("coc.nvim")),ae=q(require("fs"));var ie;ie=(()=>{"use strict";var l={470:d=>{function f(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function v(t,a){for(var n,i="",c=0,u=-1,h=0,m=0;m<=t.length;++m){if(m2){var g=i.lastIndexOf("/");if(g!==i.length-1){g===-1?(i="",c=0):c=(i=i.slice(0,g)).length-1-i.lastIndexOf("/"),u=m,h=0;continue}}else if(i.length===2||i.length===1){i="",c=0,u=m,h=0;continue}}a&&(i.length>0?i+="/..":i="..",c=2)}else i.length>0?i+="/"+t.slice(u+1,m):i=t.slice(u+1,m),c=m-u-1;u=m,h=0}else n===46&&h!==-1?++h:h=-1}return i}var b={resolve:function(){for(var t,a="",n=!1,i=arguments.length-1;i>=-1&&!n;i--){var c;i>=0?c=arguments[i]:(t===void 0&&(t=process.cwd()),c=t),f(c),c.length!==0&&(a=c+"/"+a,n=c.charCodeAt(0)===47)}return a=v(a,!n),n?a.length>0?"/"+a:"/":a.length>0?a:"."},normalize:function(t){if(f(t),t.length===0)return".";var a=t.charCodeAt(0)===47,n=t.charCodeAt(t.length-1)===47;return(t=v(t,!a)).length!==0||a||(t="."),t.length>0&&n&&(t+="/"),a?"/"+t:t},isAbsolute:function(t){return f(t),t.length>0&&t.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var t,a=0;a0&&(t===void 0?t=n:t+="/"+n)}return t===void 0?".":b.normalize(t)},relative:function(t,a){if(f(t),f(a),t===a||(t=b.resolve(t))===(a=b.resolve(a)))return"";for(var n=1;nm){if(a.charCodeAt(u+y)===47)return a.slice(u+y+1);if(y===0)return a.slice(u+y)}else c>m&&(t.charCodeAt(n+y)===47?g=y:y===0&&(g=0));break}var D=t.charCodeAt(n+y);if(D!==a.charCodeAt(u+y))break;D===47&&(g=y)}var T="";for(y=n+g+1;y<=i;++y)y!==i&&t.charCodeAt(y)!==47||(T.length===0?T+="..":T+="/..");return T.length>0?T+a.slice(u+g):(u+=g,a.charCodeAt(u)===47&&++u,a.slice(u))},_makeLong:function(t){return t},dirname:function(t){if(f(t),t.length===0)return".";for(var a=t.charCodeAt(0),n=a===47,i=-1,c=!0,u=t.length-1;u>=1;--u)if((a=t.charCodeAt(u))===47){if(!c){i=u;break}}else c=!1;return i===-1?n?"/":".":n&&i===1?"//":t.slice(0,i)},basename:function(t,a){if(a!==void 0&&typeof a!="string")throw new TypeError('"ext" argument must be a string');f(t);var n,i=0,c=-1,u=!0;if(a!==void 0&&a.length>0&&a.length<=t.length){if(a.length===t.length&&a===t)return"";var h=a.length-1,m=-1;for(n=t.length-1;n>=0;--n){var g=t.charCodeAt(n);if(g===47){if(!u){i=n+1;break}}else m===-1&&(u=!1,m=n+1),h>=0&&(g===a.charCodeAt(h)?--h==-1&&(c=n):(h=-1,c=m))}return i===c?c=m:c===-1&&(c=t.length),t.slice(i,c)}for(n=t.length-1;n>=0;--n)if(t.charCodeAt(n)===47){if(!u){i=n+1;break}}else c===-1&&(u=!1,c=n+1);return c===-1?"":t.slice(i,c)},extname:function(t){f(t);for(var a=-1,n=0,i=-1,c=!0,u=0,h=t.length-1;h>=0;--h){var m=t.charCodeAt(h);if(m!==47)i===-1&&(c=!1,i=h+1),m===46?a===-1?a=h:u!==1&&(u=1):a!==-1&&(u=-1);else if(!c){n=h+1;break}}return a===-1||i===-1||u===0||u===1&&a===i-1&&a===n+1?"":t.slice(a,i)},format:function(t){if(t===null||typeof t!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(a,n){var i=n.dir||n.root,c=n.base||(n.name||"")+(n.ext||"");return i?i===n.root?i+c:i+"/"+c:c}(0,t)},parse:function(t){f(t);var a={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return a;var n,i=t.charCodeAt(0),c=i===47;c?(a.root="/",n=1):n=0;for(var u=-1,h=0,m=-1,g=!0,y=t.length-1,D=0;y>=n;--y)if((i=t.charCodeAt(y))!==47)m===-1&&(g=!1,m=y+1),i===46?u===-1?u=y:D!==1&&(D=1):u!==-1&&(D=-1);else if(!g){h=y+1;break}return u===-1||m===-1||D===0||D===1&&u===m-1&&u===h+1?m!==-1&&(a.base=a.name=h===0&&c?t.slice(1,m):t.slice(h,m)):(h===0&&c?(a.name=t.slice(1,u),a.base=t.slice(1,m)):(a.name=t.slice(h,u),a.base=t.slice(h,m)),a.ext=t.slice(u,m)),h>0?a.dir=t.slice(0,h-1):c&&(a.dir="/"),a},sep:"/",delimiter:":",win32:null,posix:null};b.posix=b,d.exports=b},447:(d,f,v)=>{var b;if(v.r(f),v.d(f,{URI:()=>T,Utils:()=>M}),typeof process=="object")b=process.platform==="win32";else if(typeof navigator=="object"){var t=navigator.userAgent;b=t.indexOf("Windows")>=0}var a,n,i=(a=function(o,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var w in s)Object.prototype.hasOwnProperty.call(s,w)&&(r[w]=s[w])})(o,e)},function(o,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=o}a(o,e),o.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}),c=/^\w[\w\d+.-]*$/,u=/^\//,h=/^\/\//;function m(o,e){if(!o.scheme&&e)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(o.authority,'", path: "').concat(o.path,'", query: "').concat(o.query,'", fragment: "').concat(o.fragment,'"}'));if(o.scheme&&!c.test(o.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(o.path){if(o.authority){if(!u.test(o.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(h.test(o.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}var g="",y="/",D=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,T=function(){function o(e,r,s,w,x,A){A===void 0&&(A=!1),typeof e=="object"?(this.scheme=e.scheme||g,this.authority=e.authority||g,this.path=e.path||g,this.query=e.query||g,this.fragment=e.fragment||g):(this.scheme=function(_,I){return _||I?_:"file"}(e,A),this.authority=r||g,this.path=function(_,I){switch(_){case"https":case"http":case"file":I?I[0]!==y&&(I=y+I):I=y}return I}(this.scheme,s||g),this.query=w||g,this.fragment=x||g,m(this,A))}return o.isUri=function(e){return e instanceof o||!!e&&typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function"},Object.defineProperty(o.prototype,"fsPath",{get:function(){return G(this,!1)},enumerable:!1,configurable:!0}),o.prototype.with=function(e){if(!e)return this;var r=e.scheme,s=e.authority,w=e.path,x=e.query,A=e.fragment;return r===void 0?r=this.scheme:r===null&&(r=g),s===void 0?s=this.authority:s===null&&(s=g),w===void 0?w=this.path:w===null&&(w=g),x===void 0?x=this.query:x===null&&(x=g),A===void 0?A=this.fragment:A===null&&(A=g),r===this.scheme&&s===this.authority&&w===this.path&&x===this.query&&A===this.fragment?this:new E(r,s,w,x,A)},o.parse=function(e,r){r===void 0&&(r=!1);var s=D.exec(e);return s?new E(s[2]||g,Q(s[4]||g),Q(s[5]||g),Q(s[7]||g),Q(s[9]||g),r):new E(g,g,g,g,g)},o.file=function(e){var r=g;if(b&&(e=e.replace(/\\/g,y)),e[0]===y&&e[1]===y){var s=e.indexOf(y,2);s===-1?(r=e.substring(2),e=y):(r=e.substring(2,s),e=e.substring(s)||y)}return new E("file",r,e,g,g)},o.from=function(e){var r=new E(e.scheme,e.authority,e.path,e.query,e.fragment);return m(r,!0),r},o.prototype.toString=function(e){return e===void 0&&(e=!1),J(this,e)},o.prototype.toJSON=function(){return this},o.revive=function(e){if(e){if(e instanceof o)return e;var r=new E(e);return r._formatted=e.external,r._fsPath=e._sep===U?e.fsPath:null,r}return e},o}(),U=b?1:void 0,E=function(o){function e(){var r=o!==null&&o.apply(this,arguments)||this;return r._formatted=null,r._fsPath=null,r}return i(e,o),Object.defineProperty(e.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=G(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),e.prototype.toString=function(r){return r===void 0&&(r=!1),r?J(this,!0):(this._formatted||(this._formatted=J(this,!1)),this._formatted)},e.prototype.toJSON=function(){var r={$mid:1};return this._fsPath&&(r.fsPath=this._fsPath,r._sep=U),this._formatted&&(r.external=this._formatted),this.path&&(r.path=this.path),this.scheme&&(r.scheme=this.scheme),this.authority&&(r.authority=this.authority),this.query&&(r.query=this.query),this.fragment&&(r.fragment=this.fragment),r},e}(T),Z=((n={})[58]="%3A",n[47]="%2F",n[63]="%3F",n[35]="%23",n[91]="%5B",n[93]="%5D",n[64]="%40",n[33]="%21",n[36]="%24",n[38]="%26",n[39]="%27",n[40]="%28",n[41]="%29",n[42]="%2A",n[43]="%2B",n[44]="%2C",n[59]="%3B",n[61]="%3D",n[32]="%20",n);function K(o,e){for(var r=void 0,s=-1,w=0;w=97&&x<=122||x>=65&&x<=90||x>=48&&x<=57||x===45||x===46||x===95||x===126||e&&x===47)s!==-1&&(r+=encodeURIComponent(o.substring(s,w)),s=-1),r!==void 0&&(r+=o.charAt(w));else{r===void 0&&(r=o.substr(0,w));var A=Z[x];A!==void 0?(s!==-1&&(r+=encodeURIComponent(o.substring(s,w)),s=-1),r+=A):s===-1&&(s=w)}}return s!==-1&&(r+=encodeURIComponent(o.substring(s))),r!==void 0?r:o}function pe(o){for(var e=void 0,r=0;r1&&o.scheme==="file"?"//".concat(o.authority).concat(o.path):o.path.charCodeAt(0)===47&&(o.path.charCodeAt(1)>=65&&o.path.charCodeAt(1)<=90||o.path.charCodeAt(1)>=97&&o.path.charCodeAt(1)<=122)&&o.path.charCodeAt(2)===58?e?o.path.substr(1):o.path[1].toLowerCase()+o.path.substr(2):o.path,b&&(r=r.replace(/\//g,"\\")),r}function J(o,e){var r=e?pe:K,s="",w=o.scheme,x=o.authority,A=o.path,_=o.query,I=o.fragment;if(w&&(s+=w,s+=":"),(x||w==="file")&&(s+=y,s+=y),x){var k=x.indexOf("@");if(k!==-1){var z=x.substr(0,k);x=x.substr(k+1),(k=z.indexOf(":"))===-1?s+=r(z,!1):(s+=r(z.substr(0,k),!1),s+=":",s+=r(z.substr(k+1),!1)),s+="@"}(k=(x=x.toLowerCase()).indexOf(":"))===-1?s+=r(x,!1):(s+=r(x.substr(0,k),!1),s+=x.substr(k))}if(A){if(A.length>=3&&A.charCodeAt(0)===47&&A.charCodeAt(2)===58)(j=A.charCodeAt(1))>=65&&j<=90&&(A="/".concat(String.fromCharCode(j+32),":").concat(A.substr(3)));else if(A.length>=2&&A.charCodeAt(1)===58){var j;(j=A.charCodeAt(0))>=65&&j<=90&&(A="".concat(String.fromCharCode(j+32),":").concat(A.substr(2)))}s+=r(A,!0)}return _&&(s+="?",s+=r(_,!1)),I&&(s+="#",s+=e?I:K(I,!1)),s}function X(o){try{return decodeURIComponent(o)}catch{return o.length>3?o.substr(0,3)+X(o.substr(3)):o}}var Y=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Q(o){return o.match(Y)?o.replace(Y,function(e){return X(e)}):o}var M,ee=v(470),te=function(o,e,r){if(r||arguments.length===2)for(var s,w=0,x=e.length;w{for(var v in f)C.o(f,v)&&!C.o(d,v)&&Object.defineProperty(d,v,{enumerable:!0,get:f[v]})},C.o=(d,f)=>Object.prototype.hasOwnProperty.call(d,f),C.r=d=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(d,"__esModule",{value:!0})},C(447)})();var{URI:Re,Utils:H}=ie;var L=q(require("util"));function se(l){let p=new Set,C=new Set,d=new Set;le(d),fe(p,C);let f=new S.Emitter;return l.push(S.extensions.onDidActiveExtension(v=>{let b=new Set,t=new Set;fe(b,t),(ce(b,p)||ce(t,C))&&(p=b,C=t,f.fire())})),l.push(S.workspace.onDidChangeConfiguration(v=>{v.affectsConfiguration("html.customData")&&(d.clear(),le(d),f.fire())})),l.push(S.workspace.onDidChangeTextDocument(v=>{let b=v.textDocument.uri;(C.has(b)||d.has(b))&&f.fire()})),{get uris(){return[...p].concat([...C],[...d])},get onDidChange(){return f.event},getContent(v){let b=S.Uri.parse(v);return b.scheme==="file"?(0,L.promisify)(ae.default.readFile)(b.fsPath).then(t=>new L.TextDecoder().decode(t)):(0,S.fetch)(v,{timeout:5e3,buffer:!0}).then(t=>new L.TextDecoder().decode(t))}}}function ce(l,p){if(l.size!==p.size)return!0;for(let C of l)if(!p.has(C))return!0;return!1}function ue(l){return/^(?\w[\w\d+.-]*):/.test(l)}function le(l){let p=S.workspace.workspaceFolders;if(!p)return;let C=(d,f)=>{if(Array.isArray(d))for(let v of d)typeof v=="string"&&(ue(v)?l.add(v):l.add(H.resolvePath(S.Uri.parse(f),v).toString()))};for(let d=0;d{p.type=new P.RequestType0("html/semanticTokenLegend")})($||($={}));var B;(p=>{p.type=new P.RequestType("html/semanticTokens")})(B||(B={}));var F;(p=>{p.type=new P.NotificationType("html/customDataChanged")})(F||(F={}));var V;(p=>{p.type=new P.RequestType("html/customDataContent")})(V||(V={}));var W;(p=>{p.type=new P.RequestType("html/autoInsert")})(W||(W={}));function he(l,p){let{subscriptions:C}=l,d=P.workspace.getConfiguration().get("html",{}),f=l.asAbsolutePath("lib/server.js"),v=p.map(i=>({language:i})),b={css:!0,javascript:!0},t={module:f,args:["--node-ipc"],transport:P.TransportKind.ipc,options:{cwd:P.workspace.root,execArgv:d.execArgv||[]}},a={documentSelector:v,synchronize:{configurationSection:["html","css","javascript"]},outputChannelName:"html",initializationOptions:{embeddedLanguages:b,handledSchemas:["file"]}},n=new P.LanguageClient("html","HTML language server",t,a);n.onReady().then(()=>{let i=se(l.subscriptions);n.sendNotification(F.type,i.uris),i.onDidChange(()=>{n.sendNotification(F.type,i.uris)}),n.onRequest(V.type,i.getContent),l.subscriptions.push(P.languages.registerSelectionRangeProvider(v,{async provideSelectionRanges(h,m){let g={uri:h.uri};return await Promise.resolve(n.sendRequest("$/textDocument/selectionRanges",{textDocument:g,positions:m}))}}));let c=(h,m,g)=>{let y={kind:h,textDocument:{uri:m.uri},position:g};return n.sendRequest(W.type,y)},u=Object.assign({},...p.map(h=>({[h]:!0})));oe(c,u,l.subscriptions),typeof P.languages.registerDocumentSemanticTokensProvider=="function"&&n.sendRequest($.type).then(h=>{if(h){let m={provideDocumentSemanticTokens(y){let D={textDocument:{uri:y.uri}};return n.sendRequest(B.type,D).then(T=>T&&{data:T})},provideDocumentRangeSemanticTokens(y,D){let T={textDocument:{uri:y.uri},ranges:[D]};return n.sendRequest(B.type,T).then(U=>U&&{data:U})}},g={tokenTypes:h.types,tokenModifiers:h.modifiers};l.subscriptions.push(P.languages.registerDocumentSemanticTokensProvider(v,m,g)),l.subscriptions.push(P.languages.registerDocumentRangeSemanticTokensProvider(v,m,g))}})},i=>{}),C.push(P.services.registLanguageClient(n))}async function ge(l){let p=P.workspace.getConfiguration("html");if(p.get("enable",!0)===!1)return;let d=p.get("filetypes",["html","handlebars","htmldjango","blade"]),f=!1;for(let v of P.workspace.textDocuments)d.includes(v.languageId)&&!f&&(f=!0,he(l,d));if(!f){let v=P.workspace.onDidOpenTextDocument(b=>{f||!d.includes(b.languageId)||(v.dispose(),f=!0,he(l,d))},null,l.subscriptions)}}module.exports=xe(we);0&&(module.exports={activate}); +//# sourceMappingURL=index.js.map -- cgit v1.2.3