all repos

init.lua @ 9905d2a

my nvim config

init.lua/lua/plugins/lsp.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---@type LazySpec
return {
  "b0o/schemastore.nvim",
  {
    "j-hui/fidget.nvim",
    event = { "BufReadPre", "BufNewFile" },
    opts = {
      progress = {
        display = {
          render_limit = 2,
          done_ttl = 2,
        },
      },
    },
  },
  {
    "RRethy/vim-illuminate",
    event = { "BufReadPre", "BufNewFile" },
    opts = {
      providers = { "lsp", "treesitter" },
      filetypes_denylist = {
        "NeogitStatus",
        "TelescopePrompt",
      },
    },
    config = function(_, opts)
      require("illuminate").configure(opts)
    end,
  },
  {
    "folke/lazydev.nvim",
    ft = "lua",
    cmd = "LazyDev",
    ---@module "lazydev"
    ---@type lazydev.Config
    ---@diagnostic disable-next-line: missing-fields
    opts = {
      library = {
        { path = "${3rd}/luv/library", words = { "vim%.uv" } },
        { path = "mini.test", words = { "MiniTest" } },
        { path = "mini.ai", words = { "MiniAI" } },
        { path = "snacks.nvim", words = { "Snacks" } },
        "lazy.nvim",
      },
    },
  },
  {
    "nvimtools/none-ls.nvim",
    event = { "BufReadPre", "BufNewFile" },
    config = function()
      local null_ls = require "null-ls"
      local formatting = null_ls.builtins.formatting
      local diagnostic = null_ls.builtins.diagnostics

      null_ls.setup {
        sources = {
          formatting.pg_format,
          diagnostic.codespell.with {
            args = {
              "--ignore-words",
              vim.env.HOME .. "/.config/codespell-ignore.txt",
              "-",
            },
          },

          formatting.stylua,
          diagnostic.selene.with {
            condition = function(utils)
              return utils.root_has_file "selene.toml"
            end,
          },

          formatting.goimports,
          formatting.golines,
        },
      }
    end,
  },
}