Closed kg8m closed 3 years ago
I'm closing this issue because supporting context_filetype.vim has a side effect. For example, rules like { "at": '```[a-z]\+\%#', "filetype": "markdown", ... }
doesn't work because ```foo
in a Markdown file is treated as foo
filetype by context_filetype.vim.
I'll loosely add rules. For example, rules for JavaScript by { "filetype": ["javascript", "html"], ... }
. Rules for HTML, JavaScript, and CSS by { "filetype": [..., "vue"], ... }
. They work well in most cases.
Some filetypes contains multiple filetypes in a file. For example, JavaScript codes are sometimes contained in a HTML file as following:
I think it is convenient if lexima.vim rules for
javascript
can be used in the JavaScript codes. For one more example,vue
filetype containshtml
,javascript
, andcss
in itself. I think it is very convenient if rules forhtml
,javascript
, orcss
can be used when editing a Vue file.I am aware that I can use rules for
javascript
when editing a HTML file if I add rules like{ ..., "filetype": ["html", "javascript"] }
. But with this way, the rules will be applied to non-JavaScript codes.How about supporting Shougo/context_filetype.vim? This plugin provides functions to detect filetype depending on the cursor position context.
I will create a Pull Request if you are positive about supporting context_filetype.vim.
Best regards.