Comments (4)
This is not a bug. bufnr
is not 0
for the scratch buffer. Should close.
If you need to show diagnostic for the buffer where the cursor is, try
require("trouble").toggle({ mode = "diagnostics", filter = { buf = vim.fn.bufnr() } })
from trouble.nvim.
How is it not 0, if everywhere in nvim's API, a buffer ID of 0 means the current buffer? It works that way with telescope (require("telescope.builtin").diagnostics { bufnr = 0 }
). Trouble's documentation also mentions that buf = 0
filters for the current buffer. So either this is a bug or the documentation needs to be updated.
from trouble.nvim.
My mistake. buf = 0
is a special case. See
trouble.nvim/lua/trouble/filter.lua
Lines 34 to 39 in 2d8610a
from trouble.nvim.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
from trouble.nvim.
Related Issues (20)
- bug: No results when calling Trouble HOT 4
- feature: Make files in `diagnostics` use `TroubleFileName` color HOT 1
- change the format in sources/diagnostics.lua HOT 4
- No mode specified HOT 1
- bug: Error message about loop vs ev in neovim 0.9
- feature: skip to next file in the trouble window
- bug: No results for **diagnostics** or other modes error shown HOT 3
- bug: weird formating of preview buffers on windows 11 HOT 2
- bug: Can't send telescope git status to trouble
- feature: Add code context to statusline or winbar HOT 1
- bug: Trouble spams error messages under certain circumstances HOT 1
- bug: Error messages when autocompleting commands in command line mode
- bug: lsp_incoming_calls doesn't give the caller function name
- bug: The initial fold-level setting doesn't take immediate effect.
- bug: When the cursor is on the `foldable(group)-item` before closing trouble, the `restore` config fails to work.
- feature: Add formatting to error like typescript ones HOT 2
- feature: Auto close on jump HOT 1
- bug: When both focus and follow are true, follow does not work
- feature: Custom timeout duration (or a more obvious error message?) HOT 2
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 trouble.nvim.