diff options
Diffstat (limited to 'lua/alpha')
| -rw-r--r-- | lua/alpha/scratchs/draft.lua | 9 | ||||
| -rw-r--r-- | lua/alpha/snippets/php.lua | 6 |
2 files changed, 12 insertions, 3 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 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("']);"), }) }), }), |