summaryrefslogtreecommitdiff
path: root/fnl/config/lsp/null-ls.fnl
blob: 0f9e459fd45e4ae2bcd1e0e1051630eda0dde981 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
;; Adds LSP diagnostics and formatting.
(module config.lsp.null-ls
  {autoload {util util}})

(let [null-ls (util.load-plugin :null-ls)]
  (let [formatting null_ls.builtins.formatting 
        diagnostics null_ls.builtins.diagnostics])
  (null-ls.setup
    {:debug false
     :sources [
       (diagnostics.flake8)
       (diagnostics.golangci_lint)
       (diagnostics.jsonlint)
       (diagnostics.shellcheck)
       (diagnostics.yamllint)
       (formatting.black.with { extra_args [ "--fast" ] })
       (formatting.erlfmt)
       (formatting.fourmolu)
       (formatting.gofmt)
       (formatting.goimports)
       (formatting.nixfmt)
       (formatting.prettier.with {
         extra_args [ "--no-semi" "--single-quote" "--jsx-single-quote" ]
       })
       (formatting.rustfmt)
       (formatting.shfmt)
       (formatting.sqlformat)
       (formatting.stylua)
       (formatting.terraform_fmt)]}))