Comments (6)
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.
@MarioCarrion Thanks!
from nvim-treesitter-context.
I also encountered this problem using the nvim v0.10.0-dev-3007+GA736E845A
.
from nvim-treesitter-context.
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.
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.
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)
- feat: Lua API to get the status of treesitter context
- Very poor performance after “do not use vim.treesitter.highlighter” HOT 2
- Use one floating window instead of two. HOT 10
- Multi-line function definition is not handled HOT 1
- Feature Request: Formalise require('treesitter-context.context').get() API HOT 2
- Feat: tag the ts-context windows so they can be identified programmatically HOT 2
- Can this plugin be configured such that scrolloff is respected between the context and the cursor? HOT 2
- Show ruby blocks in context HOT 3
- Julia context queries not updated HOT 10
- Q: is there a way to replicate GitHub's context? HOT 4
- Error message when opening the command line window with q: HOT 2
- invaild node type in haskell HOT 1
- Unable to load context query for c_sharp HOT 3
- Crash on empty first line when number line is on (markdown) HOT 3
- No context causes negative height
- I wish that pluggin work on popup window HOT 2
- Applying parsers to additional filetypes HOT 3
- Parenthesis not highlighted in context HOT 1
- C_sharp scm file broken again HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim-treesitter-context.