Back to Spacevim

format.nvim

bundle/format.nvim/README.md

2.4.01.1 KB
Original Source

format.nvim

format.nvim is an asynchronous code formatting plugin based on SpaceVim job api.

<!-- vim-markdown-toc GFM --> <!-- vim-markdown-toc -->

Install

  1. Using format.nvim in SpaceVim:
toml
[[layers]]
  name = 'format'
  format_method = 'format.nvim'
  1. Using format.nvim without SpaceVim:
Plug 'wsdjeg/format.nvim'

Configuration

lua
require('format').setup({
  custom_formatters = {
    lua = {
      exe = 'stylua',
      args = { '-' },
      stdin = true,
    },
  },
})

Usage

  • :Format: format current buffer

Feedback

The development of this plugin is in SpaceVim/bundle/format.nvim directory.

If you encounter any bugs or have suggestions, please file an issue in the issue tracker