mirror of
https://gitlab.com/sagidayan/linux-config.git
synced 2024-11-21 23:05:25 +00:00
Merge branch 'update-and-nvim' into 'main'
Updates 22-06-01 See merge request sagidayan/linux-config!17
This commit is contained in:
commit
855301b835
7 changed files with 75 additions and 49 deletions
|
@ -319,4 +319,4 @@ schemes:
|
|||
white: '#aeb3bb'
|
||||
|
||||
draw_bold_text_with_bright_colors: true
|
||||
colors: *nord
|
||||
colors: *gruvbox
|
||||
|
|
|
@ -13,6 +13,7 @@ alias :Q=exit
|
|||
alias ls='lsd'
|
||||
alias f='printf "\033c"'
|
||||
alias top=btm
|
||||
alias vim=nvim
|
||||
|
||||
alias t=tmux
|
||||
|
||||
|
@ -74,9 +75,6 @@ function huh() {
|
|||
echo Remotes:; \
|
||||
echo -=-=-=-=; \
|
||||
git remote -v | cat; \
|
||||
echo;echo Files:; \
|
||||
echo -=-=-=; \
|
||||
ls -l; \
|
||||
echo;echo;
|
||||
|
||||
}
|
||||
|
@ -118,9 +116,10 @@ function ide() {
|
|||
tmux split-window -h -p 80
|
||||
tmux split-window -h -p 30
|
||||
tmux send-keys "gitui" C-m
|
||||
tmux select-pane -t 1
|
||||
tmux split-window -v -p 20
|
||||
tmux select-pane -t 1
|
||||
tmux split-window -v
|
||||
tmux select-pane -t 0
|
||||
tmux split-window -v
|
||||
tmux select-pane -t 2
|
||||
tmux send-keys "vim" C-m
|
||||
tmux rename-window ${IDE_NAME}
|
||||
}
|
||||
|
|
|
@ -4,30 +4,31 @@
|
|||
|
||||
" plugins list
|
||||
call plug#begin('~/.vim/plugged')
|
||||
Plug 'sheerun/vim-polyglot' " A ton of language syntax
|
||||
Plug 'sheerun/vim-polyglot' " A ton of language syntax
|
||||
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install' } " Markdown Preview
|
||||
Plug 'morhetz/gruvbox' " Gruvbox theme
|
||||
Plug 'chriskempson/base16-vim' " Base 16 Themes - https://github.com/chriskempson/base16-vim
|
||||
Plug 'sickill/vim-monokai' " Monokai Theme
|
||||
Plug 'arcticicestudio/nord-vim' " Nord theme
|
||||
Plug 'itchyny/lightline.vim' " vim status bar
|
||||
Plug 'shinchu/lightline-gruvbox.vim' " Gruvbox theme for status line
|
||||
Plug 'airblade/vim-gitgutter' " Git gutter
|
||||
Plug 'zivyangll/git-blame.vim' " Git blame
|
||||
Plug 'lilydjwg/colorizer' " Displays the colors in file
|
||||
Plug 'jiangmiao/auto-pairs' " Auto create bracket/parens/quote pairs
|
||||
Plug 'vim-syntastic/syntastic' " coding-errors checker
|
||||
Plug 'puremourning/vimspector' " Multi lang Debugger
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'} " Lanuage server integrations
|
||||
Plug 'tpope/vim-fugitive' " git wrapper
|
||||
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } " golang plugin for vim
|
||||
Plug 'Yggdroot/indentLine' " Indentation LInes
|
||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } " Install fzf
|
||||
Plug 'junegunn/fzf.vim' " Fuzzy search
|
||||
Plug 'francoiscabrol/ranger.vim' " Ranger <leader>f
|
||||
Plug 'scrooloose/nerdtree' " NerdTree - File tree (ctr-n)
|
||||
Plug 'Xuyuanp/nerdtree-git-plugin' " Git support in NERDTree
|
||||
Plug 'ryanoasis/vim-devicons' " File Icons - Always load last
|
||||
Plug 'pearofducks/ansible-vim' " Ansible support
|
||||
Plug 'morhetz/gruvbox' " Gruvbox theme
|
||||
Plug 'chriskempson/base16-vim' " Base 16 Themes - https://github.com/chriskempson/base16-vim
|
||||
Plug 'sickill/vim-monokai' " Monokai Theme
|
||||
Plug 'arcticicestudio/nord-vim' " Nord theme
|
||||
Plug 'itchyny/lightline.vim' " vim status bar
|
||||
Plug 'danilamihailov/beacon.nvim' " see cursor jumps easier
|
||||
Plug 'shinchu/lightline-gruvbox.vim' " Gruvbox theme for status line
|
||||
Plug 'lewis6991/gitsigns.nvim' " Git gutter and sings
|
||||
Plug 'zivyangll/git-blame.vim' " Git blame
|
||||
Plug 'lilydjwg/colorizer' " Displays the colors in file
|
||||
Plug 'jiangmiao/auto-pairs' " Auto create bracket/parens/quote pairs
|
||||
Plug 'vim-syntastic/syntastic' " coding-errors checker
|
||||
Plug 'puremourning/vimspector' " Multi lang Debugger
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'} " Lanuage server integrations
|
||||
Plug 'tpope/vim-fugitive' " git wrapper
|
||||
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } " golang plugin for vim
|
||||
Plug 'Yggdroot/indentLine' " Indentation LInes
|
||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } " Install fzf
|
||||
Plug 'junegunn/fzf.vim' " Fuzzy search
|
||||
Plug 'francoiscabrol/ranger.vim' " Ranger <leader>f
|
||||
Plug 'kyazdani42/nvim-web-devicons' " for file icons
|
||||
Plug 'kyazdani42/nvim-tree.lua' " File tree/browser
|
||||
call plug#end()
|
||||
|
||||
" Eliminate delay for esc insert->normal
|
||||
|
@ -52,9 +53,14 @@ autocmd VimEnter *
|
|||
\ > len(filter(values(g:plugs), 'stridx(v:val.dir, g:plug_home) == 0'))
|
||||
\| PlugClean | q
|
||||
\| endif
|
||||
|
||||
" Initiate lua
|
||||
lua require('gitsigns').setup()
|
||||
" Init NvimTree
|
||||
lua require'nvim-tree'.setup {}
|
||||
" Toggle NerdTree with Ctrl+n
|
||||
map <C-n> :NERDTreeToggle<CR>
|
||||
nnoremap <C-n> :NvimTreeToggle<CR>
|
||||
nnoremap <leader>r :NvimTreeRefresh<CR>
|
||||
nnoremap <leader>n :NvimTreeFindFile<CR>
|
||||
" Open fzf Files search Ctrl+p
|
||||
map <C-p> :Files<CR>
|
||||
" Open file search Ctrl+f
|
||||
|
@ -79,8 +85,17 @@ imap <M-k> <Up>
|
|||
|
||||
" Set line heighlight on by default
|
||||
set cursorline
|
||||
" Set Clipboard to system
|
||||
set clipboard=unnamedplus
|
||||
" Copy to clipboard
|
||||
vnoremap <leader>y "+y
|
||||
nnoremap <leader>Y "+yg_
|
||||
nnoremap <leader>y "+y
|
||||
nnoremap <leader>yy "+yy
|
||||
|
||||
" Paste from clipboard
|
||||
nnoremap <leader>p "+p
|
||||
nnoremap <leader>P "+P
|
||||
vnoremap <leader>p "+p
|
||||
vnoremap <leader>P "+P
|
||||
" Enable mouse use in all modes
|
||||
set mouse=a
|
||||
" Auto highlight similar words when staying on a word after .5 sec
|
||||
|
@ -88,12 +103,16 @@ set updatetime=500
|
|||
augroup highlight_current_word
|
||||
au!
|
||||
au CursorHold *
|
||||
\ if ( expand("%") != 'NERD_tree_1' )
|
||||
\ if ( expand("%") != 'NvimTree_1' )
|
||||
\ | :silent! :exec 'match Search /\V\<' . expand('<cword>') . '\>/'
|
||||
\ | endif
|
||||
augroup END
|
||||
|
||||
|
||||
"==============================================================================
|
||||
" Beacon settings
|
||||
"==============================================================================
|
||||
let g:beacon_minimal_jump = 1
|
||||
"==============================================================================
|
||||
" Sync NERDTree with file
|
||||
"==============================================================================
|
||||
|
@ -127,9 +146,9 @@ let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
|
|||
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
|
||||
set termguicolors
|
||||
" Theme
|
||||
colorscheme nord
|
||||
colorscheme gruvbox
|
||||
" Setting dark mode
|
||||
set background=dark
|
||||
" set background=dark
|
||||
|
||||
"==============================================================================
|
||||
" line number
|
||||
|
@ -146,7 +165,7 @@ set background=dark
|
|||
:augroup END
|
||||
|
||||
" Set current line number more visible
|
||||
hi clear CursorLine
|
||||
" hi clear CursorLine
|
||||
augroup CLClear
|
||||
autocmd! ColorScheme * hi clear CursorLine
|
||||
augroup END
|
||||
|
@ -314,7 +333,7 @@ let g:lightline = {
|
|||
\ },
|
||||
\ }
|
||||
" lightline colorscheme
|
||||
" let g:lightline.colorscheme = 'nord'
|
||||
" let g:lightline.colorscheme = 'gruvbox'
|
||||
" function to get the filename from vim to lightline.vim
|
||||
function! LightlineFilename()
|
||||
return &filetype ==# 'vimfiler' ? vimfiler#get_status_string() :
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
- hosts: localhost
|
||||
connection: local
|
||||
name: CLI tools Playbook
|
||||
vars:
|
||||
# Theme options: monokai, gruvbox, nord, tomorrow-night
|
||||
theme: tomorrow-night
|
||||
theme: gruxbox
|
||||
# The running user
|
||||
running_user: "{{ ansible_user_id }}"
|
||||
roles:
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
- hosts: localhost
|
||||
connection: local
|
||||
name: Self managed modern UNIX tools
|
||||
vars:
|
||||
# Theme options: monokai, gruvbox, nord, tomorrow-night
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name: Workstation Playbook
|
||||
vars:
|
||||
# Theme options: monokai, gruvbox, nord, tomorrow-night
|
||||
theme: tomorrow-night
|
||||
theme: gruvbox
|
||||
# The running user
|
||||
running_user: "{{ ansible_user_id }}"
|
||||
roles:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
become: true
|
||||
package:
|
||||
name:
|
||||
- vim
|
||||
- neovim
|
||||
- the_silver_searcher
|
||||
state: present
|
||||
when: ansible_facts['os_family'] == "RedHat"
|
||||
|
@ -11,34 +11,40 @@
|
|||
become: true
|
||||
package:
|
||||
name:
|
||||
- vim
|
||||
- neovim
|
||||
- silversearcher-ag
|
||||
state: present
|
||||
when: ansible_facts['os_family'] == "Debian"
|
||||
|
||||
- name: Prepare vim...
|
||||
- name: Prepare vim config directory
|
||||
file:
|
||||
path: ~/.vim/autoload
|
||||
path: ~/.config/nvim/
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: Setup vim plug
|
||||
file:
|
||||
path: ~/.local/share/nvim/site/autoload
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: Install vim Plug
|
||||
get_url:
|
||||
url: https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
dest: ~/.vim/autoload/plug.vim
|
||||
dest: ~/.local/share/nvim/site/autoload/plug.vim
|
||||
|
||||
- name: "Copy vimrc file"
|
||||
copy:
|
||||
src: dotfiles/vimrc
|
||||
dest: "~/.vimrc"
|
||||
dest: "~/.config/nvim/init.vim"
|
||||
mode: preserve
|
||||
changed_when: false
|
||||
|
||||
- name: "Set vim colorscheme"
|
||||
ansible.builtin.lineinfile:
|
||||
path: "~/.vimrc"
|
||||
path: "~/.config/nvim/init.vim"
|
||||
regexp: "^colorscheme"
|
||||
line: "colorscheme base16-{{ theme }}"
|
||||
line: "colorscheme {{ theme }}"
|
||||
changed_when: false
|
||||
|
||||
#- name: "Set vim lightline colorscheme"
|
||||
|
|
Loading…
Reference in a new issue