all repos

init.lua @ f0c5542

my nvim config

init.lua/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
39
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.setup {
    sources = {
      -- Lua
      fmt.stylua,
      lint.selene,

      -- Golang
      lint.golangci_lint,
      fmt.gofumpt,
      fmt.goimports,
      -- lint.revive,

      -- JavaScirpt
      fmt.prettierd,
      lint.eslint_d,

      -- Shell
      fmt.shfmt,
      lint.shellcheck,

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

      -- Rust
      fmt.rustfmt,
    },
  }
end

return M