Giter Site home page Giter Site logo

Comments (8)

andrewferrier avatar andrewferrier commented on May 20, 2024 1

That definitely makes sense to me, and in principle certainly works for my purposes. I tested your latest version with the commits above, though (and thanks for doing that so quickly!), and it doesn't quite seem to work as expected. If I open a file that already has some changes (versus the git state), which gitsigns then of course highlights, and I invoke :lua require('gitsigns').detach, what seems to happen is that those existing changes continue to be marked in the signcolumn. New changes that I make from that point onwards are not highlighted, but I was expecting that all of the gitsigns signs would disappear from the signcolumn immediately.

from gitsigns.nvim.

lewis6991 avatar lewis6991 commented on May 20, 2024

Given gitsigns is a lua plugin, I'd like to implement this enhancement as an exposed lua function.

It would be used as:

:lua require('gitsigns').detach()

We could implement this via a command or buffer local variable, but up until now I've tried to avoid introducing these and have only had lua as the interface to the plugin.

Would this solution be acceptable or would you much prefer this wrapped in a command for convenience?

from gitsigns.nvim.

lewis6991 avatar lewis6991 commented on May 20, 2024

Ah, thanks for testing. We just need to delete all the signs in that buffer.

Will update soon.

from gitsigns.nvim.

lewis6991 avatar lewis6991 commented on May 20, 2024

I think this is resolved now. Please reopen otherwise.

from gitsigns.nvim.

andrewferrier avatar andrewferrier commented on May 20, 2024

Yes, this seems to work for me now. Thanks!

from gitsigns.nvim.

pwntester avatar pwntester commented on May 20, 2024

Im trying to disable gitsigns on markdown buffers by running a BufEnter autocommand that runs :lua require('gitsigns').detach(). This works, but as soon as I save the buffer, the signs are showed again. I tried to detach them again on BufWritePost but its not working. Is there a permanent way to prevent gitsigns to attach to a markdown buffer?

Ideally, I would like to be able to prevent attaching gitsigns to md buffers at all (buffer enter, write, etc) rather than having to detach it

Thanks!

from gitsigns.nvim.

lewis6991 avatar lewis6991 commented on May 20, 2024

Take a look at :help gitsigns-config-on_attach. You can use this to prevent attaching to a buffer.

from gitsigns.nvim.

pwntester avatar pwntester commented on May 20, 2024

@lewis6991 oh, I missed that. Thank!

from gitsigns.nvim.

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.