From 27208742a8cfe0a66ae9359d6a1d712b5de314e1 Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Wed, 16 Sep 2020 14:52:26 -0300 Subject: [PATCH] Enabling airline --- .gitmodules | 9 +++++ nvim/init.vim | 45 ++++++++++++++-------- nvim/pack/project/start/vim-projectionist | 1 + nvim/pack/visuals/start/vim-airline | 1 + nvim/pack/visuals/start/vim-airline-themes | 1 + 5 files changed, 42 insertions(+), 15 deletions(-) create mode 160000 nvim/pack/project/start/vim-projectionist create mode 160000 nvim/pack/visuals/start/vim-airline create mode 160000 nvim/pack/visuals/start/vim-airline-themes diff --git a/.gitmodules b/.gitmodules index 681634e..ec877f8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -52,3 +52,12 @@ [submodule "nvim/pack/syntaxes/start/vim-commentary"] path = nvim/pack/syntaxes/start/vim-commentary url = https://github.com/tpope/vim-commentary.git +[submodule "nvim/pack/project/start/vim-projectionist"] + path = nvim/pack/project/start/vim-projectionist + url = https://github.com/tpope/vim-projectionist.git +[submodule "nvim/pack/visuals/start/vim-airline"] + path = nvim/pack/visuals/start/vim-airline + url = https://github.com/vim-airline/vim-airline.git +[submodule "nvim/pack/visuals/start/vim-airline-themes"] + path = nvim/pack/visuals/start/vim-airline-themes + url = https://github.com/vim-airline/vim-airline-themes.git diff --git a/nvim/init.vim b/nvim/init.vim index 0ef3e9b..2cedb13 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -9,19 +9,29 @@ nnoremap - :Ex " Settings for all files {{{ set cursorline " highlight the line in which the cursor is -set foldmethod=marker " folding will use markers -set nowrap " instead of wrapping the text to the next line, scroll left and right +set foldmethod=marker " folding will use markers +set nowrap " instead of wrapping the text to the next line, scroll left and right +set laststatus=2 " Always display the status line +set showtabline=2 " Always display the tab bar " }}} -" Vim files {{{ +" Plugin configuration {{{ +" Airline {{{{ +let g:airline#extensions#tabline#formatter = 'unique_tail' +let g:airline_theme='minimalist' +" }}}} +" }}} + +" Filetype specific configurations {{{ +" Vim files {{{{ augroup vim au FileType vim setlocal noexpandtab " use real tabs au FileType vim setlocal tabstop=4 " display tabs as 4 spaces au FileType vim setlocal shiftwidth=4 " Use 4 spaces when auto-indenting augroup END -" }}} +" }}}} -" Python {{{ +" Python {{{{ augroup python au FileType python setlocal number " show line numbers au FileType python setlocal expandtab " use spaces instead of tabs @@ -34,19 +44,24 @@ augroup python " Shortcut to add pylint disables au FileType python iab pylint # pylint: disable augroup END -" }}} +" }}}} -" CSV files {{{ +" CSV files {{{{ augroup csv au FileType csv setlocal list " Display special characters, like tabs (for TSV files) augroup END -" }}} +" }}}} -" Rust {{{ -let g:rustfmt_autosave = 1 -" }}} +" Rust {{{{ +let g:rustfmt_autosave = 1 " Apply `rustfmt` when saving the file. + " Because this is related to + " the syntax file and not + " something on the buffer + " itself, we can set it + " globally. +" }}}} -" Markdown {{{ +" Markdown {{{{ augroup markdown au FileType markdown setlocal iskeyword+=: " this is kinda of a "hack" to make abbr accept ":" in them " This is a long abbreviation, but: @@ -63,12 +78,12 @@ augroup markdown au FileType markdown setlocal textwidth=79 " max line size au FileType markdown setlocal expandtab " use spaces instead of tabs augroup END -" }}} +" }}}} -" Shell {{{ +" Shell {{{{ augroup shell au FileType sh setlocal tabstop=4 " display tabs as 4 spaces au FileType sh setlocal shiftwidth=4 " number of spaces to use for auto-indentation au FileType sh setlocal softtabstop=4 " when deleting characters, consider 4 spaces as a tab augroup END -" }}} +" }}}} diff --git a/nvim/pack/project/start/vim-projectionist b/nvim/pack/project/start/vim-projectionist new file mode 160000 index 0000000..1d95458 --- /dev/null +++ b/nvim/pack/project/start/vim-projectionist @@ -0,0 +1 @@ +Subproject commit 1d95458273a8ecdb678e65db918c045f9bb7e220 diff --git a/nvim/pack/visuals/start/vim-airline b/nvim/pack/visuals/start/vim-airline new file mode 160000 index 0000000..3740312 --- /dev/null +++ b/nvim/pack/visuals/start/vim-airline @@ -0,0 +1 @@ +Subproject commit 3740312de0be5200286260816e2563e77c0be0c5 diff --git a/nvim/pack/visuals/start/vim-airline-themes b/nvim/pack/visuals/start/vim-airline-themes new file mode 160000 index 0000000..155bce6 --- /dev/null +++ b/nvim/pack/visuals/start/vim-airline-themes @@ -0,0 +1 @@ +Subproject commit 155bce6665ab8c83447102e8402cc9d3b7c3b3f3