Skip to content

Allow link completion for multiple file types #312

@weibeld

Description

@weibeld

Description

I have a use case where I mix Markdown and YAML files in the same wiki. This can be enabled by setting g:wiki_filetypes = ['md', 'yaml'] so that wiki.vim gets enabled in both types of files.

The problem with this is that the link completion function (which I guess is defined in complete.vim) provides only completion suggestions for files of the same type as the current file. That is, when triggering the completion in a Markdown files, only Markdown files are suggested and when triggering completion in a YAML file, only YAML files are suggested.

This stands in contrast to WikiPages which returns all files of the types defined in g:wiki_filetypes, that is, it returns all Markdown and YAML files in the wiki.

I would like the link completion to include all wiki files (as returned by WikiPages) and not only the files of the same type as the current file. Is there some way to achieve this?

Minimal working example

Consider the following wiki with g:wiki_filetypes = ['md', 'yaml']:

wiki/
├── markdown1.md
├── markdown2.md
├── yaml1.yaml
└── yaml2.yaml

When triggering the link completion in markdown1.md, the suggestions include only markdown1.md and markdown2.md. When triggering link completion in yaml1.yaml, the suggestions include only yaml1 and yaml2. The WikiPages command in both cases includes markdown1, markdown2, yaml1, and yaml2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions