File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -424,12 +424,16 @@ end
424
424
--
425
425
-- Add any additional override configuration in the following tables. They will be passed to
426
426
-- the `settings` field of the server config. You must look up that documentation yourself.
427
+ --
428
+ -- If you want to override the default filetypes that your language server will attach to you can
429
+ -- define the property 'filetypes' to the map in question.
427
430
local servers = {
428
431
-- clangd = {},
429
432
-- gopls = {},
430
433
-- pyright = {},
431
434
-- rust_analyzer = {},
432
435
-- tsserver = {},
436
+ -- html = { filetypes = { 'html', 'twig', 'hbs'} },
433
437
434
438
lua_ls = {
435
439
Lua = {
@@ -459,8 +463,9 @@ mason_lspconfig.setup_handlers {
459
463
capabilities = capabilities ,
460
464
on_attach = on_attach ,
461
465
settings = servers [server_name ],
466
+ filetypes = servers [server_name ].filetypes ,
462
467
}
463
- end ,
468
+ end
464
469
}
465
470
466
471
-- [[ Configure nvim-cmp ]]
You can’t perform that action at this time.
0 commit comments