Skip to content

bug: The import statements are ordered when enabling the prettier formatter #599

@giancarlosisasi

Description

@giancarlosisasi

Neovim version (nvim -v)

0.9.1

Operating system/version

Macos 12.5.1

Describe the bug

Hi there!
This is my first time using neovim and lazyvim. There I'm enabling prettierd and I found that all my import statements are being ordered on save-file 😢

prettier-neovim.mp4

This only happens with lazyvim and prettierd enabled. I have tested my code and prettier config in vscode and in the command line (prettier --write.. ) and it works as expected. Maybe the prettierd plugin has a default configuration that is overridden my prettier.config.js? 🤔

Steps To Reproduce

  1. Install lazy vim: https://www.lazyvim.org/installation
  2. Enable prettier: https://www.lazyvim.org/extras/formatting/prettier
  3. Go to a ts file and save the file. You will see how the imports are sorted 😞

Expected Behavior

Prettier should not sort/order my imports 😢

I have created the issue in the lazyvim repo but looks like they doesn't apply any custom configuration. So, looks like the problem is with prettierd 🤔
LazyVim/LazyVim#1396

Also, is there a way to enable bugs and get the logs of prettierd? 🤔

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions