Skip to content

Installation Guide

Josh Peterson edited this page Jun 15, 2024 · 1 revision

Installation Guide

Installing Typewriter.nvim is straightforward and can be done using popular package managers like Packer and Lazy.nvim. Follow the instructions below to get started:

Using Packer

Packer is a popular package manager for Neovim. If you haven't installed Packer yet, you can do so by following the instructions on its GitHub page.

  1. Add Typewriter.nvim to your Packer configuration:

    Open your init.lua or init.vim configuration file and add the following lines:

    use {
        'joshuadanpeterson/typewriter',
        config = function()
            require('typewriter').setup()
        end
    }
  2. Install the plugin:

    After adding the above lines, run the following command in Neovim to install the plugin:

    :PackerSync

Using Lazy.nvim

Lazy.nvim is another efficient package manager for Neovim. If you haven't installed Lazy.nvim yet, you can do so by following the instructions on its GitHub page.

  1. Add Typewriter.nvim to your Lazy.nvim configuration:

    Open your configuration file (typically ~/.config/nvim/lua/plugins/init.lua) and add the following lines:

    local lazy = require('lazy')
    
    lazy.setup({
        -- Other plugins...
    
        {
            'joshuadanpeterson/typewriter',
            config = function()
                require('typewriter').setup()
            end,
            opts = {}
        },
    })
  2. Install the plugin:

    After adding the above lines, restart Neovim, and Lazy.nvim will automatically install the plugin.

Conclusion

By following these installation instructions, you can easily set up Typewriter.nvim with either Packer or Lazy.nvim. Once installed, you can begin enjoying a focused and distraction-free writing experience in Neovim.