all repos

dotfiles @ a6d1f45fd60ac16f4498c560b6e9b9b8962a0c74

my dotfiles

config/nvim/lua/lsp/null.lua (view raw)

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
30
31
32
33
34
35
36
37
38
local M = {}

function M.setup()
  local null_ls = require "null-ls"

  local fmt = null_ls.builtins.formatting
  local lint = null_ls.builtins.diagnostics

  null_ls.config {
    sources = {
      -- Lua
      fmt.stylua,
      lint.selene,

      -- Golang
      fmt.gofumpt,
      fmt.goimports,

      -- JavaScirpt
      fmt.prettierd,
      lint.eslint_d,

      -- Shell
      fmt.shfmt,
      lint.shellcheck,

      -- Python
      fmt.black,
      fmt.isort,
      lint.flake8,

      -- Rust
      fmt.rustfmt,
    },
  }
end

return M