akmassey / preserve.nvim

Neovim plugin to preserve cursor position when reformatting

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

preserve.nvim

A plugin that provides a function to preserve cursor position in a file, where possible, when running a command that reformats the file.

Installation

  1. Install via your favorite package manager.
-- lazy.nvim
{
   "akmassey/preserve.nvim",
   opts = {}
},
  1. Setup the plugin in your init.lua. This step is not needed with lazy.nvim if opts is set as above.
require("preserve").setup()

About

Neovim plugin to preserve cursor position when reformatting

License:MIT License


Languages

Language:Lua 100.0%