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

Polyglot overrides newer ftplugins that ship with vim #845

Open
idbrii opened this issue Jan 9, 2024 · 1 comment
Open

Polyglot overrides newer ftplugins that ship with vim #845

idbrii opened this issue Jan 9, 2024 · 1 comment

Comments

@idbrii
Copy link
Contributor

idbrii commented Jan 9, 2024

Does this bug happen when you install plugin without vim-polyglot?
No, it's because polyglot bundles ftplugins that are included with vim.

Readme says:

On top of all language packs from vim repository, vim-polyglot includes...

Describe the bug:

When I upgrade vim it gets new syntax and ftplugin files, but since user plugins load before vim runtime files the polyglot version is preferred. So my ftplugin files will be using the old polyglot version.

I can upgrade polyglot to solve, but I've had several issues upgrading polyglot that broke my workflow so it doesn't feel safe to upgrade without carefully checking the change log. (Automatic indent detection was a notable one since I already have DetectIndent and editorconfig and I think polyglot overrode their behaviour. I think Sensible was another fiasco since I see I've disabled that too.)

To Reproduce:

Install latest vim. Install polyglot c96947b.

Create test.story:

Feature: Guess the word
  Rule: Only 5 guesses

  # The first example has two steps
  Scenario: Maker starts a game
    When the Maker starts a game
    Then the Maker waits for a Breaker to join

It looks like this:
polyglot

but should look like this with Rule highlighted:
vim latest with Rule highlighted

Suggestions:

Provide a way to disable polyglot's copy of vim's language packs or grab the version of vim they're copied from and automatically disable if the user's version of vim is newer.

@rodrigoaguilera
Copy link

Same problem with neovim. editorconfig come built-in after neovim 0.9 and vim-polyglot overrided indent configuration.
In my case I had lua files with 2 spaces indent defined in the .editorconfig file and polyglot sets shiftwidth to 4.

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