/nvim-lastplace

A Neovim plugin that intelligently reopens files at your last edit position (a Lua rewrite of vim-lastplace)

Primary LanguageLuaMIT LicenseMIT

nvim-lastplace

A Neovim plugin that intelligently reopens files at your last edit position (a Lua rewrite of vim-lastplace).

Important

This is a modified fork of nvim-lastplace, which is no longer maintained. The purpose of this fork is to have a package on luarocks.org.

Prerequisites

  • Neovim >= 0.9

Installation

Install using your favourite plugin manager.

:Rocks install nvim-lastplace
{
  "mrcjkb/nvim-lastplace",
  init = function()
    -- optional configuration
  end,
}

Note

This fork doesn't have a setup function. It just works!

Default config

Lua:

vim.g.nvim_lastplace = {
    ignore_buftype = { 'quickfix', 'nofile', 'help' },
    ignore_filetype = { 'gitcommit', 'gitrebase', 'svn', 'hgcommit' },
    open_folds = true,
}

Vimscript:

let g:lastplace = {
    \ 'ignore_buftype': [ 
        \ 'quickfix',
        \ 'nofile',
        \ 'help',
        \ ],
    \ 'ignore_filetype': [
        \ 'gitcommit',
        \ 'gitrebase',
        \ 'svn',
        \ 'hgcommit',
        \ ],
    \ 'open_folds': 1,
\ }