Skip to content

Fix deprecated vim.validate table syntax#1

Open
ChausseBenjamin wants to merge 1 commit into
rj1:masterfrom
ChausseBenjamin:fix-vim-validate
Open

Fix deprecated vim.validate table syntax#1
ChausseBenjamin wants to merge 1 commit into
rj1:masterfrom
ChausseBenjamin:fix-vim-validate

Conversation

@ChausseBenjamin
Copy link
Copy Markdown

@ChausseBenjamin ChausseBenjamin commented Oct 29, 2025

This PR fixes the deprecation warning for vim.validate by replacing the deprecated table syntax with the new positional arguments syntax.

The warning from :checkhealth was:

- ⚠️ WARNING vim.validate{<table>} is deprecated. Feature will be removed in Nvim 1.0
  - ADVICE:
    - use vim.validate(<params>) instead.
    - stack traceback:
        ~/.local/share/nvim/site/pack/core/opt/yadm.nvim/lua/yadm/init.lua:6
        ~/.local/share/nvim/site/pack/core/opt/yadm.nvim/lua/yadm/init.lua:50
        ~/.config/nvim/lua/plugins/fugitive.lua:16
        [C]:-1
        ~/.config/nvim/lua/bundles/git.lua:13
        [C]:-1
        ~/.config/nvim/init.lua:48
    - stack traceback:
        ~/.local/share/nvim/site/pack/core/opt/yadm.nvim/lua/yadm/init.lua:9
        ~/.local/share/nvim/site/pack/core/opt/yadm.nvim/lua/yadm/init.lua:50
        ~/.config/nvim/lua/plugins/fugitive.lua:16
        [C]:-1
        ~/.config/nvim/lua/bundles/git.lua:13
        [C]:-1
        ~/.config/nvim/init.lua:48

Changes:

  • Changed vim.validate({ config = { config, "table", true } }) to vim.validate("config", config, "table", true)
  • Changed vim.validate({ yadm_dir = { config.yadm_dir, "string" } }) to vim.validate("yadm_dir", config.yadm_dir, "string")

Replace vim.validate({ ... }) with vim.validate(...) to use the new positional arguments syntax instead of the deprecated table form.
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

Successfully merging this pull request may close these issues.

1 participant