feat: adds vim.notify

Adds function to notify the user like this:
`:lua vim.notify("hello user")`
embeds log levels vim.log.levels.

you can then reassign vim.notify to for instance
```
function notify_external(msg, log_level, opts)
	vim.fn.jobstart({"notify-send", msg })
end
```
This commit is contained in:
Matthieu Coudron
2021-01-27 15:09:02 +01:00
parent 8950f4e94a
commit 3f81f5c7a4
3 changed files with 33 additions and 11 deletions

View File

@@ -17,10 +17,11 @@
#endif
#define DEBUG_LOG_LEVEL 0
#define INFO_LOG_LEVEL 1
#define WARN_LOG_LEVEL 2
#define ERROR_LOG_LEVEL 3
#define TRACE_LOG_LEVEL 0
#define DEBUG_LOG_LEVEL 1
#define INFO_LOG_LEVEL 2
#define WARN_LOG_LEVEL 3
#define ERROR_LOG_LEVEL 4
#define DLOG(...)
#define DLOGN(...)