.vimrc updates
This commit is contained in:
19
.vimrc
19
.vimrc
@@ -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
|
syntax on
|
||||||
|
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
|
|
||||||
"
|
"
|
||||||
@@ -14,6 +23,14 @@ set number
|
|||||||
" Set UTF-8 for YCM
|
" Set UTF-8 for YCM
|
||||||
set encoding=utf-8
|
set encoding=utf-8
|
||||||
|
|
||||||
|
" YCM LSP
|
||||||
|
let g:ycm_language_server = [
|
||||||
|
\ { 'name': 'zls',
|
||||||
|
\ 'filetypes': [ 'zig' ],
|
||||||
|
\ 'cmdline': [ '~/.local/bin/zls' ],
|
||||||
|
\ },
|
||||||
|
\ ]
|
||||||
|
|
||||||
" Adding Number Toggle
|
" Adding Number Toggle
|
||||||
noremap <F3> :set invnumber<CR>
|
noremap <F3> :set invnumber<CR>
|
||||||
inoremap <F3> <C-O>:set invnumber<CR>
|
inoremap <F3> <C-O>:set invnumber<CR>
|
||||||
|
|||||||
@@ -1,2 +1,4 @@
|
|||||||
# env-files
|
# env-files
|
||||||
|
|
||||||
|
[lsp-examples](https://github.com/ycm-core/lsp-examples/tree/master)
|
||||||
|
|
||||||
|
|||||||
40
setup-vim.sh
Normal file
40
setup-vim.sh
Normal 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
|
||||||
Reference in New Issue
Block a user