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

Error detected while processing function cljfmt#Format[13] #51

Open
BenQuigley opened this issue Nov 8, 2022 · 0 comments
Open

Error detected while processing function cljfmt#Format[13] #51

BenQuigley opened this issue Nov 8, 2022 · 0 comments

Comments

@BenQuigley
Copy link

BenQuigley commented Nov 8, 2022

I'm having the following issue while running :Cljfmt from vim. This is happening on both my Linux machine and my OS X machine - this version information is from OS X - so I take it it must be something I'm doing wrong (I'm kind of new to lein), but lein cljfmt fix runs from the CLI, and fireplace is working because Eval works from vi.

Error detected while processing function cljfmt#Format[13]..function cljfmt#Format:                                                                                                            
line   12:                                                                                                                                                                                     
Cljfmt: Failed to format file, likely due to a syntax error.                                                                                                                                   

Versions: Vim 9.0.472
REPL-y 0.5.1, nREPL 0.9.0
Clojure 1.11.1
OpenJDK 64-Bit Server VM 19.0.1

This happens to me even in a bare project created with lein new test, with the following project.clj:

(defproject test "0.1.0-SNAPSHOT"                                                                                                                                                              
  :description "FIXME: write description"                                                                                                                                                      
  :url "http://example.com/FIXME"                                                                                                                                                              
  :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"                                                                                                                   
            :url "https://www.eclipse.org/legal/epl-2.0/"}                                                                                                                                     
  :dependencies [[org.clojure/clojure "1.11.1"]]                                                                                                                                               
  :repl-options {:init-ns test.core}                                                                                                                                                           
  :plugins [[cider/cider-nrepl "0.28.5"] [lein-cljfmt "0.9.0"] [cljfmt "0.9.0"]])                                                                                                              

I had added [cljfmt "0.9.0"] to plugins because I was reading this issue; but adding it did not change the result. The following plugins config also did not work: :plugins [[cider/cider-nrepl "0.28.5"] [cljfmt "0.5.1"]]. Also appears similar to this.

The file that I'm running it on is the unchanged src/test/core.clj created by lein:

(ns test.core)                                                                                                                                                                                 
                                                                                                                                                                                               
(defn foo                                                                                                                                                                                      
  "I don't do a whole lot."                                                                                                                                                                    
  [x]                                                                                                                                                                                          
  (println x "Hello, World!"))

Clojure section of ~/.vimrc:

135 Plug 'tpope/vim-fireplace'                                                                                                                                                                 
136 "Plug 'tpope/vim-salve'                                                                                                                                                                    
137 "Plug 'guns/vim-clojure-static'                                                                                                                                                            
138 Plug 'venantius/vim-cljfmt'                                                                                                                                                                
139 Plug 'guns/vim-clojure-highlight'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant