0

I'm trying to setup my nvim environment following this video. I tried to install Telescope and got this error. I'm installing this on wsl2, nvim version 0.9.1

[packer.nvim] [ERROR 18:23:00] async.lua:20: Error in coroutine: vim/_editor.lua:0: nvim_exec2()../home/minhnd/.local/share/nvim/site/pack/packer/start/plenary.nvim/plugin/plenary.vim, line 1: Vim:E492: Not an editor command: ^M

Error image

This is my packer.lua file:

vim.cmd [[packadd packer.nvim]]

return require('packer').startup(function(use)
  -- Packer can manage itself
  use 'wbthomason/packer.nvim'

  use {
    'nvim-telescope/telescope.nvim', tag = '0.1.2',
  -- or                            , branch = '0.1.x',
    requires = { {'nvim-lua/plenary.nvim'} }
  }
end)
3
  • Could be this neovim issue about DOS line ending. Sadly, we cannot know for sure because the guy who opened the bug posted a now defunct image of the error message instead of writing it in text. Oh, the irony...
    – Friedrich
    Jul 20, 2023 at 12:16
  • 1
    Please don't post images of text You can edit to include the exact error text
    – D. Ben Knoble
    Jul 20, 2023 at 16:42
  • 2
    Convert your .vim files to unix file format Jul 21, 2023 at 6:37

1 Answer 1

0

I solved thanks to Christian Brabandt's comment. Here's what I did for those who might get the same error:

I cd to the error file, open it with nvim, run :set ff=unix then save the file and the error is gone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.