aboutsummaryrefslogtreecommitdiff
path: root/config/nvim/lua/plugins.lua
blob: 5ace9d1c3f870822fcc142204db19b6ed014b24c (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
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim' if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    'git',
    'clone',
    '--filter=blob:none',
    'https://github.com/folke/lazy.nvim.git',
    '--branch=stable', -- latest stable release
    lazypath,
  })
end
vim.opt.rtp:prepend(lazypath)

require('lazy').setup({
  {
    'ibhagwan/fzf-lua',
    config = function()
      -- calling `setup` is optional for customization
      require('fzf-lua').setup({
        winopts={
          width=1,
          height=0.4,
          row=1
        },
        fzf_opts={
          ['--layout']='default'
        },
        fzf_colors = {
          ['fg'] = {'fg', 'Normal'},
          ['bg'] = {'bg', 'Normal'},
          ['hl'] = {'fg', 'Comment'},
          ['fg+'] = {'fg', 'Type'},
          ['bg+'] = {'bg', 'Comment'},
          ['hl+'] = {'fg', '@fzf.hlplus'},
          ['info'] = {'fg', 'PreProc'},
          ['prompt'] = {'fg', 'Conditional'},
          ['pointer'] = {'fg', 'Exception'},
          ['marker'] = {'fg', 'Keyword'},
          ['spinner'] = {'fg', 'Label'},
          ['header'] = {'fg', 'Comment'}
        },
        previewers = {
          builtin = {
            extensions = {
              ['png'] = { 'chafa', '-f', 'symbols', '{file}' },
              ['gif'] = { 'chafa', '-f', 'symbols', '{file}' },
              ['svg'] = { 'chafa', '-f', 'symbols', '{file}' },
              ['jpg'] = { 'chafa', '-f', 'symbols', '{file}' },
              ['jpeg'] = { 'chafa', '-f', 'symbols', '{file}' }
            }
          }
        }
      })
    end
  },

  -- Syntaxes
  'ARM9/snes-syntax-vim',
  'https://git.sr.ht/~torresjrjr/gemini.vim',

  --'Debugging
  {
    'rcarriga/nvim-dap-ui',
    dependencies = {
      'mfussenegger/nvim-dap',
      'nvim-neotest/nvim-nio'
    }
  },

  -- Editing
  'RRethy/nvim-treesitter-endwise',
  {
    'windwp/nvim-autopairs',
    event = "InsertEnter",
    config = true
  },
  'michaeljsmith/vim-indent-object',
  {
    'danymat/neogen',
    config = true
  },

  -- Treesitter
  'nvim-treesitter/nvim-treesitter',
  'https://git.sr.ht/~rbdr/tree-sitter-api-notation',
  'https://git.sr.ht/~rbdr/tree-sitter-wmap',

  -- LSP
  {
    'neovim/nvim-lspconfig',
    lazy = false,
  },
  {
    'saghen/blink.cmp',
    dependencies = { 'rafamadriz/friendly-snippets' },
    version = '1.*',

    ---@module 'blink.cmp'
    ---@type blink.cmp.Config
    opts = {
      keymap = {
        preset = 'enter',
        ['<Tab>'] = { 'snippet_forward', 'select_next', 'fallback' },
        ['<S-Tab>'] = { 'snippet_backward', 'select_prev', 'fallback' },
      },
      sources = {
        default = { 'lsp', 'path', 'snippets', 'buffer' },
      },
      fuzzy = { implementation = "prefer_rust_with_warning" },
    },
    opts_extend = { "sources.default" }
  },
  {
    "folke/lazydev.nvim",
    ft = "lua",
    opts = {},
  },

  -- Tools
  'mbbill/undotree',
  'milkypostman/vim-togglelist',
  {
    'folke/which-key.nvim',
    event = 'VeryLazy',
    init = function()
      vim.o.timeout = true
      vim.o.timeoutlen = 300
    end,
    opts = {}
  },
  {
    'stevearc/oil.nvim',
    opts = {
      keymaps = {
        ['<C-p>'] = false,
        ['<C-S-p>'] = 'actions.preview'
      }
    }
  },

  'https://git.sr.ht/~rbdr/nota.nvim',
  'https://git.sr.ht/~rbdr/oleoboard.nvim',
  'https://git.sr.ht/~rbdr/jannotate.nvim',
})