1
0
mirror of https://github.com/amix/vimrc synced 2025-07-27 23:45:00 +08:00

Add markdown preview, update rust.vim

This commit is contained in:
Kurtis Moxley
2022-05-19 20:12:11 +08:00
parent d26bc75459
commit d6ef288a88
156 changed files with 29900 additions and 0 deletions

View File

@ -0,0 +1,26 @@
const attach = require('./lib/attach').default
const logger = require('./lib/util/logger')('app/nvim')
const MSG_PREFIX = '[markdown-preview.nvim]'
const plugin = attach({
reader: process.stdin,
writer: process.stdout
})
process.on('uncaughtException', function (err) {
let msg = `${MSG_PREFIX} uncaught exception: ` + err.stack
if (plugin.nvim) {
plugin.nvim.call('mkdp#util#echo_messages', ['Error', msg.split('\n')])
}
logger.error('uncaughtException', err.stack)
})
process.on('unhandledRejection', function (reason, p) {
if (plugin.nvim) {
plugin.nvim.call('mkdp#util#echo_messages', ['Error', [`${MSG_PREFIX} UnhandledRejection`, `${reason}`]])
}
logger.error('unhandledRejection ', p, reason)
})
exports.plugin = plugin