From 059c27813ef52a3486000ab908f9af47f3d098f1 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Fri, 5 Feb 2021 01:38:23 -0700 Subject: Add new features to vim, fix problems with new workspaces --- .config/bspwm/bspwmrc | 5 +++-- .config/nvim/init.vim | 38 ++++++++++++++++++++++++++++++++++---- .config/shell/profile | 8 ++++++-- .config/zsh/.zshrc | 3 +++ 4 files changed, 46 insertions(+), 8 deletions(-) diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc index a0c281a..5ae597a 100755 --- a/.config/bspwm/bspwmrc +++ b/.config/bspwm/bspwmrc @@ -95,8 +95,9 @@ bspc config presel_feedback_color $COLOR_BLUE # Rules. bspc rule -a *:*:"Picture-in-Picture" state=floating rectangle=640x360+640+360 -bspc rule -a Peek:*:* state=floating -bspc rule -a Zathura:*:* state=tiled +bspc rule -a "Peek":*:* state=floating +bspc rule -a "Zathura":*:* state=tiled +bspc rule -a "Godot":*:* state=floating # bspc rule -a Gimp desktop='^8' state=floating follow=on # bspc rule -a Chromium desktop='^2' # bspc rule -a mplayer2 state=floating diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 5b3c98f..3b2e552 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -45,6 +45,17 @@ set showcmd "Auto completion Plug 'Valloric/YouCompleteMe' let g:ycm_autoclose_preview_window_after_completion=1 + if !has_key( g:, 'ycm_language_server' ) + let g:ycm_language_server = [] + endif + let g:ycm_language_server += [ + \ { + \ 'name': 'godot', + \ 'filetypes': [ 'gdscript' ], + \ 'project_root_files': [ 'project.godot' ], + \ 'port': 6008 + \ } + \ ] " TeX Plug 'lervag/vimtex' @@ -86,6 +97,15 @@ set showcmd "" let g:syntastic_tex_lacheck_quiet_messages = {'regex': '\Vpossible unwanted space at'} " let g:syntastic_tex_chktex_quiet_messages = {'level': 'warnings'} + " JavaScript + Plug 'yuezk/vim-js' + Plug 'maxmellon/vim-jsx-pretty' + + Plug 'alvan/vim-closetag' + let g:closetag_filenames = '*.html,*.xhtml,*.phtml,*.xml,*.wsdl,*.wsd' + + Plug 'habamax/vim-godot' + call plug#end() "" Commands for plug. " PlugInstall [name ...] [#threads] Install plugins @@ -132,24 +152,34 @@ set showcmd \ set expandtab | \ set textwidth=79 | \ set fileformat=unix - au BufAdd,BufEnter,BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/ - " Some filetypes that require 4 spaces for tabs. - au BufAdd,BufEnter,BufNewFile,BufRead *.java + au BufEnter,BufNewFile,BufRead *.java \ set tabstop=4 | \ set softtabstop=0 | \ set shiftwidth=4 | \ set noexpandtab | \ set fileformat=unix + " Similar to python, but for js. + " au BufEnter,BufNewFile,BufRead *.js + " \ set tabstop=4 | + " \ set softtabstop=4 | + " \ set shiftwidth=4 | + " \ set expandtab=4 | + " \ set fileformat=unix + " Some filetypes that require 2 spaces for tabs. - au BufAdd,BufEnter,BufNewFile,BufRead *.xml,*.html,*.jsp + au BufEnter,BufNewFile,BufRead *.xml,*.html,*.jsp,*.wsdl,*.xsd \ set tabstop=2 | \ set softtabstop=2 | \ set shiftwidth=2 | \ set expandtab | \ set fileformat=unix + " Show bad whitespaces on some files. + au BufAdd,BufEnter,BufRead,BufNewFile *.py,*.pyw,*.c,*.h,*.js,*.java,*.xml,*.html,*.jsp match BadWhitespace /\s\+$/ + + " Listchars set showbreak=↪\ set listchars=eol:↲,nbsp:␣,tab:»\ ,trail:•,precedes:⟨,extends:⟩ diff --git a/.config/shell/profile b/.config/shell/profile index 67b5ad2..e3651ef 100644 --- a/.config/shell/profile +++ b/.config/shell/profile @@ -5,8 +5,8 @@ export PATH="$PATH:$(du -L "$HOME/.local/bin/" | cut -f2 | tr '\n' ':' | sed 's/:*$//')" ## Useful vars. -export MAINMON="DP-0" -export SECMON="HDMI-0" +export MAINMON="DP-2" +export SECMON="HDMI-1" ## Default programs. export EDITOR="nvim" export TERMINAL="alacritty" @@ -120,6 +120,10 @@ export TEXMFDIST=/usr/share/texmf-dist ## qBittorrent. export QT_AUTO_SCREEN_SCALE_FACTOR=0 + ## Java. + # This is for blank window on window managers. +export _JAVA_AWT_WM_NONREPARENTING=1 + ##--Start X automatically--## # Following: https://wiki.archlinux.org/index.php/Xinit#Autostart_X_at_login diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index c6b6996..4f0f050 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -10,6 +10,9 @@ PS1="%{$fg_bold[red]%}[%{$fg_bold[yellow]%}%n%{$fg_bold[green]%}@%{$fg_bold[blue # Load aliases if existent. [[ -f $HOME/.config/shell/aliasrc ]] && . ~/.config/shell/aliasrc +# Source nvm if existent. +# [[ -f /usr/share/nvm/init-nvm.sh ]] && . /usr/share/nvm/init-nvm.sh + # History cache. HISTFILE=$HOME/.cache/zsh/history HISTSIZE=10000 -- cgit v1.2.3-54-g00ecf