update nvim config

Amolith created

Change summary

dot_config/nvim/init.vim.tmpl | 58 +++++++++++-------------------------
1 file changed, 18 insertions(+), 40 deletions(-)

Detailed changes

dot_config/nvim/init.vim.tmpl 🔗

@@ -1,20 +1,27 @@
 let mapleader =","
 
 if ! filereadable(expand('~/.config/nvim/autoload/plug.vim'))
-    echo "Downloading junegunn/vim-plug to manage plugins..."
-    silent !mkdir -p ~/.config/nvim/autoload/
-    silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ~/.config/nvim/autoload/plug.vim
+	echo "Downloading junegunn/vim-plug to manage plugins..."
+	silent !mkdir -p ~/.config/nvim/autoload/
+	silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ~/.config/nvim/autoload/plug.vim
 endif
 
 call plug#begin()
 Plug 'ap/vim-css-color'                 " highlight css colour codes with that color
 Plug 'tpope/vim-surround'               " highlight open/close characters like [], {}, ()
-Plug 'rhysd/vim-grammarous'				" LanguageTool integration
 Plug 'wakatime/vim-wakatime'            " Aggregate editor stats and metrics
-Plug 'rakr/vim-one'                     " Light theme
-Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
+Plug 'catppuccin/vim', { 'as': 'catppuccin' }
+Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
+Plug 'github/copilot.vim'
 call plug#end()
 
+{{- if eq .theme_variant "dark"}}
+colorscheme catppuccin_macchiato
+{{- end }}
+{{- if eq .theme_variant "light"}}
+colorscheme catppuccin_latte
+{{- end }}
+
 " LaTeX config
 let g:livepreview_previewer = 'zathura'
 let g:livepreview_use_biber = 1
@@ -23,19 +30,6 @@ let g:livepreview_use_biber = 1
 let g:grammarous#languagetool_cmd = 'java -cp ~/languagetool/languagetool-server.jar org.languagetool.server.HTTPServer --port 8081 --allow-origin "*"'
 syntax enable
 
-{{- if eq .theme_variant "dark"}}
-set background=dark
-packadd! dracula_pro
-let g:dracula_colorterm = 0
-colorscheme dracula_pro
-{{- end }}
-{{- if eq .theme_variant "light"}}
-let g:airline_theme='one'
-let g:one_allow_italics = 1
-set background=light
-colorscheme one
-{{- end }}
-
 ""
 " Some basics
 ""
@@ -96,10 +90,6 @@ if !exists('g:airline_symbols')
 	let g:airline_symbols = {}
 endif
 
-" Configure thesaurus
-let g:tq_mthesaur_file="~/.config/nvim/thesaurus/mthesaur.txt"
-let g:tq_enabled_backends=["datamuse_com","mthesaur_txt","openoffice_en"]
-
 ""
 " Keybindings
 ""
@@ -116,14 +106,10 @@ map <C-j> <C-w>j
 map <C-k> <C-w>k
 map <C-l> <C-w>l
 
-" Snippets
-nnoremap ,nnm :read $HOME/.config/nvim/snippets/nnmail<CR>2jA
-nnoremap ,sig :read $HOME/.config/nvim/snippets/signature<CR>
-
 " only enable persistent undo if vim supports
 if has('persistent_undo')
-  set undodir=$HOME/.config/nvim/undofile
-  set undofile
+	set undodir=$HOME/.config/nvim/undofile
+	set undofile
 endif
 
 " Only enable autocommands when Vim supports them
@@ -137,14 +123,6 @@ if has("autocmd")
 	autocmd FileType make setlocal ts=8 sts=8 sw=8 noexpandtab
 	autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
 
-	""
-	" Email configuration
-	""
-	" Spellcheck in British English
-	autocmd FileType eml setlocal spell spelllang=en_gb
-	" Set lines to hard wrap at 72 chars
-	autocmd FileType eml set tw=72
-
 	""
 	" Markdown Configuration
 	""
@@ -157,8 +135,8 @@ if has("autocmd")
 	" Working with LaTeX
 	""
 	" Reduce udpatetime for faster previews
-    autocmd BufNewFile,BufRead *.tex setfiletype tex
-    autocmd FileType tex set ut=250
-    autocmd FileType tex set colorcolumn=72
+	autocmd BufNewFile,BufRead *.tex setfiletype tex
+	autocmd FileType tex set ut=250
+	autocmd FileType tex set colorcolumn=72
 
 endif