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

nvim_get_option_value calls break compatibility with neovim 0.7 #1950

Open
2 tasks done
KevinGoodsell opened this issue Jun 3, 2024 · 0 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@KevinGoodsell
Copy link

FAQ

  • I have checked the FAQ and it didn't resolve my problem.

Announcement

Minimal reproducible full config

if has('vim_starting')
  set encoding=utf-8
endif
scriptencoding utf-8

if &compatible
  set nocompatible
endif

let s:plug_dir = expand('/tmp/plugged/vim-plug')
if !filereadable(s:plug_dir .. '/plug.vim')
  execute printf('!curl -fLo %s/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim', s:plug_dir)
end

execute 'set runtimepath+=' . s:plug_dir
call plug#begin(s:plug_dir)
Plug 'hrsh7th/nvim-cmp'
Plug 'hrsh7th/cmp-buffer'
Plug 'hrsh7th/cmp-nvim-lsp'
Plug 'hrsh7th/vim-vsnip'
Plug 'neovim/nvim-lspconfig'
call plug#end()
PlugInstall | quit

" Setup global configuration. More on configuration below.
lua << EOF
local cmp = require "cmp"
cmp.setup {
  snippet = {
    expand = function(args)
      vim.fn["vsnip#anonymous"](args.body)
    end,
  },

  mapping = {
    ['<CR>'] = cmp.mapping.confirm({ select = true })
  },

  sources = cmp.config.sources({
    { name = "nvim_lsp" },
    { name = "buffer" },
  }),
}
EOF

lua << EOF
local capabilities = require('cmp_nvim_lsp').default_capabilities()

require'lspconfig'.cssls.setup {
  capabilities = capabilities,
}
EOF

Description

Commit 5260e5e uses nvim_get_option_value with the 'buf' option. This is not available in neovim 0.7.2, causing errors.

Steps to reproduce

Start nvim 0.7.2 with the repro config.

Expected behavior

nvim starts normally.

Actual behavior

Errors reported on the screen, starting with

Error detected while processing /home/kevin/cmp-repro.vim:
line   44:
E5108: Error executing lua /tmp/plugged/vim-plug/nvim-cmp/lua/cmp/config.lua:111: invalid key: buf

Additional context

As far as I can see the README doesn't mention what neovim versions are supported, and the breaking changes only mentions dropping support for versions older than 0.7.

@KevinGoodsell KevinGoodsell added the bug Something isn't working label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant