Skip to content

how to auto format afte save #3120

Answered by dpetka2001
woshichuanqilz asked this question in Q&A
Discussion options

You must be logged in to vote

You should just create a file ~/.config/nvim/lua/plugins/format.lua with contents

return {
  {
    "stevearc/conform.nvim",
    opts = {
      formatters_by_ft = {
        json = { { "jq" } },
      },
    },
  },
}

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@woshichuanqilz
Comment options

@dpetka2001
Comment options

Answer selected by woshichuanqilz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants