aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Christian Pohle2022-12-23 11:38:26 +0100
committerMax Christian Pohle2022-12-23 11:38:26 +0100
commit0904591145327fa2c6ca4d9bbe2b50ca6b60085a (patch)
tree2b9272dd5426ff8856b085436b8a88138ce23bd2
parent07797b39851da045aa1bfd0289de0858a1377c48 (diff)
downloadvim-0904591145327fa2c6ca4d9bbe2b50ca6b60085a.tar.bz2
vim-0904591145327fa2c6ca4d9bbe2b50ca6b60085a.zip
Refactored a tiny bit and added editorconfig
-rw-r--r--.gitmodules9
-rw-r--r--init.lua6
m---------pack/all/start/vim-editorconfig0
m---------pack/nvim/start/nvim-cmp-buffer0
m---------pack/nvim/start/nvim-cmp-lsp-signature-help0
-rw-r--r--vimrc4
-rw-r--r--vimrc-common35
7 files changed, 36 insertions, 18 deletions
diff --git a/.gitmodules b/.gitmodules
index 00d4440..d09951e 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -46,3 +46,12 @@
46[submodule "pack/submodules/opt/vim-youcompleteme"] 46[submodule "pack/submodules/opt/vim-youcompleteme"]
47 path = pack/vim/opt/vim-youcompleteme 47 path = pack/vim/opt/vim-youcompleteme
48 url = https://github.com/Valloric/YouCompleteMe.git 48 url = https://github.com/Valloric/YouCompleteMe.git
49[submodule "pack/nvim/start/nvim-cmp-buffer"]
50 path = pack/nvim/start/nvim-cmp-buffer
51 url = https://github.com/hrsh7th/cmp-buffer
52[submodule "pack/nvim/start/nvim-cmp-lsp-signature-help"]
53 path = pack/nvim/start/nvim-cmp-lsp-signature-help
54 url = https://github.com/hrsh7th/cmp-nvim-lsp-signature-help
55[submodule "pack/all/start/vim-editorconfig"]
56 path = pack/all/start/vim-editorconfig
57 url = https://github.com/cxw42/editorconfig-vim
diff --git a/init.lua b/init.lua
index 0184d42..c63a9e1 100644
--- a/init.lua
+++ b/init.lua
@@ -1,5 +1,7 @@
1vim.cmd('set termguicolors') 1-- vim.cmd('source ~/.vim/vimrc')
2vim.cmd('source ~/.vim/vimrc') 2
3vim.o.termguicolors = true
4vim.o.exrc = true
3 5
4require'man' 6require'man'
5 7
diff --git a/pack/all/start/vim-editorconfig b/pack/all/start/vim-editorconfig
new file mode 160000
Subproject 30ddc057f71287c3ac2beca876e7ae6d5abe26a
diff --git a/pack/nvim/start/nvim-cmp-buffer b/pack/nvim/start/nvim-cmp-buffer
new file mode 160000
Subproject 3022dbc9166796b644a841a02de8dd1cc1d311f
diff --git a/pack/nvim/start/nvim-cmp-lsp-signature-help b/pack/nvim/start/nvim-cmp-lsp-signature-help
new file mode 160000
Subproject d2768cb1b83de649d57d967085fe73c5e01f8fd
diff --git a/vimrc b/vimrc
index a76471b..ea8ee2b 100644
--- a/vimrc
+++ b/vimrc
@@ -15,7 +15,9 @@ if ($XDG_SESSION_TYPE ==# 'wayland' || ! empty($WAYLAND_DISPLAY))
15endif 15endif
16 16
17 17
18set shadafile="/tmp/shada" 18if has("nvim")
19 set shadafile="/tmp/shada"
20endif
19 21
20" neovide specific 22" neovide specific
21set guifont=monospace:h11:b 23set guifont=monospace:h11:b
diff --git a/vimrc-common b/vimrc-common
index 6f0d7af..6201d4b 100644
--- a/vimrc-common
+++ b/vimrc-common
@@ -4,25 +4,30 @@
4" project-local .vimrc file (activated with exrc setting) 4" project-local .vimrc file (activated with exrc setting)
5"======================================================================================================================= 5"=======================================================================================================================
6 6
7set exrc | " enable exrc, a specific .exrc per project, which can contain usual .vimrc commands
8set modeline | " set variables specific to a file, like indentation by adding a comment
9set textwidth=0 | " better done with modeline or local exrc and not here
10set ts=4 sts=4 sw=4 expandtab | " better done with a modeline or local exrc
11set virtualedit=all | " virtual edit should be default behaviour, because I don't see any reason against
12set number norelativenumber | " do not show numbers by default, because that causes a performance loss, instead activate them on a file type basis
13set ignorecase smartcase | " search with ignore case by default, but use case sensitive search when one capital char is contained and highlight while typing (even though its slower)
14set hlsearch incsearch | " highlight pattern while entering it (performance wise this isn't that good)
15" set cindent cinoptions+=(0 | " indent at parentheses
16
17set path+=** | " allow recursive searches for files
18let &path = &path.",/usr/lib/modules/".substitute(system('uname -r'), "\n", "", "")."/build/include"
19
20filetype on 7filetype on
21filetype plugin on 8filetype plugin on
22filetype indent on 9filetype indent on
23 10
24syntax on | " enable syntax highlighting 11syntax on | " enable syntax highlighting
25syntax sync minlines=60 | " how many preceding lines will be parsed? (has performance impact) 12syntax sync minlines=60 | " how many preceding lines will be parsed? (has performance impact)
13
14set secure | " to ensure, that modelines do not contain executable code
15set noexrc | " exrc was nice, but has too many security problems. Now using editorconfig instead (see plugins)
16set modeline | " set variables specific to a file, like indentation by adding a comment (TODO: should probably be replaced by editorconfig)
17set ts=4 sts=4 sw=4 expandtab textwidth=0 | " better done with a modeline or local exrc
18set virtualedit=all | " virtual edit should be default behaviour, because I don't see any reason against
19set number norelativenumber | " do not show numbers by default, because that causes a performance loss, instead activate them on a file type basis
20set ignorecase smartcase | " search with ignore case by default, but use case sensitive search when one capital char is contained and highlight while typing (even though its slower)
21set hlsearch incsearch | " highlight pattern while entering it (performance wise this isn't that good)
22" set cindent cinoptions+=(0 | " indent at parentheses
23
24
25"=======================================================================================================================
26" PATH -- where to search for includes (e.g. `gf` or `:find`)
27"=======================================================================================================================
28set path+=** | " allow recursive searches for files
29let &path = &path.",/usr/lib/modules/".substitute(system('uname -r'), "\n", "", "")."/build/include" | " TODO: could fail under windows (no uname)
30
26 31
27"======================================================================================================================= 32"=======================================================================================================================
28" SPELL_CHECKING: 33" SPELL_CHECKING:
..