Code Monkey home page Code Monkey logo

Comments (3)

gennaro-tedesco avatar gennaro-tedesco commented on June 23, 2024 1

I will update the README file to specify that the nightly build is indeed recommended (I did not realise it myself before you pointed it out, so good to have looked into it).

from nvim-commaround.

gennaro-tedesco avatar gennaro-tedesco commented on June 23, 2024

The error is presumably caused by the fact that vim.bo.filetype returns nil (in particular the call to vim.bo).

In order to debug it

  1. please issue the command :lua print(vim.bo.filetype) and check the output. This should return the filetype of the current buffer: does it return the correct value (or any non-nil value)?
  2. what version of neovim are you running? I suspect that the API vim.bo.filetype needs latest nightly build and I believe the error is caused by such property call returning a null value.
  3. in order to validate assumption 2. you may try to replace the call to vim.bo.filetype with the hardcoded value of a specific filetype (just for testing). Say replace in the code local filetype_config = global_config.config['lua'] and toggle comments on a Lua file: if the plugin works fine by passing the reference manually, then the problem is indeed as point 2 above; otherwise it is a bug and I will investigate.

from nvim-commaround.

mehant-kr avatar mehant-kr commented on June 23, 2024

Same error with :lua print(vim.bo.filetype)
Done as stated in 3 and got an error https://imgur.com/a/PSNWTYL
I am using nvim v0.4.3 though it works on nvim v0.5.0, I installed nightly build and now it works fine for me.

from nvim-commaround.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.