Skip to content

Plugin isn't working but keybindings have been mapped  #115

@hpb0412

Description

@hpb0412

I am following the Neovim from Scratch tutorial but all features don't work.

My specs:

  • Mac M1 (Monterey: 12.1)

  • iterm2

  • Neovim info:

    NVIM v0.6.1
    Build type: Release
    LuaJIT 2.1.0-beta3
    Compiled by [email protected]
    
    Features: +acl +iconv +tui
    See ":help feature-compile"
    
       system vimrc file: "$VIM/sysinit.vim"
       fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.6.1/share/nvim"
  • My setup:

    -- comment.lua
    local status_ok, comment = pcall(require, "Comment")
    if not status_ok then
      vim.notify("Comment not found!")
      return
    end
    comment.setup()
    
    -- plugins.lua
    -- ...other stuffs
    use "numToStr/Comment.nvim"
    -- ...
    
    -- init.lua
    require "path.to.plugins"
    require "path.to.comment"

    I also try the instruction from the README.md of this repo

    use {
      'numToStr/Comment.nvim',
      config = function()
          require('Comment').setup()
      end
    }
  • I check the :map and found all keymaps have been mapped
    Screen Shot 2022-02-08 at 12 16 18 PM

  • Issue: using the gcc and/or other actions doesn't work at all.
    Ex: after typing the gcc the cursor converted to underline and no commenting out

Screen.Recording.2022-02-08.at.12.09.29.PM.mov
  • What i did:
    • Try to set mapping.basic to true (at the setup function call)
    • Try different languages: lua, html, css, js, jsx, ts => all doesn't work
    • Try 2 ways of configuration (mentioned above)
    • The only way that works:
      • mimic the mapping with neovim command line
      :lua require("Comment.api").call("toggle_current_linewise_op")
      • then type enter to confirm the command
      • then g@$

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem rightquestionQuestion related to integration and other stuff

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions