Use submodules and plain vim packages
The only wonky thing here is dependency management and the only thing requiring deps is telescope. Maybe I'll drop it.
- Id
- 5e201ece218c2683a9d188d9ccd0a221743b2ef6
- Author
- Caio
- Commit time
- 2025-04-12T08:11:28+02:00
Modified config/nvim/README
config.nvim
Simple configuration for neovim with (optional) LSP support. Built
by plucking options out of my .vimrc [VIMRC] when a default behavior
bothered me.
- Plugins are managed via the emacsesque packer.nvim [PACKER] and not
- having it configured doesn't leave anything broken nor throws errors
- at my face.
-
Here be no icons, text rules.
Basic Installation
- $ git clone https://github.com/caio/config.nvim ~/.config/nvim
-
-Enabling and Installing/Updating Plugins
-
- It's assumed git is installed and neovim is running with a UI capable
- displaying 24-bit colors, be it a terminal (:help termguicolors) or a
- GUI.
-
- $ nvim +BootstrapPacker
- $ nvim +PackerSync
+ $ git clone --recurse-submodules https://github.com/caio/config.nvim ~/.config/nvim
Starting/Using LSP
:LspStart
-To-Do
-
- 1. Runnables [RUN] support, mostly to launch tests. It's the only
- thing that I actually miss from my previous setup.
-
References
[VIMRC] My vim configuration files
- https://github.com/caio/vim-runtime
-
- [PACKER] packer.nvim: A Plugin Manager for Neovim
- https://github.com/wbthomason/packer.nvim
-
- [RUN] Rust-analyzer's Runnables lsp extension
- https://rust-analyzer.github.io/manual.html#run
+ https://caio.co/de/vim-runtime/
Modified config/nvim/init.lua
vim.opt.background = "light"
vim.cmd("colorscheme zenbones")
--- Configure general-purpose mappings
--- Plugin-related ones are managed along with the plugins
require('mappings')
require("config.lsp")
-
--- Load plugins via `packer`
--- If the packer installation is not found, no plugins
--- will be configured.
-local fn, cmd = vim.fn, vim.cmd
-local packer_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
-
-if fn.empty(fn.glob(packer_path)) > 0 then
-
- function packer_bootstrap()
- cmd [[echo "Cloning packer.nvim..."]]
- fn.system({'git', 'clone','--depth=1', 'https://github.com/wbthomason/packer.nvim', packer_path})
- vim.api.nvim_command('packadd packer.nvim')
- require('plugins')
- vim.cmd('autocmd User PackerComplete quitall!')
- vim.api.nvim_command('PackerSync')
- end
-
- cmd [[command! BootstrapPacker lua packer_bootstrap() ]]
- cmd [[echo "Plugins disabled! Run :BootstrapPacker to install and exit"]]
-else
- require('plugins')
-end
+require('nvim-autopairs').setup({})
+require('config.telescope')
-- Don't leave preview windows hanging
-cmd("autocmd CursorMovedI * if pumvisible() == 0|pclose|endif")
-cmd("autocmd InsertLeave * if pumvisible() == 0|pclose|endif")
+vim.cmd("autocmd CursorMovedI * if pumvisible() == 0|pclose|endif")
+vim.cmd("autocmd InsertLeave * if pumvisible() == 0|pclose|endif")
-cmd("autocmd BufReadPost * lua require('custom').jump_to_last_position()")
+vim.cmd("autocmd BufReadPost * lua require('custom').jump_to_last_position()")
Created config/nvim/pack/ext/start/nvim-autopairs
+2a406cdd8c373ae7fe378a9e062a5424472bd8d8
Created config/nvim/pack/ext/start/plenary.nvim
+857c5ac632080dba10aae49dba902ce3abf91b35
Created config/nvim/pack/ext/start/telescope.nvim
+a4ed82509cecc56df1c7138920a1aeaf246c0ac5
Created config/nvim/pack/ext/start/vim-commentary
+64a654ef4a20db1727938338310209b6a63f60c9
Created config/nvim/pack/ext/start/vim-fugitive
+4a745ea72fa93bb15dd077109afbb3d1809383f2
Created config/nvim/pack/ext/start/vim-renamer
+9c6346eb4556cf2d8ca55de6969247ab14fe2383
Created config/nvim/pack/ext/start/vim-repeat
+65846025c15494983dafe5e3b46c8f88ab2e9635
Created config/nvim/pack/ext/start/vim-surround
+3d188ed2113431cf8dac77be61b842acb64433d9
Deleted config/nvim/.gitignore
-plugin/packer_compiled.lua
Created config/nvim/.gitmodules
+[submodule "pack/ext/start/vim-renamer"]
+ path = pack/ext/start/vim-renamer
+ url = https://github.com/qpkorr/vim-renamer
+[submodule "pack/ext/start/vim-surround"]
+ path = pack/ext/start/vim-surround
+ url = https://github.com/tpope/vim-surround
+[submodule "pack/ext/start/vim-commentary"]
+ path = pack/ext/start/vim-commentary
+ url = https://github.com/tpope/vim-commentary
+[submodule "pack/ext/start/vim-repeat"]
+ path = pack/ext/start/vim-repeat
+ url = https://github.com/tpope/vim-repeat
+[submodule "pack/ext/start/vim-fugitive"]
+ path = pack/ext/start/vim-fugitive
+ url = https://github.com/tpope/vim-fugitive
+[submodule "pack/ext/start/nvim-autopairs"]
+ path = pack/ext/start/nvim-autopairs
+ url = https://github.com/windwp/nvim-autopairs
+[submodule "pack/ext/start/plenary.nvim"]
+ path = pack/ext/start/plenary.nvim
+ url = https://github.com/nvim-lua/plenary.nvim
+[submodule "pack/ext/start/telescope.nvim"]
+ path = pack/ext/start/telescope.nvim
+ url = https://github.com/nvim-telescope/telescope.nvim
Deleted config/nvim/lua/plugins.lua
-return require('packer').startup(function()
- use 'wbthomason/packer.nvim'
-
- -- General-purpose editing plugins
- use {
- 'tpope/vim-commentary',
- 'tpope/vim-repeat',
- 'tpope/vim-surround',
- }
-
- use {
- 'tpope/vim-fugitive',
- cmd = 'Git',
- }
-
- use {
- 'windwp/nvim-autopairs',
- event = 'InsertEnter',
- config = function()
- require('nvim-autopairs').setup({})
- end
- }
-
- use { 'qpkorr/vim-renamer', cmd = 'Renamer' }
-
- use {
- 'nvim-telescope/telescope.nvim',
- requires = {{'nvim-lua/plenary.nvim'}},
- config = function()
- require('config.telescope')
- end
- }
-end)