File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,14 @@ M.default_config = {
21
21
-- global on_setup hook
22
22
M .on_setup = nil
23
23
24
- --- @param filetype string the filetype to check (can be a compound , dot-separated filetype ; see | ' filetype' | )
24
+ --- Test if a given filetype string matches any of the expected filetypes
25
+ ---
26
+ --- Note that vim filetypes can be a dot-separated string containing multiple filetypes, and the plugins/syntax rules for
27
+ --- all sub-filetypes are applied to the buffer. e.g. a buffer with a filetype of `yaml.ansible` will load the ftplugin
28
+ --- and syntax rules for both `yaml` and `ansible` (and in that order). see |'filetype'|
29
+ ---
30
+ --- Accordingly, this will attempt to match any of the sub-filetypes against the expected filetype(s)
31
+ --- @param filetype string the filetype to check (can be a compound , dot-separated filetype )
25
32
--- @param expected string | string[] the filetype (s ) to match against
26
33
--- @return boolean
27
34
function M .ft_matches (filetype , expected )
You can’t perform that action at this time.
0 commit comments