Giter Club home page Giter Club logo

Comments (10)

lewis6991 avatar lewis6991 commented on June 16, 2024

No

from nvim-treesitter-context.

xzbdmw avatar xzbdmw commented on June 16, 2024

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.

romgrk avatar romgrk commented on June 16, 2024

@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.

lewis6991 avatar lewis6991 commented on June 16, 2024

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.

romgrk avatar romgrk commented on June 16, 2024

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.

lewis6991 avatar lewis6991 commented on June 16, 2024

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.

romgrk avatar romgrk commented on June 16, 2024

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.

xzbdmw avatar xzbdmw commented on June 16, 2024

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.

romgrk avatar romgrk commented on June 16, 2024

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.

lewis6991 avatar lewis6991 commented on June 16, 2024

We can review a PR if one is opened.

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.