qvacua / vimr

VimR — Neovim GUI for macOS in Swift
https://twitter.com/VimRefined
MIT License
6.61k stars 218 forks source link

filetype not detected in v0.46.0-20240102.233758 #1045

Open songcai opened 6 months ago

songcai commented 6 months ago

Since v0.46.0-20240102.233758, VimR has problem detecting filetypes. After opening a new VimR process, when I open the first file, the filetype is properly detected and syntax highlighting works properly. However, when I open any other file after the first one, the filetype is not detected. If I use ":set filetype" in VimR, I get "filetype=". As a consequence, syntax highlighting does not work at all.

I have never had such a problem in earlier versions.

mgrubb commented 6 months ago

I'm having the reverse of this problem. When I open one file the file detection isn't triggering, but if I open subsequent files in the same window, they all detect properly. (same version as reported above) on macOS 13.6.3 22G436 x86_64.

georgeharker commented 6 months ago

I'm sorry, I can't repro this.

songcai commented 5 months ago

I unloaded all plugins and removed all personal settings, but still have the problem. The following is a minimal example: (1) Make sure that there is nothing in $HOME/.config/nvim/init.vim file (i.e., make it an empty file). This way, I know that nothing outside VimR itself is having an effect. (2) make a "test.md" file with the following single line as content, and save:

I tested on a Macbook Pro and a Macbook Air, both with Intel CPU and running Sonoma 14.2.1. On both computers, I get the same result. I have the same problem on the nightly build, but I do not have this problem in VimR 0.45.5. I saw "Improve rendering performance slightly" in the release note of 0.46.0 and I wonder if this note is related to the problem.

georgeharker commented 5 months ago

Are there any messages (:messages) sometimes issues with startup files don't show obviously

songcai commented 5 months ago

There are no messages.

songcai commented 5 months ago

I just realize that the content of the "test.md" file in (2) of my minimal example is not showing correctly because it has HTML code. I am attaching the file: test.md

carlmueller commented 5 months ago

This bug appears to be fixed in Version 0.46.1 (20240114.181346).

songcai commented 5 months ago

The bug remains in Version 0.46.1 (20240114.181346) for me.

rainux commented 4 months ago

I did a completely clean install of VimR (AppCleaner automatically remove the preferences .plist file and state folder of VimR), move away ~/.config/nvim, ~/.local/share/nvim, ~/.local/state/nvim, the problem still persist.

It is not always can't detect filetype, it comes randomly and make debug a bit harder.

mageekguy commented 3 months ago

Hi everyone! I have exactly the same problem: Filetype is set to empty string so there is no syntax highlighting (I'm using 0.46.1).

mageekguy commented 3 months ago

Hi!

Maybe related to https://github.com/neovim/neovim/pull/19216. FYI, set g:do_legacy_filetype=1 in my init.vim seems to have fixed the problem.

carlmueller commented 3 months ago

After adding g:do_legacy_filetype=1 to init.vim and starting vimr, I get the message Pattern not found: do_legacy_filetype=1 and it doesn't fix the problem for me.