Giter Club home page Giter Club logo

Comments (3)

lewis6991 avatar lewis6991 commented on September 22, 2024 1

Now we no longer collapse lines in the context, this should be a lot easier to implement.

from nvim-treesitter-context.

Danielkonge avatar Danielkonge commented on September 22, 2024

Now we no longer collapse lines in the context, this should be a lot easier to implement.

I have a version of this working with rainbow-delimiters now, but it is hard to make it work with all kinds of extmarks.

E.g. I wanted to transfer gitsigns's extmarks too, but it messes with the alignment of the line numbers, and I couldn't figure out how to easily fix it. I also wanted to transfer indent-blankline extmarks, but usually indent-blankline doesn't render indentation guides except for a few lines up and down (to save a lot of calculation).

I can make a draft pull request with the basic idea if you want? But I assume you wouldn't want to include code covering only specific extmarks from certain plugins?

from nvim-treesitter-context.

xzbdmw avatar xzbdmw commented on September 22, 2024

I find nvim_buf_get_extmarks don't return the same information as specified with nvim_buf_set_extmark, which makes it hard to implement right.
For example, mini.indentscope returns

{
    hl_mode = "combine",
    ns_id = 24,
    priority = 2,
    right_gravity = false,
    virt_text = { { "", "MiniIndentscopeSymbol" } },
    virt_text_hide = false,
    virt_text_pos = "win_col",
    virt_text_repeat_linebreak = false,
    virt_text_win_col = 4
  }

while "win_col" is an invalid value that throws an error if apply directly in context buffer.

E5108: Error executing lua: ...vim-treesitter-context/lua/treesitter-context/render.lua:94: Invalid 'virt_text_pos': 'win_col'

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.