Compare commits
2 commits
1b0937ee8e
...
0d1e22d515
Author | SHA1 | Date | |
---|---|---|---|
|
0d1e22d515 | ||
|
4c4116c6af |
3 changed files with 25 additions and 7 deletions
|
@ -84,12 +84,17 @@ g:csv_no_conceal = 1
|
|||
g:vim_svelte_plugin_use_typescript = 1
|
||||
|
||||
g:LatexBox_Folding = 1
|
||||
g:NERDTreeHijackNetrw = 1
|
||||
|
||||
g:ale_set_balloons = 1
|
||||
nmap <silent> <C-k> <Plug>(ale_previous_wrap)
|
||||
nmap <silent> <C-j> <Plug>(ale_next_wrap)
|
||||
|
||||
g:fern#renderer = 'nerdfont'
|
||||
augroup glyphPalette
|
||||
autocmd!
|
||||
autocmd FileType fern g:glyph_palette#apply()
|
||||
augroup END
|
||||
|
||||
g:mucomplete#can_complete = {
|
||||
default: {
|
||||
omni: (t) => strlen(&l:omnifunc) > 0 && t =~# '\m\k\%(\k\|\.\)$'
|
||||
|
|
|
@ -28,7 +28,6 @@ minpac#add('lifepillar/vim-mucomplete')
|
|||
minpac#add('lotabout/skim')
|
||||
minpac#add('lotabout/skim.vim')
|
||||
minpac#add('mhinz/vim-signify')
|
||||
minpac#add('scrooloose/nerdtree')
|
||||
minpac#add('sjl/vitality.vim')
|
||||
minpac#add('tpope/vim-apathy')
|
||||
minpac#add('tpope/vim-commentary')
|
||||
|
@ -51,8 +50,15 @@ minpac#add('00dani/SchemaStore.vim')
|
|||
|
||||
minpac#add('rbong/vim-crystalline')
|
||||
minpac#add('lambdalisue/battery.vim')
|
||||
minpac#add('lambdalisue/glyph-palette.vim')
|
||||
minpac#add('lambdalisue/nerdfont.vim')
|
||||
|
||||
minpac#add('lambdalisue/fern.vim')
|
||||
minpac#add('lambdalisue/fern-hijack.vim')
|
||||
minpac#add('lambdalisue/fern-renderer-nerdfont.vim')
|
||||
minpac#add('lambdalisue/fern-git-status.vim')
|
||||
minpac#add('lambdalisue/fern-ssh')
|
||||
|
||||
minpac#add('alvan/vim-closetag')
|
||||
minpac#add('LaTeX-Box-Team/LaTeX-Box')
|
||||
minpac#add('vhda/verilog_systemverilog.vim')
|
||||
|
|
|
@ -2,6 +2,13 @@ vim9script
|
|||
|
||||
import autoload ($XDG_CACHE_HOME .. '/vim/pack/minpac/start/vim-crystalline/autoload/crystalline.vim') as cr
|
||||
|
||||
def DropIfDefault(status: string, default: string): string
|
||||
if status == default
|
||||
return ''
|
||||
endif
|
||||
return status
|
||||
enddef
|
||||
|
||||
def PrependIfVisible(status: string, prefix: string): string
|
||||
if empty(status)
|
||||
return ''
|
||||
|
@ -41,7 +48,7 @@ def StatuslineLeft(window: number, inactive: bool): string
|
|||
const bufnr = window->winbufnr()
|
||||
const b = bufnr->getbufvar('&')
|
||||
const fileName = [
|
||||
bufname(bufnr)->g:nerdfont#find()->AppendIfVisible(' '),
|
||||
bufname(bufnr)->g:nerdfont#find()->DropIfDefault(g:nerdfont#default)->AppendIfVisible(' '),
|
||||
b.buftype == '' ? '%t' : '%f',
|
||||
b.modifiable && b.modified ? cr.ModeHiItem('Modified') .. '+' .. cr.ModeHiItem('Fill') : '',
|
||||
b.readonly ? " \uf023" : '', # nf-fa-lock
|
||||
|
@ -78,7 +85,6 @@ enddef
|
|||
|
||||
def ConfigurePlugins(): void
|
||||
g:battery#component_format = '%s %v%%'
|
||||
g:nerdfont#default = ''
|
||||
g:crystalline_theme = 'gruvbox8'
|
||||
enddef
|
||||
|
||||
|
@ -107,12 +113,13 @@ def InitTab()
|
|||
width += 2
|
||||
endif
|
||||
|
||||
const icon = bufname(bufnr)->g:nerdfont#find()->PrependIfVisible(' ')
|
||||
if width + strchars(icon) >= maxWidth
|
||||
const icon = bufname(bufnr)->g:nerdfont#find()->DropIfDefault(g:nerdfont#default)->PrependIfVisible(' ')
|
||||
const iconWidth = strchars(icon)
|
||||
if width + iconWidth >= maxWidth
|
||||
return [tabDisplay, width]
|
||||
endif
|
||||
|
||||
return [icon .. tabDisplay, width + strchars(icon)]
|
||||
return [icon .. tabDisplay, width + iconWidth]
|
||||
enddef
|
||||
enddef
|
||||
|
||||
|
|
Loading…
Reference in a new issue