Comments (2)
Any return value will delete the callback, see :h news.
Your example will not work correctly anyway, since the callback is called with arguments, which other functions will not expect.
Callbacks should always be wrapped in dedicated functions; do not simply pass handles to API functions.
from neovim.
Roger that.
I had this code piece before and it used to work but I am far from an expert in neovim and Lua. Now that I took a closer look the following is what it should be:
vim.api.nvim_create_autocmd("CursorHold", {
callback = function(ev)
vim.diagnostic.open_float()
end,
})
This works now!
Thanks for the pointers
from neovim.
Related Issues (20)
- Spurious E506, E207 with files in unwritable directories HOT 2
- Restoring a `User{N}` highlight inside an item group causes the whole item group to disappear HOT 5
- show listchars only for current (cursor) line HOT 1
- Revamp option scopes
- commenting: add 'inner comment' text object
- Terminal sets `wrap` window-scoped instead of locally
- MAX macro redefined HOT 2
- Neovim v0.10.0 removes trailing whitespace on save HOT 8
- can't detect python provider in Windows 10 HOT 5
- Treesitter queries specified in the "inherits:" modeline are always merged, even if there is an overridden query
- Any key return messy codes HOT 1
- Weird tab chars when setting `listchars` only to `trail:.` HOT 2
- neovim-qt with Nvim v0.11.0 shows many "no notification handler registered" warnings HOT 4
- "focusable" for non-floating (split) windows
- Percent sign (%) for jumping to matching parenthesis doesn't regard comments and work properly HOT 1
- vim.loader luac cache file names gets too long on ecryptfs HOT 2
- cmdheight=0: NULL dereference in grid_del_lines() HOT 5
- nvim ... --remote-expr execute("tabs") does not work anymore HOT 6
- Error while showing diagnostics open_float HOT 3
- "Unhandled Token" in neovim documentation search bar & headings 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 neovim.