Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neovim unreliable file type handling #454

Open
lyndhurst opened this issue Sep 25, 2023 · 2 comments
Open

Neovim unreliable file type handling #454

lyndhurst opened this issue Sep 25, 2023 · 2 comments

Comments

@lyndhurst
Copy link

lyndhurst commented Sep 25, 2023

Hi,
I would appreciate some help finding out what is wrong with my configuration.

I am using LunarVim at the moment which might interfere with the way plugins are configured. It basically uses Mason to manage plugins and neovim 0.9.1.

I have disabled all my custom pandoc and pandoc-syntax configurations to eliminate this potential source of problems, so I only have pandoc-vim and pandoc-vim-syntax installed without any additional configs.

My goal is the supposed default behaivior; I open a .md file in neovim, it is opened as a pandoc file.
The issue is that if I open the same .md file several times in a row it is randomly going to be given the pandoc or markdown file type each time.

I thought that maybe it could be some async problem of neovim configs not being loaded in the same order everytime, it turns out I got the same outcome issuing :e file.md from inside vim.

I tried with a .mkd file, and the same thing happens in seemingly lesser proportions.

I also checked when the file is open as markdown, and all pandoc autocmds and options seem to be loaded as they should.

Do you have any advice on how I could get a better understanding of what is happening ?

@lyndhurst
Copy link
Author

It seems to be a known conflict with vim-polyglot. I used to have let g:polyglot_disabled = ['markdown'] in my vimrc, but I cannot make this option work with neovim. I will try again, but if this is the case, it is a polyglot issue, nothing to do with vim-pandoc.

@alerque
Copy link
Member

alerque commented Dec 18, 2023

I'm going to re-open this because in the case of plugin clashes there is almost always a way to work around it from either end. Even if polyglot is doing something wrong and the best action is for us to suggest they fix it, we might want to hack around it anyway or at least track it getting worked out on our side.

@alerque alerque reopened this Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants