summaryrefslogtreecommitdiff
path: root/lua/core
diff options
context:
space:
mode:
Diffstat (limited to 'lua/core')
-rw-r--r--lua/core/compe.lua14
1 files changed, 13 insertions, 1 deletions
diff --git a/lua/core/compe.lua b/lua/core/compe.lua
index b5b37805..9edb2af0 100644
--- a/lua/core/compe.lua
+++ b/lua/core/compe.lua
@@ -77,6 +77,17 @@ M.setup = function()
end
end
+ local is_emmet_active = function()
+ local clients = vim.lsp.buf_get_clients()
+
+ for _, client in pairs(clients) do
+ if client.name == "emmet_ls" then
+ return true
+ end
+ end
+ return false
+ end
+
-- Use (s-)tab to:
--- move to prev/next item in completion menuone
--- jump to prev/next snippet's placeholder
@@ -87,8 +98,9 @@ M.setup = function()
return t "<Plug>(vsnip-jump-next)"
elseif check_back_space() then
return t "<Tab>"
+ elseif is_emmet_active() then
+ return vim.fn["compe#complete"]()
else
- -- return vim.fn["compe#complete"]() -- < use this if you want <tab> to always offer completion
return t "<Tab>"
end
end