Skip to content

Commit 9401d19

Browse files
author
Jacky Alciné
committedDec 5, 2017
feat(vim): Mad tweaks.
1 parent c489ed4 commit 9401d19

File tree

7 files changed

+51
-19
lines changed

7 files changed

+51
-19
lines changed
 

‎.projections.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"README.markdown": {"type": "doc"}
3+
}

‎home/.config/nvim/autoload/jalcine.vim

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@ func! jalcine#setup() abort
1515
call <SID>EnhanceInbuiltSearch()
1616

1717
let l:sectors = [
18-
\ 'augroups',
1918
\ 'plugins',
2019
\ 'mappings',
2120
\ 'lang',
2221
\ 'theme',
2322
\ 'language_client',
2423
\ 'status',
2524
\ 'journal',
25+
\ 'tags',
26+
\ 'projections',
2627
\ ]
2728

2829
for l:sector in l:sectors

‎home/.config/nvim/autoload/jalcine/augroups.vim

+2-8
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ func! jalcine#augroups#setup() abort
88
au!
99
au BufEnter * :syntax sync maxlines=200
1010
au VimEnter <silent> call <SID>VimEnter()
11-
au User RooterChDir call <SID>GenerateTagsInDir()
1211
augroup END
1312

1413
augroup vimrc_auto_tmux_reload
@@ -28,8 +27,8 @@ func! jalcine#augroups#setup() abort
2827
au FileType python call jalcine#lang#python#tweak()
2928
au FileType php call jalcine#lang#php#tweak()
3029
au FileType css setl omnifunc=csscomplete#CompleteCSS noci
31-
au FileType markdown,mkd call jalcine#text_editing#enhance()
32-
au FileType text,txtfmt call jalcine#text_editing#enhance()
30+
au FileType markdown,mkd call jalcine#prose#enhance()
31+
au FileType text,txtfmt call jalcine#prose#enhance()
3332
au FileType yaml BracelessEnable +indent +fold +highlight
3433
au FileType python BracelessEnable +indent +fold +highlight
3534
au FileType man setlocal conceallevel=0
@@ -45,8 +44,3 @@ func! jalcine#augroups#setup() abort
4544
autocmd ColorScheme * call jalcine#status#update_colorscheme()
4645
augroup END
4746
endfunc
48-
49-
func! s:VimEnter() abort
50-
LocalVimRC!
51-
call jalcine#plugins#setup()
52-
endfunc

‎home/.config/nvim/autoload/jalcine/plugins.vim

+14
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,20 @@ func! jalcine#plugins#configure() abort " {{{
191191
let g:fzf_buffers_jump = 1
192192
let g:fzf_history_dir = expand('$HOME/.config/nvim/fzf-history')
193193
let g:fzf_gitignore_map = '<Leader>sgi'
194+
let g:fzf_colors = {
195+
\ 'fg': ['fg', 'Normal'],
196+
\ 'bg': ['bg', 'Normal'],
197+
\ 'hl': ['fg', 'Comment'],
198+
\ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
199+
\ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
200+
\ 'hl+': ['fg', 'Statement'],
201+
\ 'info': ['fg', 'PreProc'],
202+
\ 'prompt': ['fg', 'Conditional'],
203+
\ 'pointer': ['fg', 'Exception'],
204+
\ 'marker': ['fg', 'Keyword'],
205+
\ 'spinner': ['fg', 'Label'],
206+
\ 'header': ['fg', 'Comment']
207+
\ }
194208
" }}}
195209
"
196210
" {{{ ale
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
" File: autoload/projections.vim
2+
" Author: Jacky Alcine <yo@jacky.wtf>
3+
" Description: Options for projections.
4+
" Last Modified: December 04, 2017
5+
6+
func! jalcine#projections#setup() abort
7+
" TODO: Define some heuristics here.
8+
let g:projectionist_heuristics = {
9+
\ "README.*": { "type": "doc" },
10+
\ }
11+
endfunc

‎home/.config/nvim/autoload/jalcine/status.vim

+16-7
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func! s:Configure() abort
1515
let g:lightline.active = {
1616
\ 'left': [ [ 'mode' ],
1717
\ [ 'vcs' ],
18-
\ [ 'fileicon', 'modified', 'relativepath' ] ],
18+
\ [ 'icon', 'modified', 'relativepath', 'filename'] ],
1919
\ 'right': [ [ 'paste', ],
2020
\ [ 'pos', 'readonly' ],
2121
\ [ 'lint' ] ] }
@@ -34,13 +34,14 @@ func! s:Configure() abort
3434
\ 'pos': ' %l:%c / B:%n W: %{winnr()}',
3535
\ 'spell': ' %{emoji#for("pencil")}%{&spelllang}',
3636
\ 'lint': '%{jalcine#status#get("lint")}',
37-
\ 'vcs': '%{jalcine#status#get("vcs")}'
38-
\ }
39-
let g:lightline.component_function = {
40-
\ 'fileicon': 'WebDevIconsGetFileTypeSymbol',
37+
\ 'vcs': '%{jalcine#status#get("vcs")}',
38+
\ 'icon': '%{jalcine#status#get("icon")}'
4139
\ }
4240
let g:lightline.component_visible_condition = {
43-
\ 'gitbranch': 'fugitive#head() !== ""',
41+
\ 'vcs': 'fugitive#head() !== ""',
42+
\ 'icon': 'winwidth(0) > 70',
43+
\ 'relativepath': 'winwidth(0) > 70',
44+
\ 'filename': 'winwidth(0) < 70',
4445
\ }
4546
let g:lightline.separator = { 'left': '', 'right': '' }
4647
let g:lightline.subseparator = { 'left': '', 'right': '' }
@@ -76,7 +77,9 @@ endfunction
7677

7778
func! jalcine#status#get(part) abort
7879
if a:part == 'vcs'
79-
if !exists('fugitive#head') | return | endif
80+
if !exists('fugitive#head')
81+
return emoji#for('copyright')
82+
endif
8083

8184
let l:name = fugitive#head(8)
8285
if empty(l:name)
@@ -86,6 +89,12 @@ func! jalcine#status#get(part) abort
8689
endif
8790

8891
return l:name
92+
elseif a:part == 'icon'
93+
if !strlen(&filetype)
94+
return ""
95+
endif
96+
97+
return WebDevIconsGetFileTypeSymbol()
8998
elseif a:part == 'lint'
9099
let l:status = ale#statusline#Status()
91100
if l:status == "OK"

‎home/.config/nvim/autoload/jalcine/tagbar.vim ‎home/.config/nvim/autoload/jalcine/tags.vim

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55

66
let s:vimrc_root = fnamemodify($MYVIMRC, ':p:h')
77

8-
func! jalcine#tagbar#setup() abort
9-
call <SID>Configure()
8+
func! jalcine#tags#setup() abort
9+
call <SID>ConfigureTagbar()
1010
endfunc
1111

12-
func! s:Configure() abort " {{{
12+
func! s:ConfigureTagbar() abort " {{{
1313
let g:tagbar_type_elixir = {
1414
\ 'ctagstype' : 'elixir',
1515
\ 'kinds' : [

0 commit comments

Comments
 (0)
Please sign in to comment.