@influxdata/flux-lsp-browser
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -26,6 +26,2 @@ /* tslint:disable */ | ||
/** | ||
* @returns {any} | ||
*/ | ||
get_buckets(): any; | ||
/** | ||
* @param {string} msg | ||
@@ -32,0 +28,0 @@ * @returns {any} |
@@ -13,11 +13,2 @@ import * as wasm from './flux-lsp-browser_bg.wasm'; | ||
function addHeapObject(obj) { | ||
if (heap_next === heap.length) heap.push(heap.length + 1); | ||
const idx = heap_next; | ||
heap_next = heap[idx]; | ||
heap[idx] = obj; | ||
return idx; | ||
} | ||
function dropObject(idx) { | ||
@@ -35,2 +26,11 @@ if (idx < 36) return; | ||
function addHeapObject(obj) { | ||
if (heap_next === heap.length) heap.push(heap.length + 1); | ||
const idx = heap_next; | ||
heap_next = heap[idx]; | ||
heap[idx] = obj; | ||
return idx; | ||
} | ||
let WASM_VECTOR_LEN = 0; | ||
@@ -114,3 +114,3 @@ | ||
} | ||
function __wbg_adapter_16(arg0, arg1, arg2) { | ||
function __wbg_adapter_14(arg0, arg1, arg2) { | ||
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h5425672529e79e40(arg0, arg1, addHeapObject(arg2)); | ||
@@ -122,3 +122,3 @@ } | ||
} | ||
function __wbg_adapter_29(arg0, arg1, arg2, arg3) { | ||
function __wbg_adapter_26(arg0, arg1, arg2, arg3) { | ||
wasm.wasm_bindgen__convert__closures__invoke2_mut__he62f6dc15be28482(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); | ||
@@ -180,9 +180,2 @@ } | ||
/** | ||
* @returns {any} | ||
*/ | ||
get_buckets() { | ||
var ret = wasm.server_get_buckets(this.ptr); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @param {string} msg | ||
@@ -245,2 +238,16 @@ * @returns {any} | ||
export const __wbindgen_object_drop_ref = function(arg0) { | ||
takeObject(arg0); | ||
}; | ||
export const __wbindgen_cb_drop = function(arg0) { | ||
const obj = takeObject(arg0).original; | ||
if (obj.cnt-- == 1) { | ||
obj.a = 0; | ||
return true; | ||
} | ||
var ret = false; | ||
return ret; | ||
}; | ||
export const __wbindgen_object_clone_ref = function(arg0) { | ||
@@ -251,6 +258,2 @@ var ret = getObject(arg0); | ||
export const __wbindgen_object_drop_ref = function(arg0) { | ||
takeObject(arg0); | ||
}; | ||
export const __wbindgen_json_serialize = function(arg0, arg1) { | ||
@@ -265,7 +268,2 @@ const obj = getObject(arg1); | ||
export const __wbindgen_string_new = function(arg0, arg1) { | ||
var ret = getStringFromWasm0(arg0, arg1); | ||
return addHeapObject(ret); | ||
}; | ||
export const __wbg_serverresponse_new = function(arg0) { | ||
@@ -276,12 +274,2 @@ var ret = ServerResponse.__wrap(arg0); | ||
export const __wbindgen_cb_drop = function(arg0) { | ||
const obj = takeObject(arg0).original; | ||
if (obj.cnt-- == 1) { | ||
obj.a = 0; | ||
return true; | ||
} | ||
var ret = false; | ||
return ret; | ||
}; | ||
export const __wbg_call_12b949cfc461d154 = function(arg0, arg1) { | ||
@@ -312,3 +300,3 @@ try { | ||
try { | ||
return __wbg_adapter_29(a, state0.b, arg0, arg1); | ||
return __wbg_adapter_26(a, state0.b, arg0, arg1); | ||
} finally { | ||
@@ -349,3 +337,3 @@ state0.a = a; | ||
export const __wbindgen_closure_wrapper686 = function(arg0, arg1, arg2) { | ||
export const __wbindgen_closure_wrapper669 = function(arg0, arg1, arg2) { | ||
@@ -358,5 +346,5 @@ const state = { a: arg0, b: arg1, cnt: 1 }; | ||
try { | ||
return __wbg_adapter_16(a, state.b, arg0); | ||
return __wbg_adapter_14(a, state.b, arg0); | ||
} finally { | ||
if (--state.cnt === 0) wasm.__wbindgen_export_2.get(170)(a, state.b); | ||
if (--state.cnt === 0) wasm.__wbindgen_export_2.get(166)(a, state.b); | ||
else state.a = a; | ||
@@ -363,0 +351,0 @@ } |
@@ -7,3 +7,3 @@ { | ||
"description": "LSP support for the flux language", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"license": "MIT", | ||
@@ -10,0 +10,0 @@ "repository": { |
@@ -74,2 +74,28 @@ # Flux LSP | ||
### with webpack | ||
This package is distributed as a wasm file, and since wasm files cannot be included in the main bundle, you need to import the library a little differently: | ||
```javascript | ||
import('@influxdata/flux-lsp-browser') | ||
.then(({Server}) => { | ||
let server = new Server(false); | ||
// The LSP server is now ready to use | ||
}); | ||
``` | ||
You might also have to add this snippet to your webpack configuration's 'module.rules' array to enable wasm file parsing: | ||
```javascript | ||
rules: [ | ||
{ | ||
test: /\.wasm$/, | ||
loader: 'file-loader', | ||
type: 'javascript/auto' | ||
}, | ||
// ... all the rest of your loaders | ||
] | ||
``` | ||
# Supported LSP features | ||
@@ -88,2 +114,2 @@ | ||
- textDocument/documentSymbol | ||
- completionItem/resolve | ||
- completionItem/resolve |
Sorry, the diff of this file is not supported yet
2620629
114
334