Massolari/forem.nvim

github github
utility
star 18
stars
alert-circle 2
open issues
users 2
subscribers
git-branch 1
forks
CREATED

2022-06-22

UPDATED

13 days ago


Forem.nvim

https://user-images.githubusercontent.com/12272702/175755820-a2b93f4b-fd5c-416b-8b9e-d981335ef75c.mov

https://user-images.githubusercontent.com/12272702/175755866-62be0b6c-31b2-4f45-81c7-f30cd3301d43.mov

Summary

Features

  • View and edit your articles
  • Create a new article
  • View the feed of articles
  • View an article from the feed

Dependencies

Required

Optional

Installation

Using packer:

use {
    "Massolari/forem.nvim",
    requires = {
        "nvim-lua/plenary.nvim",
        "nvim-telescope/telescope.nvim"
    }
}

Setup

First, you need to generate an API key for the DEV platform.

For dev.to, you can do it in the end of the extension's page

With your API key, you need to pass it in the setup function:

require'forem-nvim'.setup {
    api_key = "" -- Your API Key
}

Usage

The plugin has the following commands and functions available in forem-nvim module:

function command description
feed() :Forem feed Shows fresh articles from the feed, then you can read it in Neovim or open it in the browser
my_articles() :Forem my_articles Shows all your articles, then you can pick one to edit
new_article() :Forem new_article Asks for a title, then creates an article with the given title and open it to edit
open_by_url() :Forem open_by_url Asks for an URL, then opens the article

After you save the buffer it'll automatically be saved in the cloud.

Note: these functions will only be available after the setup call

Contributing

Please, don't hesitate in contributing by creating issues and opening pull requests.

Credits

This plugin design and idea was inspired by octo.nvim