Fix formatting

This commit is contained in:
Alexander Rosenberg 2023-05-19 15:08:56 -07:00
parent 90fcd5db92
commit 1a26f6ccd6
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730
2 changed files with 11 additions and 9 deletions

View File

@ -2,8 +2,7 @@
(import-macros {: bind! : hook! (import-macros {: bind! : hook!
: use! : setup! : use! : setup!
: module-call! : module-call!} :macros)
: module-fn! } :macros)
(fn [use] (fn [use]
;; Packer ;; Packer

View File

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