File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -77,10 +77,13 @@ return {
77
77
})
78
78
79
79
-- expand javascript react snippets for javascript.
80
- luasnip .filetype_extend ( " javascript" , { " html" })
81
- luasnip .filetype_extend ( " javascript" , { " javascriptreact" })
82
- luasnip .filetype_extend ( " html" , { " javascript" })
83
- luasnip .filetype_extend ( " html" , { " css" })
80
+ luasnip .filetype_extend ( " javascriptreact" , { " html" })
81
+ luasnip .filetype_extend ( " javascript" , { " html" , " javascriptreact" })
82
+ luasnip .filetype_extend ( " html" , { " css" , " javascript" })
83
+ -- if file extension endswith ejs.
84
+ if vim .fn .fnamemodify (vim .fn .expand (' %:t' ), ' :e' ) == ' ejs' then
85
+ luasnip .filetype_extend ( " html" , { " ejs" })
86
+ end
84
87
-- this loads friendly-snippets as lazy-load.
85
88
require (' luasnip.loaders.from_vscode' ).lazy_load ()
86
89
end
Original file line number Diff line number Diff line change @@ -22,3 +22,10 @@ vim.opt.smartindent = true
22
22
23
23
-- vim.opt.completeopt = { "menuone", "noselect" }
24
24
vim .opt .modifiable = true
25
+
26
+ -- extend html filetype support for ejs.
27
+ vim .filetype .add ({
28
+ extension = {
29
+ ejs = " html" ,
30
+ },
31
+ })
You can’t perform that action at this time.
0 commit comments