2021-03-07 14:22:30 +00:00
|
|
|
vim.cmd [[ packadd nvim-lspconfig ]]
|
|
|
|
vim.cmd [[ packadd completion-nvim ]]
|
2021-03-08 03:46:14 +00:00
|
|
|
|
|
|
|
-- Enable(broadcasting) snippet capability for completion
|
|
|
|
local html_snippet_capabilities = vim.lsp.protocol.make_client_capabilities()
|
|
|
|
html_snippet_capabilities.textDocument.completion.completionItem.snippetSupport = true
|
|
|
|
|
2021-03-13 01:23:02 +00:00
|
|
|
require "lspconfig".html.setup {
|
|
|
|
on_attach = lsp_on_attach,
|
|
|
|
capabilities = html_snippet_capabilities,
|
|
|
|
cmd = {"html-languageserver", "--stdio"},
|
|
|
|
filetypes = {"html"},
|
|
|
|
init_opitons = {
|
|
|
|
configurationSection = {"html", "css", "javascript"},
|
|
|
|
embeddedLanguages = {
|
|
|
|
css = true,
|
|
|
|
javascript = true
|
|
|
|
}
|
|
|
|
}
|
2021-03-08 03:46:14 +00:00
|
|
|
}
|
|
|
|
|
2021-03-13 01:23:02 +00:00
|
|
|
vim.g.completion_enable_snippet = "UltiSnips"
|