Skip to content

Commit b35471b

Browse files
committed
Enable emmet-language-server in Elixir files
I'm sure there's a better way to do this, but I don't want to become an expert in Lua right now.
1 parent a2db417 commit b35471b

1 file changed

Lines changed: 31 additions & 1 deletion

File tree

lua/plugins/lsp.lua

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,13 @@ return { -- LSP Plugins
287287

288288
require('mason-lspconfig').setup {
289289
ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer)
290-
automatic_enable = true,
290+
automatic_enable = {
291+
exclude = {
292+
-- HACK: I was unable to get the `filetypes` and `init_options` working in the emmet table above, and this
293+
-- was the solution :(
294+
'emmet_language_server',
295+
},
296+
},
291297
automatic_installation = false,
292298
handlers = {
293299
function(server_name)
@@ -300,6 +306,30 @@ return { -- LSP Plugins
300306
end,
301307
},
302308
}
309+
310+
-- HACK: See above hack
311+
require('lspconfig')['emmet_language_server'].setup {
312+
filetypes = {
313+
'css',
314+
'eelixir',
315+
'elixir',
316+
'heex',
317+
'html',
318+
'javascript',
319+
'javascriptreact',
320+
'less',
321+
'sass',
322+
'scss',
323+
'typescriptreact',
324+
},
325+
init_options = {
326+
includeLanguages = {
327+
eelixir = 'html',
328+
elixir = 'html',
329+
heex = 'html',
330+
},
331+
},
332+
}
303333
end,
304334
},
305335
{

0 commit comments

Comments
 (0)