Comments (8)
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.
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.
Ah, thanks for testing. We just need to delete all the signs in that buffer.
Will update soon.
from gitsigns.nvim.
I think this is resolved now. Please reopen otherwise.
from gitsigns.nvim.
Yes, this seems to work for me now. Thanks!
from gitsigns.nvim.
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.
Take a look at :help gitsigns-config-on_attach
. You can use this to prevent attaching to a buffer.
from gitsigns.nvim.
@lewis6991 oh, I missed that. Thank!
from gitsigns.nvim.
Related Issues (20)
- How to make git signs appear after line numbers
- Problem with colour of signs HOT 2
- Remove the vimfn sign backend with Nvim 0.10
- Feature request: get commit hash for the current line HOT 1
- Error when switching between index and worktree version of file (using vim-fugitive) HOT 6
- Error when deleting a buffer before `blame_line` loads
- Having problems with `gitsigns` and `nvim-colorizer` HOT 2
- Gitsigns fails to run `git --version` HOT 8
- `gitsigns_head` shows `nil` instead of revision
- Feature Request: Allow changing blame base.
- gitsign cannot attach if nvim starts from "run" window HOT 2
- Attempt to index a nil value after executing "GDelete" HOT 2
- Syntax highlighting fails after opening linehl HOT 1
- Configuring git blame HOT 2
- Error after update – gitsigns: Ignoring invalid configuration field 'on_attach_pre' HOT 8
- Git current line blame overlap with text when split windows HOT 1
- git blame fails -- looks like the git command is incorrect HOT 3
- error in executing `:Gitsigns preview_hunk_inline ` HOT 2
- null-ls format panic when apply path PR#983 HOT 3
- Gitsigns assertion error in folder not using git 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 gitsigns.nvim.