diff options
author | Christian Chiarulli <[email protected]> | 2019-02-13 21:22:58 -0500 |
---|---|---|
committer | Christian Chiarulli <[email protected]> | 2019-02-13 21:22:58 -0500 |
commit | 74c68a986fb9dcc6d43290de65d3361d8e63a8a1 (patch) | |
tree | 070835e503a787b774556632c2b58c7e1b1f2b40 | |
parent | 670ed1e694b4084f5e61c634c1f445a6168807f5 (diff) |
fixed some linting stuff
-rw-r--r-- | .ctagsignore | 1 | ||||
-rw-r--r-- | init.vim | 4 | ||||
-rw-r--r-- | modules/ale.vim | 2 | ||||
-rw-r--r-- | modules/deoplete.vim | 2 | ||||
-rw-r--r-- | modules/general.vim | 108 | ||||
-rw-r--r-- | modules/language_server.vim | 4 | ||||
-rw-r--r-- | modules/plugins.vim | 1 |
7 files changed, 66 insertions, 56 deletions
diff --git a/.ctagsignore b/.ctagsignore deleted file mode 100644 index 3807c9ed..00000000 --- a/.ctagsignore +++ /dev/null @@ -1 +0,0 @@ -dein @@ -13,4 +13,6 @@ source $HOME/.config/nvim/modules/language_server.vim source $HOME/.config/nvim/modules/ale.vim "install ripgrep" "install universal ctags" -"install black" +"pip install 'python-language-server[all]' +" pip install vim-vint +" TODO add this to script npm i -g bash-language-server diff --git a/modules/ale.vim b/modules/ale.vim index b386ce08..1dd151e5 100644 --- a/modules/ale.vim +++ b/modules/ale.vim @@ -9,5 +9,5 @@ let g:ale_linters = { let g:ale_fixers = { \ '*': ['remove_trailing_lines', 'trim_whitespace'], -\ 'python': ['black'], +\ 'python': ['yapf'], \} diff --git a/modules/deoplete.vim b/modules/deoplete.vim index bdf8c6f1..0db16ded 100644 --- a/modules/deoplete.vim +++ b/modules/deoplete.vim @@ -2,6 +2,8 @@ let g:deoplete#enable_at_startup = 1 let g:deoplete#complete_method = "omnifunc" let g:deoplete#auto_complete_delay = 0 +" let g:deoplete#ignore_sources = ['buffer'] + " <TAB>: completion. ""inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>" "use TAB as the mapping diff --git a/modules/general.vim b/modules/general.vim index 2fbf307c..0752298d 100644 --- a/modules/general.vim +++ b/modules/general.vim @@ -2,48 +2,38 @@ if &compatible set nocompatible endif -" Gives vim abilty to recognize filetypes -filetype plugin indent on -" Enables syntax highlighing -syntax enable -" display long lines as just one line -set nowrap -" The encoding displayed -set encoding=utf-8 -" The encoding written to file -set fileencoding=utf-8 -" Enable your mouse -set mouse=a -" Horizontal splits will automatically be below -set splitbelow -" Vertical splits will automatically be to the right -set splitright -" Support 256 colors -set t_Co=256 -" Your working directory will always be the same as your working directory -set autochdir -" Insert 4 spaces for a tab -set tabstop=4 -" Change the number of space characters inserted for indentation -set shiftwidth=4 -" Makes tabbing smarter will realize you have 2 vs 4 -set smarttab -" Converts tabs to spaces -set expandtab -" Makes indenting smart -""set smartindent -" Good auto indent -""set autoindent -" Always display the status line -set laststatus=2 -" Line numbers -set number -" Enable highlighting of the current line -set cursorline -" Get rid of annoying red highlights" -let g:python_highlight_all = 0 -" Disable arrows" -let g:elite_mode=1 + +" set leader key +let g:mapleader="\\" +" alias for leader key +nmap <space> \ +xmap <space> \ + +syntax enable " Enables syntax highlighing +set nowrap " display long lines as just one line +set encoding=utf-8 " The encoding displayed +set fileencoding=utf-8 " The encoding written to file +set ruler " show the cursor position all the time +set iskeyword+=- " treat dash separated words as a word text object" +set mouse=a " Enable your mouse +set splitbelow " Horizontal splits will automatically be below +set splitright " Vertical splits will automatically be to the right +set t_Co=256 " Support 256 colors +set autochdir " Your working directory will always be the same as your working directory +set tabstop=4 " Insert 4 spaces for a tab +set shiftwidth=4 " Change the number of space characters inserted for indentation +set smarttab " Makes tabbing smarter will realize you have 2 vs 4 +set expandtab " Converts tabs to spaces +set smartindent " Makes indenting smart +set autoindent " Good auto indent +set laststatus=2 " Always display the status line +set number " Line numbers +set cursorline " Enable highlighting of the current line +set background=dark " tell vim what the background color looks like + +let g:python_highlight_all = 0 " Get rid of annoying red highlights" +let g:elite_mode=1 " Disable arrows" + " Disable arrow movement, resize splits instead. if get(g:, 'elite_mode') nnoremap <Up> :resize -2<CR> @@ -51,6 +41,9 @@ if get(g:, 'elite_mode') nnoremap <Left> :vertical resize -2<CR> nnoremap <Right> :vertical resize +2<CR> endif + +" Gives vim abilty to recognize filetypes +filetype plugin indent on " Alternate way to save nnoremap <C-s> :w<CR> " Alternate way to quit @@ -65,7 +58,7 @@ nnoremap <silent> <F1> :10split term://bash<CR> autocmd BufWinEnter,WinEnter term://* startinsert autocmd BufLeave term://* stopinsert " Toggle tagbar -nnoremap <silent> <F2> :tagbar<CR> +nnoremap <silent> <F2> :TagbarToggle<CR> " Toggle Line numbers nnoremap <silent> <F4> :set nonumber!<CR> " Toggle NERDTree @@ -77,16 +70,35 @@ nnoremap <silent> <F7> :nohlsearch<CR><F7> " Toggle open buffers nnoremap <silent> <F8> :BuffergatorToggle<CR> " For fuzzy finder -nnoremap <silent> <F9> :Files<CR> +""nnoremap <silent> <F9> :Files<CR> " F10 split vertical -nnoremap <silent> <F10> :vsplit<CR> +nnoremap <silent> <F9> :vsplit<CR> " F11 split horizontal -nnoremap <silent> <F11> :split<CR> +nnoremap <silent> <F10> :split<CR> " Make current buffer only buffer nnoremap <silent> <F12> :only<CR> " Remap window switch " Switch to rename for LSP to do add leader ""nnoremap <F4> :SearchTasks *<CR> + +nnoremap <silent> <leader>n :NERDTreeToggle<return> +nnoremap <silent> <leader>m :TagbarToggle<return> +nnoremap <silent> <leader>l :set nonumber!<return> +nnoremap <silent> <leader>s :Startify<return> +nnoremap <silent> <leader>w :w<return> +nnoremap <silent> <leader>b :<return> +nnoremap <silent> <leader>p :pclose<return> + +" Split edit your vimrc. Type space, v, r in sequence to trigger + fun! OpenConfigFile(file) + if (&filetype ==? 'startify') + execute 'e ' . a:file + else + execute 'tabe ' . a:file + endif + endfun +nnoremap <silent> <leader>in :call OpenConfigFile('~/.config/nvim/init.vim')<cr> + nnoremap <C-h> <C-w>h nnoremap <C-j> <C-w>j nnoremap <C-k> <C-w>k @@ -98,9 +110,7 @@ tnoremap <C-h> <C-\><C-n><C-w>h tnoremap <C-j> <C-\><C-n><C-w>j tnoremap <C-k> <C-\><C-n><C-w>k tnoremap <C-l> <C-\><C-n><C-w>l -" TAB in general mode will mov to text buffer +" TAB in general mode will move to text buffer nnoremap <TAB> :bnext<CR> " SHIFT-TAB will go back nnoremap <S-TAB> :bprevious<CR> -" Map leader switch to whatever you want -let mapleader = "," diff --git a/modules/language_server.vim b/modules/language_server.vim index 8b9fb34c..e9ac06c3 100644 --- a/modules/language_server.vim +++ b/modules/language_server.vim @@ -10,10 +10,6 @@ let g:LanguageClient_serverCommands = { \ 'python': ['pyls'], \ 'sh': ['bash-language-server', 'start'], \ } -" pyls doesn't need a path because it is defined in the neovim virtual -" environment" -" TODO add this to script npm i -g bash-language-server - nnoremap <silent> K :call LanguageClient#textDocument_hover()<CR> nnoremap <silent> gd :call LanguageClient#textDocument_definition()<CR> diff --git a/modules/plugins.vim b/modules/plugins.vim index 66e9c015..714c6f27 100644 --- a/modules/plugins.vim +++ b/modules/plugins.vim @@ -55,6 +55,7 @@ if dein#load_state('~/.config/nvim/dein') call dein#add('~/.config/nvim/dein/repos/github.com/Shougo/dein.vim') call dein#add('Shougo/deoplete.nvim', {'do': 'UpdateRemotePlugins'}) + call dein#add('Shougo/neoinclude.vim') if !has('nvim') call dein#add('roxma/nvim-yarp') call dein#add('roxma/vim-hug-neovim-rpc') |