-
Notifications
You must be signed in to change notification settings - Fork 145
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
Failed to run formatter sed #299
Comments
I'm sorry, I successfully formatted the .c file by changing from stylua to astyle, although it still reports the same error after formatting. -- Utilities for creating configurations
local util = require "formatter.util"
-- Provides the Format, FormatWrite, FormatLock, and FormatWriteLock commands
require("formatter").setup {
-- Enable or disable logging
logging = true,
-- Set the log level
log_level = vim.log.levels.WARN,
-- All formatter configurations are opt-in
filetype = {
-- Formatter configurations for filetype "lua" go here
-- and will be executed in order
lua = {
-- "formatter.filetypes.lua" defines default configurations for the
-- "lua" filetype
require("formatter.filetypes.lua").stylua,
},
c = {
require("formatter.filetypes.c").astyle ,
},
java = {
require("formatter.filetypes.java").clangformat,
},
-- Use the special "*" filetype for defining formatter configurations on
-- any filetype
["*"] = {
-- "formatter.filetypes.any" defines default configurations for any
-- filetype
require("formatter.filetypes.any").remove_trailing_whitespace
}
}
}
|
I have the same issue on Windows 11. |
(Windows 10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am using the Windows 10 system, Neovim version 0.9.0. After installing and configuring formatter.nvim, I used the ': Format' command in the '. c' file and generated an error warning without formatting the file.
I have installed sed by scoop
Here is my formatter configuration file
Add:I realize that I used the wrong method name. .c should use astyle .java should use clangformat
Here is the error message.
"Failed to run formatter sed ... : -e expression #1, char 1: unknown command: `''^M"
The text was updated successfully, but these errors were encountered: