Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Make this a PR to Neovim core #36

Open
mrjones2014 opened this issue Oct 20, 2021 · 12 comments
Open

Make this a PR to Neovim core #36

mrjones2014 opened this issue Oct 20, 2021 · 12 comments

Comments

@mrjones2014
Copy link

If this is really this much better and works consistently and as well as filetype.vim then IMO it should be included in Neovim core, to outright replace filetype.vim. Just a suggestion.

@nathom
Copy link
Owner

nathom commented Oct 20, 2021

Because this plugin is relatively new, there will still be edge cases that need to be sorted out. I might do this once it reaches a more stable state.

@clason
Copy link

clason commented Oct 21, 2021

Core is well aware of this plugin, and pretty much of the same opinion: worthwhile, but should be done carefully to avoid regressions. The more people test it now, the better :)

Friction points to moving it upstream (which can all be overcome):

  1. It's quite likely that a significant number of tests would need to be adapted.
  2. It'll make it (slightly) harder to port Vim patches adding new filetypes or changing the detection.
  3. The main benefit here is not Lua but the single autocommand -- would be good to quantify this (and ideally, if Vimscript is enough, make a PR to Vim).
  4. To get the full benefit, you want this as a native Lua autocommand (i.e., without wrapping it in :lua ...), which is a non-trivial PR that is currently progressing slowly due to lack of time.

@clason
Copy link

clason commented Oct 24, 2021

An intermediate step could be to move this into https://github.com/nvim-lua/plenary.nvim (the "Neovim nursery") -- in particular, integrating this into https://github.com/nvim-lua/plenary.nvim#plenaryfiletype.

@clason
Copy link

clason commented Dec 3, 2021

In the meantime, it would be useful for this plugin to stay (reasonably) up-to-date with the filetype.vim updates from upstream -- I'm sure these would be welcome and straightforward PRs for anybody interested in this project.

Another very useful thing would be to test (ideally as a CI job!) whether Neovim's filetype test still passes with this plugin (and if not, ensure that it does).

ttys3 added a commit to ttys3/nvim-config that referenced this issue Jan 19, 2022
@syphar
Copy link

syphar commented Jan 27, 2022

I believe we can close this issue, since neovim added filetype.lua, see also the discussion on reddit

@ttys3
Copy link

ttys3 commented Feb 17, 2022

merged neovim/neovim#16600

does this mean if using the nightly version, this plugin is not needed anymore?

@clason
Copy link

clason commented Feb 17, 2022

Note that the built-in Lua filetype detection behaves somewhat differently (for the above-mentioned reasons), so you might still prefer to use this plugin.

@ahillio
Copy link

ahillio commented Feb 21, 2022

Wow cool... so will that merge/commit be included in the 0.6.2 release?

@clason
Copy link

clason commented Feb 21, 2022

No. Features are not backported to release branches, so this will only be in 0.7.0.

@ahillio
Copy link

ahillio commented Feb 21, 2022

Thanks for clarifying :)

@clason
Copy link

clason commented Jul 8, 2022

Update: filetype.lua is now the default on Neovim master (and 0.8.0, when that is released). It has full parity with filetype.vim (including scripts.vim and setf FALLBACK support), passing Vim's filetype detection test suite. It will be kept in sync with future filetype detection changes in Vim and should thus be a safe and non-breaking replacement.

I believe this issue can be closed now.

@hinell
Copy link

hinell commented Jan 13, 2023

Please close the issue, the patch has landed into Neovim already. See:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants