Comments (10)
No
from nvim-treesitter-context.
In case someone have the same request, here is a fork version using one window
https://github.com/xzbdmw/nvim-treesitter-context
from nvim-treesitter-context.
@lewis6991 Can you add more context? Is there any issue you foresee?
If someone has an implementation with 1 window I'd be happy to accept a PR.
from nvim-treesitter-context.
We can accept a good PR if it doesn't add any complexity. The user issue is just that Neovide adds a shadow which I don't think is an issue enough for adding complexity.
I looked at the fork and all it does it prepend the line numbers to each line in the context window (with lots of unnecessary formatting changes), which is a broken way of doing this since it breaks highlighting. So we won't accept that as a PR.
We would need to use either inlay-extmarks, or try and pack the information into the signcolumn (somehow?). Both of those will introduce unnecessary complexity, so I'm not interested in exploring those.
I'd be happy to accept a PR.
Do you plan on maintaining it? I'm happy to see you back contributing to the project, but with respect, you seem to have a tendency to take long hiatuses.
from nvim-treesitter-context.
Fairs point, and I'm also wary of complexity when receiving a PR.
Why do you think inlay extmarks would introduce too much complexity? Doesn't sound like that much work. I don't have enough bandwidth to implement that but if someone is interested in doing that exploration, do you foresee any issue there?
from nvim-treesitter-context.
Why do you think inlay extmarks would introduce too much complexity?
Inlay hints are a 0.10 feature so we would instantly drop support for 0.9, and it's likely (as with all new extmark features) that there's still probably some unknown issues with them. Using a second floating window is just closer to what we're trying to emulate, so we don't need to worry about any weird edge cases like alignment and such.
Arguably, Neovide should just be able to render this properly despite there being two windows, provided they have the same z-index.
Lots of plugins use floating windows for all sorts of stuff (e.g. https://github.com/dstein64/nvim-scrollview and https://github.com/lewis6991/satellite.nvim), so the shadow they are rendering is going to generally cause issues.
So really, I'm not convinced this is something we need to address.
from nvim-treesitter-context.
Arguably, Neovide should just be able to render this properly despite there being two windows, provided they have the same z-index.
Valid argument. With that in mind I'm ok with treating this as a neovide issue rather than a bug here. Thanks for the comments.
from nvim-treesitter-context.
We can accept a good PR if it doesn't add any complexity. The user issue is just that Neovide adds a shadow which I don't think is an issue enough for adding complexity.
I looked at the fork and all it does it prepend the line numbers to each line in the context window (with lots of unnecessary formatting changes), which is a broken way of doing this since it breaks highlighting. So we won't accept that as a PR.
We would need to use either inlay-extmarks, or try and pack the information into the signcolumn (somehow?). Both of those will introduce unnecessary complexity, so I'm not interested in exploring those.
I'd be happy to accept a PR.
Do you plan on maintaining it? I'm happy to see you back contributing to the project, but with respect, you seem to have a tendency to take long hiatuses.
Oh I see the broken highlight, and simply add gutterwidth to query's start col and end col fix that, I'm not familiar with highlight stuff so linenumber highlight simply using context window's one(so not enough for a pr), but this should be simple I guess:)
from nvim-treesitter-context.
I don't see it as an untractable problem to shift highlight columns to account for line numbers tbh. We already do some shifting for other cases. I don't like complexity but I also don't want to fully discourage you to open a PR if you find an easy & reliable way to fix the issue. Using one less window is nice.
from nvim-treesitter-context.
We can review a PR if one is opened.
from nvim-treesitter-context.
Related Issues (20)
- Disbled languages config option HOT 1
- feat: Lua API to get the status of treesitter context
- Very poor performance after “do not use vim.treesitter.highlighter” HOT 2
- 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
- height key must be positive integer error while scrolling down in markdown file when the first line is empty HOT 6
- 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
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.