.vimrc updates

This commit is contained in:
2026-02-11 11:43:04 -05:00
parent bd9fb0d1f3
commit 890eb22830
3 changed files with 60 additions and 1 deletions

19
.vimrc
View File

@@ -1,5 +1,14 @@
execute pathogen#infect()
call plug#begin()
" Plugin List
Plug 'https://codeberg.org/ziglang/zig.vim'
Plug 'morhetz/gruvbox'
Plug 'preservim/nerdtree'
Plug 'preservim/vim-lexical'
Plug 'dense-analysis/ale'
Plug 'editorconfig/editorconfig-vim'
call plug#end()
syntax on
filetype plugin indent on
"
@@ -14,6 +23,14 @@ set number
" Set UTF-8 for YCM
set encoding=utf-8
" YCM LSP
let g:ycm_language_server = [
\ { 'name': 'zls',
\ 'filetypes': [ 'zig' ],
\ 'cmdline': [ '~/.local/bin/zls' ],
\ },
\ ]
" Adding Number Toggle
noremap <F3> :set invnumber<CR>
inoremap <F3> <C-O>:set invnumber<CR>

View File

@@ -1,2 +1,4 @@
# env-files
[lsp-examples](https://github.com/ycm-core/lsp-examples/tree/master)

40
setup-vim.sh Normal file
View File

@@ -0,0 +1,40 @@
#!/bin/bash
# This file is still a work in progress
# it mostly works if you tinker with uncommenting
# the function calls
ZLS_VERSION=0.15.1
function zls-install {
mkdir -p ~/.local/bin
if [[ ! -d /tmp/zls ]]; then git clone https://github.com/zigtools/zls /tmp/zls; fi
cd /tmp/zls
git checkout ${ZLS_VERSION}
zig build -Doptimize=ReleaseSafe
cp zig-out/bin/zls ~/.local/bin/zls
cd -
}
function ycm-install {
echo "Installing ycm deps"
sudo dnf install -y cmake python3-devel gcc gcc-c++ nodejs-npm
}
function setup {
mkdir -p ~/.vim/
mkdir -p ~/.vim/autoload ~/.vim/bundle
curl -LSso ~/.vim/autoload/plug.vim https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# Setup plugins
# YouCompleteMe
if [[ ! -d ~/.vim/bundle/YouCompleteMe ]]; then
git clone https://github.com/ycm-core/YouCompleteMe.git ~/.vim/bundle/YouCompleteMe
cd ~/.vim/bundle/YouCompleteMe
git submodule update --init --recursive || cd -
# dnf install cmake node-npm python3-devel gcc gcc-c++
cd -
fi
}
#setup
#ycm-install
#zls-install