gabrielgio.lua @ 489be2d4d47180b47d7b078552ce3e99977cd104

 1-- Clone 'mini.nvim' manually in a way that it gets managed by 'mini.deps'
 2local path_package = vim.fn.stdpath('data') .. '/site/'
 3local mini_path = path_package .. 'pack/deps/start/mini.nvim'
 4if not vim.loop.fs_stat(mini_path) then
 5  vim.cmd('echo "Installing `mini.nvim`" | redraw')
 6  local clone_cmd = {
 7    'git', 'clone', '--filter=blob:none',
 8    'https://github.com/echasnovski/mini.nvim', mini_path
 9  }
10  vim.fn.system(clone_cmd)
11  vim.cmd('packadd mini.nvim | helptags ALL')
12  vim.cmd('echo "Installed `mini.nvim`" | redraw')
13end
14
15
16local mini_deps = require('mini.deps')
17mini_deps.setup({ path = { package = path_package } })
18local add = mini_deps.add
19
20-- deps
21add("echasnovski/mini.nvim") -- provide many things
22add("neovim/nvim-lspconfig") -- lsp support
23add({
24    source = "nvim-treesitter/nvim-treesitter",
25    hooks = { post_checkout = function() vim.cmd('TSUpdate') end },
26})
27
28-- misc
29require("mini.statusline").setup()
30
31-- treesitter
32local tree_sitter = require("nvim-treesitter.configs")
33
34tree_sitter.setup({
35    ensure_installed = {"go"},
36    highlight = {enable = true}
37})
38
39-- completion
40require("mini.completion").setup()
41
42local lsp_config = require("lspconfig")
43
44lsp_config.gopls.setup({
45    capabilities = capabilities,
46    cmd_env = {GOFLAGS = "-tags=unit,integration,e2e"},
47    on_attach = on_attach
48})
49
50
51
52
53