Skip to content

Latest commit

 

History

History
47 lines (29 loc) · 1.04 KB

README.md

File metadata and controls

47 lines (29 loc) · 1.04 KB

gh-status.nvim

Dead-simple plugin to update your GitHub profile status from Vim.

Installation

This depends on plenary.nvim to make HTTP request, please install it if you haven't.

Using vim-plug:

Plug 'duydang2311/gh-status.nvim'

Setup

  1. Generate a token with user scope fully enabled.

  2. Pass the credentials to setup function.

local gh_status = require'gh-status'

gh_status.setup({
	username = '<username>',
	token = '<access_token>'
})

Use

As for now, you have to manually invoke the function to update your status.

You can, e.g. either map changeUserStatus to a key to set your status, or combine it with autocmd.

local gh_status = require'gh-status'

vim.keymap.set('n', '<leader>gh', function()
	gh_status.changeUserStatus('editing ' .. vim.fn.expand('%:t'))
end, { noremap = true, silent = false })

image