Giter Club home page Giter Club logo

Comments (6)

cswingle avatar cswingle commented on June 23, 2024 1

I am also seeing this error with some (but not all) Markdown documents where there is an empty line after the YAML header. For me, I get the messages after every scroll, regardless of what section of the file is displayed, and I've only seen the error with certain RMarkdown/Quarto files. This could be some sort of interaction with R.nvim and/or the r-languageserver.

Last week I attempted to figure out when this happened. It looks like the trigger (at least from a neovim perspective) is commit 05f9db1c6: build(deps): bump tree-sitter to v0.22.4

from nvim-treesitter-context.

jonahfang avatar jonahfang commented on June 23, 2024 1

@MarioCarrion Thanks!

from nvim-treesitter-context.

jonahfang avatar jonahfang commented on June 23, 2024

I also encountered this problem using the nvim v0.10.0-dev-3007+GA736E845A.

from nvim-treesitter-context.

robjwells avatar robjwells commented on June 23, 2024

I've also encountered this recently, though I have a suspicion that in my case it's been due to some problem with the LSP (rust-analzyer).

I've not been able to come up with a reproduction, but I added this guard to the start of the render function just to prevent the error from showing:

if height < 1 then
  height = 1
end

from nvim-treesitter-context.

MarioCarrion avatar MarioCarrion commented on June 23, 2024

For anyone looking for a workaround

Having a fix for this would be ideal, but in the meantime if you want to disable it when you're editing markdown files you could do:

        vim.api.nvim_create_autocmd("FileType", {
            pattern = {"markdown"},
            callback = function(ev)
                require("treesitter-context").disable()
            end
        })

(Example above is assuming you're using lazy.nvim and it's called as part of config function)

Of course this means you are only editing markdown files and no other file types, otherwise it will be loaded no matter what.

from nvim-treesitter-context.

AngelBerihuete avatar AngelBerihuete commented on June 23, 2024

Also it can be disable in LazyVim

return {
  -- disable nvim-treesitter-context
  { "nvim-treesitter/nvim-treesitter-context", enabled = false },
}

from nvim-treesitter-context.

Related Issues (20)

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.