Re: syntaxcomplete#Complete() and nested filetypes

2021-06-22 Thread Lifepillar
On 2021-06-22, David Fishburn wrote: > Life, > > I am not sure I quite understand your use case for the plugin. Thanks for the feedback. My goal is to have some sort of context-sensitive completion. My use case is ConTeXt, which can include MetaPost blocks: \starttext TeX code here:

Re: syntaxcomplete#Complete() and nested filetypes

2021-06-21 Thread David Fishburn
Life, I am not sure I quite understand your use case for the plugin. :h ft-syntax-omni In the example I provide there, I am editing a PHP file, which has embedded HTML and JavaScript. So I need syntaxComplete to also provide JavaScript functions, not just PHP functions. That examples

Re: syntaxcomplete#Complete() and nested filetypes

2021-06-21 Thread Lifepillar
On 2021-06-21, Lifepillar wrote: > I would like to use syntaxcomplete#Complete() in a filetype that > includes a nested filetype. This is what I have so far, which appears to be working in filetype `foobar` with nested filetype `xyz`: def foobarcomplete#Complete(findstart: number, base:

syntaxcomplete#Complete() and nested filetypes

2021-06-21 Thread Lifepillar
I would like to use syntaxcomplete#Complete() in a filetype that includes a nested filetype. The only way I have found so far is to define my own completion function that checks whether the current position is within the nested filetype, then calls OmniSyntaxList() with the appropriate regular