aboutsummaryrefslogtreecommitdiffstats
path: root/lua/alpha/scratchs
diff options
context:
space:
mode:
Diffstat (limited to 'lua/alpha/scratchs')
-rw-r--r--lua/alpha/scratchs/draft.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/lua/alpha/scratchs/draft.lua b/lua/alpha/scratchs/draft.lua
new file mode 100644
index 0000000..30cc365
--- /dev/null
+++ b/lua/alpha/scratchs/draft.lua
@@ -0,0 +1,9 @@
+function GlobalFunction()
+ local position_params = vim.lsp.util.make_position_params()
+
+ vim.lsp.buf_request(0, "textDocument/completion", position_params, function(err, method, result)
+ if method ~= nil then
+ vim.lsp.util.apply_text_document_edit(method.items, 1)
+ end
+ end)
+end