diff options
author | Gabriel A. Giovanini <g.giovanini@gridx.de> | 2024-08-16 10:21:14 +0200 |
---|---|---|
committer | Gabriel A. Giovanini <g.giovanini@gridx.de> | 2024-08-16 10:21:14 +0200 |
commit | 489be2d4d47180b47d7b078552ce3e99977cd104 (patch) | |
tree | a80f1cbcf855ec54c959833fc898feeaacd54367 /init.lua | |
download | gabrielgio.lua-489be2d4d47180b47d7b078552ce3e99977cd104.tar.gz gabrielgio.lua-489be2d4d47180b47d7b078552ce3e99977cd104.tar.bz2 gabrielgio.lua-489be2d4d47180b47d7b078552ce3e99977cd104.zip |
feat: Syncnew
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 53 |
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 +}) + + + + + |