1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 17:40:06 +08:00
SpaceVim/bundle/format.nvim
2024-12-21 16:33:22 +08:00
..
lua feat(format): add rustfmt 2024-04-18 21:28:35 +08:00
plugin ci(record-key.nvim): detact record-key.nvim 2024-12-20 08:22:44 +08:00
README.md feat(markdown): add SPC l f to format code block 2024-12-21 16:33:22 +08:00

format.nvim

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

GPLv3 License

Install

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

Configuration

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