Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: error starting prettierd for html files #479

Open
1 task done
egnvk opened this issue Jun 26, 2024 · 1 comment
Open
1 task done

bug: error starting prettierd for html files #479

egnvk opened this issue Jun 26, 2024 · 1 comment
Labels
bug Something isn't working question Further information is requested

Comments

@egnvk
Copy link

egnvk commented Jun 26, 2024

Neovim version (nvim -v)

v0.10.0

Operating system/version

Arch kernel 6.9.6

Add the debug logs

  • I have set log_level = vim.log.levels.DEBUG and pasted the log contents below.

Log file

Log file: /home/egn/.local/state/nvim/conform.log
07:54:54[DEBUG] prettierd stderr: { "" }
07:54:54[ERROR] Formatter 'prettierd' error:

Describe the bug

I get an error when I try to save the html file

Formatter failed. See :ConformInfo for details  ```

i am use default config conform 
require("conform").setup({
	format_on_save = {
		timeout_ms = 500,
		lsp_fallback = true,
		async = false,
		-- quiet = true,
	},
	log_level = vim.log.levels.DEBUG,
	formatters_by_ft = {
		lua = { "stylua" },
		-- Conform will run multiple formatters sequentially
		python = { "isort", "black" },
		-- Use a sub-list to run only the first available formatter
		javascript = { { "prettierd", "prettier" } },
		typescript = { "prettierd" },
		javascriptreact = { "prettierd" },
		typescriptreact = { "prettierd" },
		css = { "prettierd" },
		html = { "prettierd" },
		json = { "prettierd" },
		yaml = { "prettierd" },
		markdown = { "prettierd" },
		graphql = { "prettierd" },
	},
})


### What is the severity of this bug?

minor (annoyance)

### Steps To Reproduce

default configs of all plugins:
lazy nvim
mason
conform
there is nothing else. globally installed prettierd

### Expected Behavior

the file will be formatted

### Minimal example file

_No response_

### Minimal init.lua

```Lua
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"

if not (vim.uv or vim.loop).fs_stat(lazypath) then
	vim.fn.system({
		"git",
		"clone",
		"--filter=blob:none",
		"https://github.com/folke/lazy.nvim.git",
		"--branch=stable", -- latest stable release
		lazypath,
	})
end

vim.opt.rtp:prepend(lazypath)

local plugins = {
	-- color themes
	{ "rebelot/kanagawa.nvim", lazy = false, name = "kanagawa" },

        -- mason package manager
        { "williamboman/mason.nvim", lazy = true },

        -- conform formatter
        {
          'stevearc/conform.nvim',
          opts = {},
        }
}

require("lazy").setup(plugins)

Additional context

node.js 20.14 version

@egnvk egnvk added the bug Something isn't working label Jun 26, 2024
@stevearc
Copy link
Owner

The log file appears to be truncated, because it should be showing you the prettierd command that it was running. You should find that in the logs and run it directly to see how it performs. Usually this process reveals an issue with the formatter itself.

@stevearc stevearc added the question Further information is requested label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants