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
424424--
425425-- Add any additional override configuration in the following tables. They will be passed to
426426-- 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.
427430local servers = {
428431 -- clangd = {},
429432 -- gopls = {},
430433 -- pyright = {},
431434 -- rust_analyzer = {},
432435 -- tsserver = {},
436+ -- html = { filetypes = { 'html', 'twig', 'hbs'} },
433437
434438 lua_ls = {
435439 Lua = {
@@ -459,8 +463,9 @@ mason_lspconfig.setup_handlers {
459463 capabilities = capabilities ,
460464 on_attach = on_attach ,
461465 settings = servers [server_name ],
466+ filetypes = servers [server_name ].filetypes ,
462467 }
463- end ,
468+ end
464469}
465470
466471-- [[ Configure nvim-cmp ]]
You can’t perform that action at this time.
0 commit comments