From 0cc39e80a48eec9423c1e80908aaeffbecab2c4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Horion?= Date: Sat, 31 May 2025 19:57:40 +0200 Subject: [PATCH 1/3] Improve Neovim compatibility --- .gitignore | 4 ++++ vimrc | 40 +++++++++++++++++++++++++++------------- 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 2c24157..5b9fd12 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,7 @@ vim/* .vim/tmp/ .vim/tags ctags* + +nvim-linux-x86_64 + +nvim-linux-x86_64.tar.gz diff --git a/vimrc b/vimrc index 92b53e9..a4329ff 100644 --- a/vimrc +++ b/vimrc @@ -3,6 +3,15 @@ " set nocompatible "We run vim not VI let g:polyglot_disabled = ['javascript'] +" Ensure vim-plug is available even without network access +let s:dotfiles_dir = fnamemodify(expand(''), ':p:h') +let s:plug_vim = stdpath('data') . '/site/autoload/plug.vim' +if !filereadable(s:plug_vim) + let s:plug_vim = s:dotfiles_dir . '/vim/autoload/plug.vim' +endif +if filereadable(s:plug_vim) + execute 'source ' . fnameescape(s:plug_vim) +endif if has('nvim') let s:remote_plugins_updated = 0 function! PlugRemotePlugins(info) abort @@ -29,7 +38,8 @@ function! PlugCoc(info) abort call PlugRemotePlugins(a:info) endfunction -call plug#begin('~/.vim/plugged') +" Use Neovim's standard data directory for plugins +call plug#begin(stdpath('data') . '/plugged') " Plugins "------------------------------------------- @@ -225,7 +235,9 @@ set textwidth=100 set title " change the erminal's title set ts=2 sw=2 et set ttyfast " fast scrolling -set ttymouse=xterm2 +if exists('&ttymouse') + set ttymouse=xterm2 +endif set undolevels=1000 " use many muchos levels of undo set visualbell " don't beep set t_vb= "disable visual belt @@ -447,11 +459,13 @@ let g:lightline.tab = { \ 'active': [ 'tabnum', 'filename', 'modified' ], \ 'inactive': [ 'tabnum', 'filename', 'modified' ] } -let g:lightline#colorscheme#Greg#palette= lightline#colorscheme#fill(g:lightline#colorscheme#one#palette) -"let g:lightline#colorscheme#Greg#palette= lightline#colorscheme#fill(g:lightline#colorscheme#onedark#palette) -let g:lightline#colorscheme#Greg#palette.inactive.right[0] = ['#fafafa', '#98c379', 255, 35, 'bold'] -"let g:lightline#colorscheme#Greg#palette.inactive.left[0] = ['#fafafa', '#98c379', 255, 35, 'bold'] -let g:lightline#colorscheme#Greg#palette.inactive.left[0] = g:lightline#colorscheme#Greg#palette.normal.left[1] +if exists('*lightline#colorscheme#fill') + let g:lightline#colorscheme#Greg#palette = lightline#colorscheme#fill(g:lightline#colorscheme#one#palette) + "let g:lightline#colorscheme#Greg#palette= lightline#colorscheme#fill(g:lightline#colorscheme#onedark#palette) + let g:lightline#colorscheme#Greg#palette.inactive.right[0] = ['#fafafa', '#98c379', 255, 35, 'bold'] + "let g:lightline#colorscheme#Greg#palette.inactive.left[0] = ['#fafafa', '#98c379', 255, 35, 'bold'] + let g:lightline#colorscheme#Greg#palette.inactive.left[0] = g:lightline#colorscheme#Greg#palette.normal.left[1] +endif "vim-javascript let javascript_enable_domhtmlcss=1 @@ -703,7 +717,7 @@ endfunction function! LightBackground() set notermguicolors set t_Co=256 - set term=xterm-256color + " 'term' option is read-only in Neovim let g:solarized_visibility = "high" let g:solarized_contrast = "high" let g:solarized_termtrans = 0 @@ -713,7 +727,7 @@ function! LightBackground() set t_8f=^[[38;2;%lu;%lu;%lum "hi clear "syntax reset - colorscheme one + silent! colorscheme one set background=light let g:lightline.colorscheme = 'Greg' hi Comment cterm=italic @@ -729,14 +743,14 @@ endfunction function! DarkBackground() set notermguicolors set t_Co=256 - set term=xterm-256color + " 'term' option is read-only in Neovim "let g:solarized_visibility = "high" "let g:solarized_contrast = "high" "let g:solarized_termtrans = 0 let g:onedark_termcolors=256 set background=dark "colorscheme onedark - colorscheme gruvbox + silent! colorscheme gruvbox hi Comment cterm=italic let g:indent_guides_guide_size=2 "https://github.com/pangloss/vim-javascript/blob/master/syntax/javascript.vim @@ -752,7 +766,7 @@ endfunction function! TransparentBackground() set notermguicolors set t_Co=256 - set term=xterm-256color + " 'term' option is read-only in Neovim let g:solarized_visibility = "high" let g:solarized_contrast = "high" let g:solarized_termtrans = 0 @@ -760,7 +774,7 @@ function! TransparentBackground() "hi clear "syntax reset set background=dark - colorscheme onedark + silent! colorscheme onedark hi Comment cterm=italic hi! link javascriptAsyncFuncKeyword Keyword hi! link javascriptNodeGlobal Structure From 4ee33826a7417382ee0a036027321858d20cd8ba Mon Sep 17 00:00:00 2001 From: gregory Date: Sat, 31 May 2025 20:42:21 +0200 Subject: [PATCH 2/3] add nvim chad --- vimrc => _vimrc | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename vimrc => _vimrc (100%) diff --git a/vimrc b/_vimrc similarity index 100% rename from vimrc rename to _vimrc From ed4579141b8eaf486068ef108cff53572a1683bd Mon Sep 17 00:00:00 2001 From: gregory Date: Sat, 31 May 2025 20:42:33 +0200 Subject: [PATCH 3/3] add nvim chad --- nvim | 1 + 1 file changed, 1 insertion(+) create mode 160000 nvim diff --git a/nvim b/nvim new file mode 160000 index 0000000..925399d --- /dev/null +++ b/nvim @@ -0,0 +1 @@ +Subproject commit 925399d90ca46163bf49ce97e153adb4f7a6c8b5