2022-02-15 21:07:11 +00:00
|
|
|
" plugins
|
|
|
|
call plug#begin(stdpath('data') . '/plugged')
|
|
|
|
|
|
|
|
" color scheme
|
2022-05-25 18:25:59 +00:00
|
|
|
"Plug 'owozsh/amora'
|
2022-02-15 21:07:11 +00:00
|
|
|
|
|
|
|
" misc
|
2022-05-25 18:25:59 +00:00
|
|
|
Plug 'nvim-lua/plenary.nvim'
|
2022-04-04 03:02:21 +00:00
|
|
|
Plug 'tpope/vim-sensible'
|
2022-02-15 21:07:11 +00:00
|
|
|
Plug 'itchyny/vim-gitbranch'
|
|
|
|
Plug 'andweeb/presence.nvim'
|
|
|
|
Plug 'ntpeters/vim-better-whitespace'
|
|
|
|
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
|
|
|
Plug 'junegunn/fzf.vim'
|
|
|
|
Plug 'airblade/vim-gitgutter'
|
|
|
|
Plug 'tpope/vim-fugitive'
|
|
|
|
Plug 'mg979/vim-visual-multi'
|
2022-03-19 03:38:59 +00:00
|
|
|
"Plug 'rrethy/vim-hexokinase', { 'do': 'make hexokinase' }
|
2022-02-15 21:07:11 +00:00
|
|
|
Plug 'rhysd/committia.vim'
|
2022-04-04 03:02:21 +00:00
|
|
|
Plug 'tpope/vim-sleuth'
|
2022-05-25 18:25:59 +00:00
|
|
|
Plug 'nvim-treesitter/nvim-treesitter'
|
|
|
|
Plug 'm-demare/hlargs.nvim'
|
2022-02-15 21:07:11 +00:00
|
|
|
|
|
|
|
" interface
|
|
|
|
Plug 'romgrk/barbar.nvim'
|
2022-03-19 03:38:59 +00:00
|
|
|
Plug 'preservim/nerdtree'
|
|
|
|
Plug 'Xuyuanp/nerdtree-git-plugin'
|
2022-05-25 18:25:59 +00:00
|
|
|
Plug 'lukas-reineke/indent-blankline.nvim'
|
|
|
|
Plug 'folke/lsp-colors.nvim'
|
|
|
|
Plug 'nacro90/numb.nvim'
|
|
|
|
Plug 'xiyaowong/nvim-cursorword'
|
|
|
|
Plug 'simrat39/symbols-outline.nvim'
|
|
|
|
Plug 'kevinhwang91/nvim-hlslens'
|
|
|
|
Plug 'SmiteshP/nvim-gps'
|
2022-02-15 21:07:11 +00:00
|
|
|
|
|
|
|
" language specific
|
|
|
|
Plug 'sheerun/vim-polyglot'
|
|
|
|
"Plug 'ruanyl/vim-fixmyjs'
|
|
|
|
"Plug 'prettier/vim-prettier', {'build': 'pnpm i'}
|
|
|
|
Plug 'dense-analysis/ale'
|
|
|
|
Plug 'neovim/nvim-lspconfig'
|
|
|
|
Plug 'nvim-lua/completion-nvim'
|
2022-05-25 18:25:59 +00:00
|
|
|
Plug 'windwp/nvim-ts-autotag'
|
|
|
|
Plug 'jose-elias-alvarez/null-ls.nvim'
|
|
|
|
|
|
|
|
Plug 'hrsh7th/nvim-cmp'
|
|
|
|
Plug 'hrsh7th/cmp-nvim-lsp'
|
|
|
|
Plug 'hrsh7th/cmp-cmdline'
|
|
|
|
Plug 'hrsh7th/cmp-buffer'
|
|
|
|
Plug 'dmitmel/cmp-cmdline-history'
|
|
|
|
Plug 'hrsh7th/cmp-nvim-lsp-signature-help'
|
|
|
|
Plug 'hrsh7th/cmp-path'
|
|
|
|
|
|
|
|
Plug 'hrsh7th/cmp-vsnip'
|
|
|
|
Plug 'hrsh7th/vim-vsnip'
|
2022-02-15 21:07:11 +00:00
|
|
|
|
|
|
|
call plug#end()
|
|
|
|
|
|
|
|
" misc
|
2022-04-04 03:02:21 +00:00
|
|
|
set notermguicolors
|
|
|
|
colorscheme lena
|
|
|
|
|
2022-03-19 03:38:59 +00:00
|
|
|
"let g:mode = "old_amora"
|
|
|
|
"colorscheme amora
|
|
|
|
"set termguicolors
|
2022-02-15 21:07:11 +00:00
|
|
|
|
|
|
|
set fileformat=unix
|
|
|
|
set fileformats=unix,dos
|
|
|
|
|
|
|
|
set number
|
|
|
|
set cul
|
|
|
|
|
|
|
|
set tabstop=2
|
|
|
|
set shiftwidth=2
|
|
|
|
set expandtab
|
|
|
|
|
|
|
|
set mouse+=nia
|
|
|
|
|
|
|
|
au WinEnter * set cul
|
|
|
|
au WinLeave * set nocul
|
|
|
|
|
|
|
|
let g:better_whitespace_enabled = 1
|
|
|
|
|
|
|
|
let bufferline = get(g:, 'bufferline', {})
|
|
|
|
let bufferline.icons = v:false
|
|
|
|
let bufferline.icon_separator_active = '▎'
|
|
|
|
let bufferline.icon_separator_inactive = '▎'
|
|
|
|
let bufferline.icon_close_tab = 'x'
|
|
|
|
let bufferline.icon_close_tab_modified = '●'
|
|
|
|
let bufferline.icon_pinned = '▲'
|
|
|
|
|
|
|
|
let g:presence_buttons = 0
|
|
|
|
|
|
|
|
let g:ale_fixers = {
|
|
|
|
\ '*': ['trim_whitespace'],
|
|
|
|
\ 'vim': [],
|
|
|
|
\ 'javascript': ['eslint', 'prettier'],
|
|
|
|
\ 'json': ['prettier'],
|
|
|
|
\ 'css': ['prettier'],
|
|
|
|
\}
|
|
|
|
let g:ale_fix_on_save = 1
|
|
|
|
|
|
|
|
let g:Hexokinase_highlighters = ['virtual']
|
|
|
|
|
|
|
|
set fillchars+=vert:▎
|
|
|
|
|
2022-05-25 18:25:59 +00:00
|
|
|
set completeopt=menuone,noinsert,noselect
|
|
|
|
set shortmess+=c
|
|
|
|
|
|
|
|
let g:completion_enable_auto_popup = 1
|
|
|
|
|
2022-02-15 21:07:11 +00:00
|
|
|
lua << EOF
|
2022-05-25 18:25:59 +00:00
|
|
|
vim.cmd("highlight IndentBlanklineIndent1 ctermfg=11 cterm=nocombine")
|
|
|
|
vim.cmd("highlight IndentBlanklineIndent2 ctermfg=10 cterm=nocombine")
|
|
|
|
vim.cmd("highlight IndentBlanklineIndent3 ctermfg=13 cterm=nocombine")
|
|
|
|
vim.cmd("highlight IndentBlanklineIndent4 ctermfg=12 cterm=nocombine")
|
|
|
|
|
|
|
|
vim.opt.list = true
|
|
|
|
vim.opt.listchars:append("space:⋅")
|
|
|
|
vim.opt.listchars:append("eol:↴")
|
|
|
|
|
|
|
|
require("indent_blankline").setup(
|
|
|
|
{
|
|
|
|
char = "▎",
|
|
|
|
space_char_blankline = " ",
|
|
|
|
char_blankline = " ",
|
|
|
|
char_highlight_list = {
|
|
|
|
"IndentBlanklineIndent1",
|
|
|
|
"IndentBlanklineIndent2",
|
|
|
|
"IndentBlanklineIndent3",
|
|
|
|
"IndentBlanklineIndent4",
|
|
|
|
},
|
|
|
|
show_current_context = true,
|
|
|
|
show_current_context_start = true,
|
|
|
|
}
|
|
|
|
)
|
|
|
|
EOF
|
|
|
|
|
|
|
|
:lua require("numb").setup()
|
|
|
|
:lua require("nvim-ts-autotag").setup()
|
2022-02-15 21:07:11 +00:00
|
|
|
|
2022-05-25 18:25:59 +00:00
|
|
|
lua << EOF
|
|
|
|
require("hlslens").setup(
|
|
|
|
{
|
|
|
|
calm_down = true,
|
|
|
|
nearest_only = true,
|
|
|
|
nearest_float_when = "auto",
|
|
|
|
}
|
|
|
|
)
|
2022-02-15 21:07:11 +00:00
|
|
|
EOF
|
|
|
|
|
2022-05-25 18:25:59 +00:00
|
|
|
lua << EOF
|
|
|
|
local null_ls = require("null-ls")
|
|
|
|
null_ls.setup(
|
|
|
|
{
|
|
|
|
sources = {
|
|
|
|
null_ls.builtins.diagnostics.eslint,
|
|
|
|
null_ls.builtins.diagnostics.zsh,
|
|
|
|
null_ls.builtins.formatting.eslint,
|
|
|
|
null_ls.builtins.formatting.prettier,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
)
|
|
|
|
EOF
|
2022-02-15 21:07:11 +00:00
|
|
|
|
2022-05-25 18:25:59 +00:00
|
|
|
set completeopt=menu,menuone,noselect
|
|
|
|
|
|
|
|
lua <<EOF
|
|
|
|
local cmp = require("cmp")
|
|
|
|
|
|
|
|
local has_words_before = function()
|
|
|
|
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
|
|
|
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
|
|
|
end
|
|
|
|
|
|
|
|
local feedkey = function(key, mode)
|
|
|
|
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), mode, true)
|
|
|
|
end
|
|
|
|
|
|
|
|
local mapping = {
|
|
|
|
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
|
|
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
|
|
|
['<C-Space>'] = cmp.mapping.complete(),
|
|
|
|
['<C-e>'] = cmp.mapping.abort(),
|
|
|
|
['<CR>'] = cmp.mapping.confirm({select = true}),
|
|
|
|
["<Tab>"] = cmp.mapping(function(fallback)
|
|
|
|
if cmp.visible() then
|
|
|
|
cmp.select_next_item()
|
|
|
|
elseif vim.fn["vsnip#available"](1) == 1 then
|
|
|
|
feedkey("<Plug>(vsnip-expand-or-jump)", "")
|
|
|
|
elseif has_words_before() then
|
|
|
|
cmp.complete()
|
|
|
|
else
|
|
|
|
fallback() -- The fallback function sends a already mapped key. In this case, it's probably `<Tab>`.
|
|
|
|
end
|
|
|
|
end, { "i", "s" }),
|
|
|
|
["<S-Tab>"] = cmp.mapping(function()
|
|
|
|
if cmp.visible() then
|
|
|
|
cmp.select_prev_item()
|
|
|
|
elseif vim.fn["vsnip#jumpable"](-1) == 1 then
|
|
|
|
feedkey("<Plug>(vsnip-jump-prev)", "")
|
|
|
|
end
|
|
|
|
end, { "i", "s" }),
|
|
|
|
}
|
|
|
|
|
|
|
|
cmp.setup(
|
|
|
|
{
|
|
|
|
snippet = {
|
|
|
|
expand = function(args)
|
|
|
|
vim.fn["vsnip#anonymous"](args.body)
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
mapping = cmp.mapping.preset.insert(mapping),
|
|
|
|
sources = cmp.config.sources(
|
|
|
|
{
|
|
|
|
{name = "nvim_lsp"},
|
|
|
|
{name = "vsnip"},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{name = "buffer"},
|
|
|
|
}
|
|
|
|
),
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
cmp.setup.cmdline(
|
|
|
|
":",
|
|
|
|
{
|
|
|
|
sources = {
|
|
|
|
{name = "cmdline", group_index = 1},
|
|
|
|
{name = "cmdline_history", group_index = 2},
|
|
|
|
},
|
|
|
|
mapping = cmp.mapping.preset.insert(mapping),
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
cmp.setup.cmdline(
|
|
|
|
"/",
|
|
|
|
{
|
|
|
|
sources = {
|
|
|
|
{name = "cmdline_history"},
|
|
|
|
{name = "buffer"},
|
|
|
|
},
|
|
|
|
mapping = cmp.mapping.preset.insert(mapping),
|
|
|
|
}
|
|
|
|
)
|
2022-02-15 21:07:11 +00:00
|
|
|
|
2022-05-25 18:25:59 +00:00
|
|
|
local lspconfig = require("lspconfig")
|
|
|
|
local completion_callback = require("completion").on_attach
|
|
|
|
local capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
|
|
|
|
|
|
|
lspconfig.eslint.setup(
|
|
|
|
{
|
|
|
|
on_attach = completion_callback,
|
|
|
|
capabilities = capabilities,
|
|
|
|
}
|
|
|
|
)
|
|
|
|
lspconfig.tsserver.setup(
|
|
|
|
{
|
|
|
|
on_attach = completion_callback,
|
|
|
|
capabilities = capabilities,
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
lua <<EOF
|
|
|
|
require("nvim-gps").setup(
|
|
|
|
{
|
|
|
|
disable_icons = true,
|
|
|
|
}
|
|
|
|
)
|
|
|
|
EOF
|
2022-04-04 03:02:21 +00:00
|
|
|
|
2022-02-15 21:07:11 +00:00
|
|
|
" tre
|
2022-03-19 03:38:59 +00:00
|
|
|
let g:NERDTreeGitStatusIndicatorMapCustom = {
|
2022-04-04 03:02:21 +00:00
|
|
|
\ 'Modified' :'U',
|
|
|
|
\ 'Staged' :'A',
|
|
|
|
\ 'Untracked' :'',
|
|
|
|
\ 'Renamed' :'R',
|
|
|
|
\ 'Unmerged' :'M',
|
|
|
|
\ 'Deleted' :'D',
|
|
|
|
\ 'Dirty' :'',
|
|
|
|
\ 'Ignored' :'I',
|
|
|
|
\ 'Clean' :'',
|
|
|
|
\ 'Unknown' :'?',
|
|
|
|
\ }
|
2022-02-15 21:07:11 +00:00
|
|
|
|
|
|
|
" keys
|
|
|
|
tnoremap <Esc> <C-\><C-n>
|
|
|
|
|
2022-03-24 03:26:10 +00:00
|
|
|
nnoremap <silent> <S-Up> :m-2<CR>
|
|
|
|
nnoremap <silent> <S-Down> :m+<CR>
|
|
|
|
inoremap <silent> <S-Up> <Esc>:m-2<CR>
|
|
|
|
inoremap <silent> <S-Down> <Esc>:m+<CR>
|
2022-02-15 21:07:11 +00:00
|
|
|
|
2022-03-19 03:38:59 +00:00
|
|
|
nnoremap <silent> <C-b> :NERDTreeToggle<CR>
|
|
|
|
":lua require'bufferline.state'.set_offset(require'nvim-tree.view'.win_open() and 30 or 0)<CR>
|
2022-02-15 21:07:11 +00:00
|
|
|
|
|
|
|
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
|
|
|
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>": "\<S-Tab>"
|
|
|
|
imap <tab> <Plug>(completion_smart_tab)
|
|
|
|
imap <s-tab> <Plug>(completion_smart_s_tab)
|
|
|
|
|
|
|
|
" barbar keys
|
|
|
|
" Move to previous/next
|
|
|
|
nnoremap <silent> <A-,> :BufferPrevious<CR>
|
|
|
|
nnoremap <silent> <A-.> :BufferNext<CR>
|
|
|
|
" Re-order to previous/next
|
|
|
|
nnoremap <silent> <A-<> :BufferMovePrevious<CR>
|
|
|
|
nnoremap <silent> <A->> :BufferMoveNext<CR>
|
|
|
|
" Goto buffer in position...
|
|
|
|
nnoremap <silent> <A-1> :BufferGoto 1<CR>
|
|
|
|
nnoremap <silent> <A-2> :BufferGoto 2<CR>
|
|
|
|
nnoremap <silent> <A-3> :BufferGoto 3<CR>
|
|
|
|
nnoremap <silent> <A-4> :BufferGoto 4<CR>
|
|
|
|
nnoremap <silent> <A-5> :BufferGoto 5<CR>
|
|
|
|
nnoremap <silent> <A-6> :BufferGoto 6<CR>
|
|
|
|
nnoremap <silent> <A-7> :BufferGoto 7<CR>
|
|
|
|
nnoremap <silent> <A-8> :BufferGoto 8<CR>
|
|
|
|
nnoremap <silent> <A-9> :BufferLast<CR>
|
|
|
|
" Pin/unpin buffer
|
|
|
|
nnoremap <silent> <A-p> :BufferPin<CR>
|
|
|
|
" Close buffer
|
|
|
|
nnoremap <silent> <A-c> :BufferClose<CR>
|
|
|
|
|
|
|
|
" Colors
|
|
|
|
|
|
|
|
function! s:h(scope, fg, ...) " bg, attr_list, special
|
|
|
|
let l:fg = copy(a:fg)
|
|
|
|
let l:bg = get(a:, 1, ['NONE', 'NONE'])
|
|
|
|
|
|
|
|
let l:attr_list = filter(get(a:, 2, ['NONE']), 'type(v:val) == 1')
|
|
|
|
let l:attrs = len(l:attr_list) > 0 ? join(l:attr_list, ',') : 'NONE'
|
|
|
|
|
|
|
|
" Falls back to coloring foreground group on terminals because
|
|
|
|
" nearly all do not support undercurl
|
|
|
|
let l:special = get(a:, 3, ['NONE', 'NONE'])
|
|
|
|
if l:special[0] !=# 'NONE' && l:fg[0] ==# 'NONE' && !has('gui_running')
|
|
|
|
let l:fg[0] = l:special[0]
|
|
|
|
let l:fg[1] = l:special[1]
|
|
|
|
endif
|
|
|
|
|
|
|
|
let l:hl_string = [
|
2022-04-04 03:02:21 +00:00
|
|
|
\ 'highlight', a:scope,
|
|
|
|
\ 'guifg=' . l:fg[0], 'ctermfg=' . l:fg[1],
|
|
|
|
\ 'guibg=' . l:bg[0], 'ctermbg=' . l:bg[1],
|
|
|
|
\ 'gui=' . l:attrs, 'cterm=' . l:attrs,
|
|
|
|
\ 'guisp=' . l:special[0],
|
|
|
|
\]
|
2022-02-15 21:07:11 +00:00
|
|
|
|
|
|
|
execute join(l:hl_string, ' ')
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
hi Normal ctermbg=NONE
|
|
|
|
hi LineNr ctermfg=7
|
2022-03-24 03:26:10 +00:00
|
|
|
hi CursorLineNr ctermfg=1 ctermbg=0
|
|
|
|
hi CursorLine cterm=NONE ctermfg=NONE ctermbg=0
|
2022-02-15 21:07:11 +00:00
|
|
|
hi StatusLine ctermbg=2 ctermfg=0
|
|
|
|
hi StatusLineNC ctermbg=7 ctermfg=0
|
|
|
|
hi VertSplit ctermbg=0 ctermfg=0
|
|
|
|
hi ExtraWhitespace ctermbg=1
|
|
|
|
hi SignColumn ctermbg=8
|
|
|
|
|
|
|
|
hi BufferCurrent ctermfg=5 ctermbg=NONE
|
|
|
|
hi BufferCurrentIndex ctermfg=5 ctermbg=NONE
|
|
|
|
hi BufferCurrentMod ctermfg=9 ctermbg=NONE
|
|
|
|
hi BufferCurrentSign ctermfg=5 ctermbg=NONE
|
|
|
|
hi BufferCurrentTarget ctermfg=5 ctermbg=NONE
|
|
|
|
hi BufferVisible ctermfg=7 ctermbg=NONE
|
|
|
|
hi BufferVisibleIndex ctermfg=7 ctermbg=NONE
|
|
|
|
hi BufferVisibleMod ctermfg=9 ctermbg=NONE
|
|
|
|
hi BufferVisibleSign ctermfg=7 ctermbg=NONE
|
|
|
|
hi BufferVisibleTarget ctermfg=7 ctermbg=NONE
|
|
|
|
hi BufferInactive ctermfg=7 ctermbg=0
|
|
|
|
hi BufferInactiveIndex ctermfg=5 ctermbg=0
|
|
|
|
hi BufferInactiveMod ctermfg=1 ctermbg=0
|
|
|
|
hi BufferInactiveSign ctermfg=10 ctermbg=0
|
|
|
|
hi BufferInactiveTarget ctermfg=11 ctermbg=0
|
|
|
|
hi BufferTabpages ctermfg=7 ctermbg=0
|
|
|
|
hi BufferTabpageFill ctermfg=7 ctermbg=0
|
|
|
|
hi BufferOffset ctermfg=0 ctermbg=0
|
|
|
|
|
2022-04-04 03:02:21 +00:00
|
|
|
hi! link SignColumn LineNr
|
|
|
|
|
|
|
|
hi LspDiagnosticsDefaultHint ctermfg=6
|
|
|
|
hi LspDiagnosticsDefaultError ctermfg=1
|
|
|
|
hi LspDiagnosticsDefaultWarning ctermfg=3
|
|
|
|
hi LspDiagnosticsDefaultInformation ctermfg=7
|
|
|
|
|
|
|
|
hi ALEErrorSign ctermfg=1
|
|
|
|
hi ALEWarningSign ctermfg=3
|
2022-02-15 21:07:11 +00:00
|
|
|
|
2022-03-19 03:38:59 +00:00
|
|
|
"call s:h('StatusLine', g:amora#palette.green, g:amora#palette.bgdark)
|
|
|
|
"call s:h('StatusLineNC', g:amora#palette.fg, g:amora#palette.bgdark)
|
|
|
|
"call s:h('VertSplit', g:amora#palette.bg, g:amora#palette.bgdarker)
|
|
|
|
"call s:h('ExtraWhitespace', g:amora#palette.fg, g:amora#palette.red)
|
|
|
|
|
|
|
|
"call s:h('BufferCurrent', g:amora#palette.pink, g:amora#palette.bg)
|
|
|
|
"call s:h('BufferCurrentIndex', g:amora#palette.pink, g:amora#palette.bg)
|
|
|
|
"call s:h('BufferCurrentSign', g:amora#palette.pink, g:amora#palette.bg)
|
|
|
|
"call s:h('BufferCurrentTarget', g:amora#palette.pink, g:amora#palette.bg)
|
|
|
|
"call s:h('BufferCurrentMod', g:amora#palette.red, g:amora#palette.bg)
|
|
|
|
"call s:h('BufferVisible', g:amora#palette.fg, g:amora#palette.bg)
|
|
|
|
"call s:h('BufferVisibleIndex', g:amora#palette.fg, g:amora#palette.bg)
|
|
|
|
"call s:h('BufferVisibleSign', g:amora#palette.fg, g:amora#palette.bg)
|
|
|
|
"call s:h('BufferVisibleTarget', g:amora#palette.fg, g:amora#palette.bg)
|
|
|
|
"call s:h('BufferVisibleMod', g:amora#palette.pink, g:amora#palette.bg)
|
|
|
|
"call s:h('BufferInactive', g:amora#palette.bglighter, g:amora#palette.bgdarker)
|
|
|
|
"call s:h('BufferInactiveIndex', g:amora#palette.bglighter, g:amora#palette.bgdarker)
|
|
|
|
"call s:h('BufferInactiveSign', g:amora#palette.bglighter, g:amora#palette.bgdarker)
|
|
|
|
"call s:h('BufferInactiveTarget', g:amora#palette.bglighter, g:amora#palette.bgdarker)
|
|
|
|
"call s:h('BufferInactiveMod', g:amora#palette.red, g:amora#palette.bgdarker)
|
|
|
|
"call s:h('BufferTabpages', g:amora#palette.bglighter, g:amora#palette.bgdarker)
|
|
|
|
"call s:h('BufferTabpagesFill', g:amora#palette.bglighter, g:amora#palette.bgdarker)
|
|
|
|
"call s:h('BufferOffset', g:amora#palette.bgdarker, g:amora#palette.bgdarker)
|
|
|
|
|
|
|
|
"call s:h('NvimTreeNormal', g:amora#palette.fg, g:amora#palette.bgdarker)
|
2022-02-15 21:07:11 +00:00
|
|
|
|
|
|
|
" statusline hell
|
|
|
|
hi StatusLineMode ctermbg=1 ctermfg=0
|
|
|
|
hi StatusLineGitBranch ctermbg=5 ctermfg=0
|
|
|
|
hi StatusLineChar ctermbg=4 ctermfg=0
|
|
|
|
hi StatusLineFormat ctermbg=3 ctermfg=0
|
|
|
|
hi StatusLineFileType ctermbg=7 ctermfg=0
|
2022-05-25 18:25:59 +00:00
|
|
|
hi StatusLineBreadcrumbs ctermbg=6 ctermfg=0
|
|
|
|
hi StatusLineEmpty ctermbg=8 ctermfg=2
|
2022-02-15 21:07:11 +00:00
|
|
|
|
2022-03-19 03:38:59 +00:00
|
|
|
"call s:h('StatusLineMode', g:amora#palette.bgdark, g:amora#palette.red)
|
|
|
|
"call s:h('StatusLineGitBranch', g:amora#palette.bgdark, g:amora#palette.pink)
|
|
|
|
"call s:h('StatusLineChar', g:amora#palette.bgdark, g:amora#palette.purple)
|
|
|
|
"call s:h('StatusLineFormat', g:amora#palette.bgdark, g:amora#palette.yellow)
|
|
|
|
"call s:h('StatusLineFileType', g:amora#palette.bgdark, g:amora#palette.fg)
|
2022-02-15 21:07:11 +00:00
|
|
|
|
|
|
|
function! GetMode()
|
|
|
|
let l:m = mode(1)
|
|
|
|
|
|
|
|
if l:m ==# "i"
|
2022-04-04 03:02:21 +00:00
|
|
|
let l:mode = "INS"
|
2022-02-15 21:07:11 +00:00
|
|
|
elseif l:m ==# "c"
|
2022-04-04 03:02:21 +00:00
|
|
|
let l:mode = "CMD"
|
2022-02-15 21:07:11 +00:00
|
|
|
elseif l:m[0] ==# "R"
|
2022-04-04 03:02:21 +00:00
|
|
|
let l:mode = "REP"
|
2022-02-15 21:07:11 +00:00
|
|
|
elseif l:m ==# "Rv"
|
2022-04-04 03:02:21 +00:00
|
|
|
let l:mode = "REP"
|
2022-02-15 21:07:11 +00:00
|
|
|
elseif l:m =~# '\v(v|V| |s|S| )'
|
2022-04-04 03:02:21 +00:00
|
|
|
let l:mode = "VIS"
|
2022-02-15 21:07:11 +00:00
|
|
|
else
|
2022-04-04 03:02:21 +00:00
|
|
|
return ""
|
2022-02-15 21:07:11 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
return ' '.l:mode.' '
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
function! GitBranch()
|
|
|
|
let l:branch = gitbranch#name()
|
|
|
|
return strlen(l:branch) ? ' ' . l:branch . ' ' : ''
|
|
|
|
endfunction
|
|
|
|
|
2022-05-25 18:25:59 +00:00
|
|
|
function! Breadcrumbs()
|
|
|
|
return luaeval('require("nvim-gps").is_available()') ? ' '.luaeval('require("nvim-gps").get_location()').' ' : ''
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
|
2022-02-15 21:07:11 +00:00
|
|
|
set statusline=
|
|
|
|
set statusline+=%#StatusLineMode#
|
|
|
|
set statusline+=%{GetMode()}
|
|
|
|
set statusline+=%#StatusLineGitBranch#
|
|
|
|
set statusline+=%{GitBranch()}
|
|
|
|
set statusline+=%*
|
|
|
|
set statusline+=\ %f
|
2022-05-25 18:25:59 +00:00
|
|
|
set statusline+=%#StatusLineEmpty#
|
2022-02-15 21:07:11 +00:00
|
|
|
set statusline+=\ %m%r
|
|
|
|
set statusline+=%=
|
2022-05-25 18:25:59 +00:00
|
|
|
set statusline+=%#StatusLineBreadcrumbs#
|
|
|
|
set statusline+=%{Breadcrumbs()}
|
2022-02-15 21:07:11 +00:00
|
|
|
set statusline+=%#StatusLineChar#
|
|
|
|
set statusline+=\ %l,\ %c\
|
|
|
|
set statusline+=%#StatusLineFormat#
|
|
|
|
set statusline+=\ %{&fileencoding?&fileencoding:&encoding}\ %{&fileformat}\
|
|
|
|
set statusline+=%#StatusLineFileType#
|
|
|
|
set statusline+=\ %{&filetype}\
|