aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2023-03-30 14:17:25 +0300
committerValentin Popov <valentin@popov.link>2023-03-30 14:17:25 +0300
commita2349e19a8b6b923a27abdb6f6a98eddbfb05f11 (patch)
treed3842b42c631779969fdf8404f6b13395245d2fb
parent6f49229c3ff159cbed597a45cedbafe39a1249e9 (diff)
downloadnvim-config-a2349e19a8b6b923a27abdb6f6a98eddbfb05f11.tar.xz
nvim-config-a2349e19a8b6b923a27abdb6f6a98eddbfb05f11.zip
Initial NeoVIM config
Signed-off-by: Valentin Popov <valentin@popov.link>
-rw-r--r--init.vim10
-rw-r--r--lua/plugins/init.lua8
-rw-r--r--plugin/.gitignore2
3 files changed, 20 insertions, 0 deletions
diff --git a/init.vim b/init.vim
new file mode 100644
index 0000000..06e1a81
--- /dev/null
+++ b/init.vim
@@ -0,0 +1,10 @@
+" Connecting the plugin manager
+lua require('plugins')
+
+augroup packer_user_config
+ autocmd!
+ autocmd BufWritePost plugins.lua source <afile> | PackerCompile
+augroup end
+
+" Automatic file trimming when saving
+autocmd BufWritePre * :%s/\s\+$//e
diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua
new file mode 100644
index 0000000..31702eb
--- /dev/null
+++ b/lua/plugins/init.lua
@@ -0,0 +1,8 @@
+-- This file can be loaded by calling `lua require('plugins')` from your init.vim
+
+-- Only required if you have packer configured as `opt`
+vim.cmd [[packadd packer.nvim]]
+
+return require('packer').startup(function(use)
+ use 'wbthomason/packer.nvim'
+end)
diff --git a/plugin/.gitignore b/plugin/.gitignore
new file mode 100644
index 0000000..c96a04f
--- /dev/null
+++ b/plugin/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore \ No newline at end of file