aboutsummaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua53
1 files changed, 53 insertions, 0 deletions
diff --git a/init.lua b/init.lua
new file mode 100644
index 0000000..46b308d
--- /dev/null
+++ b/init.lua
@@ -0,0 +1,53 @@
+-- Clone 'mini.nvim' manually in a way that it gets managed by 'mini.deps'
+local path_package = vim.fn.stdpath('data') .. '/site/'
+local mini_path = path_package .. 'pack/deps/start/mini.nvim'
+if not vim.loop.fs_stat(mini_path) then
+ vim.cmd('echo "Installing `mini.nvim`" | redraw')
+ local clone_cmd = {
+ 'git', 'clone', '--filter=blob:none',
+ 'https://github.com/echasnovski/mini.nvim', mini_path
+ }
+ vim.fn.system(clone_cmd)
+ vim.cmd('packadd mini.nvim | helptags ALL')
+ vim.cmd('echo "Installed `mini.nvim`" | redraw')
+end
+
+
+local mini_deps = require('mini.deps')
+mini_deps.setup({ path = { package = path_package } })
+local add = mini_deps.add
+
+-- deps
+add("echasnovski/mini.nvim") -- provide many things
+add("neovim/nvim-lspconfig") -- lsp support
+add({
+ source = "nvim-treesitter/nvim-treesitter",
+ hooks = { post_checkout = function() vim.cmd('TSUpdate') end },
+})
+
+-- misc
+require("mini.statusline").setup()
+
+-- treesitter
+local tree_sitter = require("nvim-treesitter.configs")
+
+tree_sitter.setup({
+ ensure_installed = {"go"},
+ highlight = {enable = true}
+})
+
+-- completion
+require("mini.completion").setup()
+
+local lsp_config = require("lspconfig")
+
+lsp_config.gopls.setup({
+ capabilities = capabilities,
+ cmd_env = {GOFLAGS = "-tags=unit,integration,e2e"},
+ on_attach = on_attach
+})
+
+
+
+
+