Skip to content

Instructions or plugin for using vim/neovim #301

@David-Else

Description

@David-Else

It could be quite easy to add support to vim/neovim without a complex plugin. Prettier can be used in neovim by simply adding the following to the config file and having the prettier command available (press gp to run in normal mode):

   "run global prettier install on current buffer
   func! Prettier_format()
       let save_cursor = getcurpos()
       exe '%!pnpx prettier --stdin-filepath % --single-quote'
       call setpos('.', save_cursor)
   endfunc

   nnoremap gp :call Prettier_format()<CR>

Adding some instructions, or even a plugin for dprint would be awesome!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions