Fix formatting
This commit is contained in:
		@ -115,13 +115,16 @@
 | 
			
		||||
  (let [builtins (. (require :null-ls) :builtins)]
 | 
			
		||||
    (setup! :null-ls
 | 
			
		||||
            :on_attach (fn [client buf]
 | 
			
		||||
                         (bind! [ :n :v ] :<leader>o
 | 
			
		||||
                                #(vim.lsp.buf.format { :filter
 | 
			
		||||
                                                       ;; use null-ls for formatting
 | 
			
		||||
                                                       (fn [client] (or
 | 
			
		||||
                                                                      (= client.name :null-ls)
 | 
			
		||||
                                                                      (= client.name :rust_analyzer)))
 | 
			
		||||
                                                       :async true }) buf)
 | 
			
		||||
                         (bind! [ :n :v ]
 | 
			
		||||
                                :<leader>o
 | 
			
		||||
                                #(vim.lsp.buf.format
 | 
			
		||||
                                   { :filter
 | 
			
		||||
                                   ;; use null-ls for formatting
 | 
			
		||||
                                   (fn [client]
 | 
			
		||||
                                     (or
 | 
			
		||||
                                       (= client.name :null-ls)
 | 
			
		||||
                                       (= client.name :rust_analyzer)))
 | 
			
		||||
                                   :async true }) buf)
 | 
			
		||||
                         (vim.api.nvim_buf_set_option buf :formatexpr ""))
 | 
			
		||||
            :sources [
 | 
			
		||||
                      builtins.formatting.astyle
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user