summaryrefslogtreecommitdiffstatshomepage
path: root/nvim_WIP/lua/plugins.lua
blob: 5c72ed0af0b579e79cbee16843a5e2cdb57035e3 (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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
local fn = vim.fn
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
  packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
end

return require('packer').startup(function(use)
  
  -- plugins

  -- Packer
  use '~/projects/personal/packer.nvim'

  use 'lewis6991/impatient.nvim'

  -- Async building & commands
  use { 'tpope/vim-dispatch', cmd = { 'Dispatch', 'Make', 'Focus', 'Start' } }

    -- Search
  use {
    {
      'nvim-telescope/telescope.nvim',
      requires = {
        'nvim-lua/popup.nvim',
        'nvim-lua/plenary.nvim',
        'telescope-frecency.nvim',
        'telescope-fzf-native.nvim',
      },
      wants = {
        'popup.nvim',
        'plenary.nvim',
        'telescope-frecency.nvim',
        'telescope-fzf-native.nvim',
      },
      setup = function() require('config.telescope_setup') end,
      config = function() require('config.telescope') end,
      cmd = 'Telescope',
      module = 'telescope',
    },
    {
      'nvim-telescope/telescope-frecency.nvim',
      after = 'telescope.nvim',
      requires = 'tami5/sqlite.lua',
    },
    {
      'nvim-telescope/telescope-fzf-native.nvim',
      run = 'make',
    },
  }

    -- Undo tree
  use {
    'mbbill/undotree',
    cmd = 'UndotreeToggle',
    config = function() vim.g.undotree_SetFocusWhenToggle = 1 end,
  }

  -- Git
  use {
    { 'tpope/vim-fugitive', cmd = { 'Git', 'Gstatus', 'Gblame', 'Gpush', 'Gpull' }, disable = true },
    {
      'lewis6991/gitsigns.nvim',
      requires = { 'nvim-lua/plenary.nvim' },
    },
    { 'TimUntersberger/neogit', 
      cmd = 'Neogit', 
      config = function() require('neogit').setup {disable_commit_confirmation = true, disable_signs = true} end
  },
  }

  -- linting
  use {
    {
      'neovim/nvim-lspconfig',
      config = function() require('config.lspconfig') end,
    },
    {
      "williamboman/nvim-lsp-installer",
      requires = 'nvim-lspconfig',
      after = 'nvim-lspconfig',
      config = function() require('config.lspinstaller') end,
    },
    'folke/trouble.nvim',
    'ray-x/lsp_signature.nvim',
    'kosayoda/nvim-lightbulb',
  }

    -- Completion
  use {
    'hrsh7th/nvim-cmp',
    requires = {
      'L3MON4D3/LuaSnip',
      { 'hrsh7th/cmp-buffer', after = 'nvim-cmp' },
      'hrsh7th/cmp-nvim-lsp',
      'hrsh7th/cmp-nvim-lsp-signature-help',
      { 'onsails/lspkind-nvim', after = 'nvim-cmp' },
      { 'hrsh7th/cmp-nvim-lua', after = 'nvim-cmp' },
      { 'saadparwaiz1/cmp_luasnip', after = 'nvim-cmp' },
      { 'nvim-lua/lsp_extensions.nvim', after = 'nvim-cmp' },
    },
    config = function() require('config.cmp') end,
    event = 'InsertEnter *',
  }

  use({
      "folke/which-key.nvim",
      config = function() require("which-key").setup({}) end,
  })

  -- Highlights
  use {
    'nvim-treesitter/nvim-treesitter',
    requires = {
      'nvim-treesitter/nvim-treesitter-refactor',
      'RRethy/nvim-treesitter-textsubjects',
    },
    run = ':TSUpdate',
  }


  -- Debugger
  use {
    {
      'Pocco81/DAPInstall.nvim',
      config = function() require("dap-install").config("chrome", {}) end,
    },
    {
      'mfussenegger/nvim-dap',
      setup = function() require('config.dap_setup') end,
      after = 'dap-install',
      config = function() require('config.dap') end,
      module = 'dap',
    },
    {
      'puremourning/vimspector',
      requires = 'nvim-dap',
      after = 'nvim-dap',
      setup = function() vim.g.vimspector_enable_mappings = 'HUMAN' end,
    },
    {
      'rcarriga/nvim-dap-ui',
      requires = 'nvim-dap',
      disable = true,
      after = 'nvim-dap',
      config = function() require('dapui').setup() end,
    },
  }
  
  -- Profiling
  use { 'dstein64/vim-startuptime', cmd = 'StartupTime', config = function() vim.g.startuptime_tries = 10 end }

  -- Refactoring
  use { 'ThePrimeagen/refactoring.nvim', opt = true }

  -- Highlight colors
  use {
    'norcalli/nvim-colorizer.lua',
    ft = { 'css', 'javascript', 'vim', 'html' },
    config = function() require('colorizer').setup {'css', 'javascript', 'vim', 'html'} end,
  }

    -- Buffer management
  use {
    'akinsho/nvim-bufferline.lua',
    requires = 'kyazdani42/nvim-web-devicons',
    config = function() require('config.bufferline') end,
    event = 'User ActuallyEditing',
  }  
  
  -- Automatically set up your configuration after cloning packer.nvim
  -- Put this at the end after all plugins
  if packer_bootstrap then
    require('packer').sync()
  end
end)