diff --git a/home/.config/nvim/ftdetect/filetypes.vim b/home/.config/nvim/ftdetect/filetypes.vim index f2cdc31..006e2fe 100644 --- a/home/.config/nvim/ftdetect/filetypes.vim +++ b/home/.config/nvim/ftdetect/filetypes.vim @@ -8,30 +8,23 @@ autocmd Filetype arduino setlocal ts=2 sw=2 sts=2 expandtab autocmd Filetype c setlocal ts=4 sw=4 sts=4 expandtab autocmd Filetype cpp setlocal ts=4 sw=4 sts=4 expandtab autocmd Filetype css setlocal ts=2 sw=2 sts=2 expandtab -autocmd Filetype dart setlocal ts=2 sw=2 sts=2 expandtab autocmd Filetype dockerfile setlocal ts=4 sw=4 sts=4 expandtab autocmd Filetype dot setlocal ts=2 sw=2 sts=2 expandtab -autocmd Filetype elm setlocal ts=2 sw=2 sts=2 expandtab autocmd Filetype gitcommit setlocal colorcolumn=72 autocmd Filetype go setlocal ts=4 sw=4 sts=4 autocmd Filetype haskell setlocal ts=4 sw=4 sts=4 expandtab autocmd Filetype html setlocal ts=2 sw=2 sts=2 expandtab -autocmd Filetype html.twig setlocal ts=2 sw=2 sts=2 expandtab autocmd Filetype javascript setlocal ts=2 sw=2 sts=2 expandtab autocmd Filetype jinja setlocal ts=2 sw=2 sts=2 expandtab autocmd Filetype json setlocal ts=2 sw=2 sts=2 expandtab -autocmd Filetype less setlocal ts=2 sw=2 sts=2 expandtab autocmd Filetype lua setlocal ts=4 sw=4 sts=4 expandtab autocmd Filetype markdown setlocal ts=2 sw=2 sts=2 expandtab autocmd Filetype openscad setlocal ts=2 sw=2 sts=2 expandtab -autocmd Filetype php setlocal ts=2 sw=2 sts=2 expandtab autocmd Filetype python setlocal ts=4 sw=4 sts=4 expandtab autocmd Filetype sass setlocal ts=2 sw=2 sts=2 expandtab autocmd Filetype scss setlocal ts=2 sw=2 sts=2 expandtab autocmd Filetype sh setlocal ts=4 sw=4 sts=4 -autocmd Filetype svg setlocal ts=2 sw=2 sts=2 expandtab -autocmd Filetype tex setlocal ts=1 sw=1 sts=1 expandtab conceallevel=1 -autocmd Filetype tf setlocal ts=2 sw=2 sts=2 expandtab +autocmd Filetype tex setlocal ts=1 sw=1 sts=1 expandtab autocmd Filetype toml setlocal ts=2 sw=2 sts=2 expandtab autocmd Filetype vim setlocal ts=2 sw=2 sts=2 expandtab autocmd Filetype vue setlocal ts=2 sw=2 sts=2 expandtab diff --git a/home/.config/nvim/init.vim b/home/.config/nvim/init.vim index 429054d..5caea05 100644 --- a/home/.config/nvim/init.vim +++ b/home/.config/nvim/init.vim @@ -16,6 +16,18 @@ set modeline " Use system clipboard set clipboard=unnamedplus +" Support more file encodings +set fileencodings=ucs-bom,utf-8,default,sjis,latin1 + +" Scroll before reaching top/bottom +set scrolloff=5 + +" Conceal when line is not active +set conceallevel=1 + +" Just hide buffer instead of unloading +set hidden + " Remap leader key let mapleader = "," @@ -25,14 +37,12 @@ if has("autocmd") \| exe "normal! g`\"" | endif endif -" Support more file encodings -set fileencodings=ucs-bom,utf-8,default,sjis,latin1 - -" Scroll before reaching top/bottom -set scrolloff=5 - call plug#begin('~/.local/share/nvim/plugged') +" Multi-entry selection UI +Plug 'junegunn/fzf' +Plug 'junegunn/fzf.vim' + " Per-project vim settings Plug 'MarcWeber/vim-addon-local-vimrc' @@ -69,19 +79,17 @@ Plug 'jistr/vim-nerdtree-tabs' map N NERDTreeTabsToggle map n NERDTreeFocusToggle Plug 'Xuyuanp/nerdtree-git-plugin' + +" Icons for NERDTree and airline Plug 'ryanoasis/vim-devicons' -" Better word motion +" Intra word motion Plug 'chaoren/vim-wordmotion' " Trailing whitespace highlighting Plug 'ntpeters/vim-better-whitespace' -" Markdown live preview -Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']} - " Syntax highlighting/Language support -Plug 'ElmCast/elm-vim', { 'for': 'elm' } Plug 'Glench/Vim-Jinja2-Syntax', { 'for': 'jinja' } Plug 'cespare/vim-toml', { 'for': 'toml' } Plug 'mechatroner/rainbow_csv' @@ -93,7 +101,6 @@ Plug 'autozimu/LanguageClient-neovim', { \ 'branch': 'next', \ 'do': 'bash install.sh', \ } -set hidden let g:LanguageClient_serverCommands = { \ 'rust': ['~/.cargo/bin/rustup', 'run', 'stable', 'rls'], @@ -118,10 +125,6 @@ endfunction autocmd FileType * call LC_maps() -" Multi-entry selection UI -Plug 'junegunn/fzf' -Plug 'junegunn/fzf.vim' - " Rust Plug 'rust-lang/rust.vim' let g:rustfmt_autosave = 1 @@ -160,6 +163,7 @@ autocmd BufEnter *.tex syntax sync fromstart " Color schemes Plug 'altercation/vim-colors-solarized' + call plug#end() set background=dark