haydenrou / dotfiles

My Personalised Development Environment
39 stars 2 forks source link

Enable formatters #13

Closed haydenrou closed 7 months ago

haydenrou commented 10 months ago

Not sure if this should be done via an LSP or alternative at the moment.

haydenrou commented 9 months ago

If you update the default LSPs update the README, I think it's missing templ at the moment

haydenrou commented 8 months ago

https://github.com/stevearc/conform.nvim

  formatters_by_ft = {
    css = { "stylelint" },
    scss = { "stylelint" },
    lua = { "stylua" },
    templ = { "rustywind", "templ" },
    javascript = { "eslint", { "prettierd", "prettier" } },
    typescript = { {"eslint", "tslint"}, { "prettierd", "prettier" } },
    go = {
      {
        command = "goimports-reviser",
        args = {"-file-path", "%filepath"},
      },
      "golines",
      { "gofumpt", "gofmt" },
    },
  },