PrashanthaTP / dotfiles

My dotfiles (Windows system)
1 stars 0 forks source link

Bug(Neovim,LSP) : document formatting not working #13

Closed PrashanthaTP closed 2 years ago

PrashanthaTP commented 2 years ago

I am using Prettier for JS,JSX,TS,TSX files, as formatter but some how it does not seem to work

I have tried diagnosticls and efm

require("lspconfig"),diagnosticls.setup(
...
formatters={
    prettier = {
        command = "prettier",
        args = { "--stdin", "--stdin-filepath", "%filename" },
}
...
)

https://github.com/PrashanthaTP/dotfiles/blob/703cbbf9db2d6b7682b51bb9bfcefbf5d1bb4d33/.config/nvim/lua/plugins/nvim-lspconfig/servers/efm.lua#L15

I have found that some of the language servers do not support document formatting.

PrashanthaTP commented 2 years ago

Hi,

use Prettierd, Eslintd

I found these links helpful