From e7331dbe0fd99fe8a6f7dded036fdf09d43c61de Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Thu, 25 Nov 2021 17:27:28 +0100 Subject: fix quotes, add scratch directory --- lua/alpha/scratchs/draft.lua | 9 +++++++++ lua/alpha/snippets/php.lua | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 lua/alpha/scratchs/draft.lua 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 diff --git a/lua/alpha/snippets/php.lua b/lua/alpha/snippets/php.lua index c8c2053..f42ed45 100644 --- a/lua/alpha/snippets/php.lua +++ b/lua/alpha/snippets/php.lua @@ -105,16 +105,16 @@ ls.snippets = { t("', "), c(3, { sn(nil, { - t({'function () {', ' '}), + t({'function () {', '\t'}), i(1, ''), t({'', '});'}), }), sn(nil, { t('['), i(1, 'Controller'), - t('::class, \''), + t("::class, '"), i(2, 'method'), - t('\']);'), + t("']);"), }) }), }), -- cgit v1.2.3