This commit is contained in:
Cynthia Foxwell 2022-08-08 10:52:23 -06:00
parent 65ac34fb09
commit 3d20f72044
3 changed files with 164 additions and 113 deletions

90
common/.wezterm.lua Normal file
View file

@ -0,0 +1,90 @@
local wezterm = require("wezterm");
return {
default_prog = {"D:/Programs/git-sdk-64/usr/bin/zsh", "-i"},
default_cwd = "D:/Downloads",
font = wezterm.font_with_fallback({
"Terminus (TTF)",
"SijiNGWindows",
"Unifont",
}),
font_size = 9.0,
freetype_load_target = "Mono",
color_scheme = "everforest",
color_schemes = {
everforest = {
foreground = "#d3c6aa",
background = "#2b3339",
cursor_fg = "#3a454a",
cursor_bg = "#d3c6aa",
cursor_border = "#d3c6aa",
selection_fg = "#9da9a0",
selection_bg = "#7a8478",
ansi = {
"#323C41",
"#e67e80",
"#a7c080",
"#dbbc7f",
"#7fbbb3",
"#d699b6",
"#83c092",
"#d3c6aa",
},
brights = {
"#3A454A",
"#f85552",
"#8da101",
"#dfa000",
"#3a94c5",
"#df69ba",
"#35a77c",
"#9da9a0",
},
},
},
window_padding = {
left = 4,
right = 4,
top = 4,
bottom = 4,
},
hide_tab_bar_if_only_one_tab = false,
use_fancy_tab_bar = false,
tab_bar_at_bottom = true,
colors = {
tab_bar = {
background = "#1e2327",
active_tab = {
bg_color = "#2b3339",
fg_color = "#d3c6aa",
},
inactive_tab = {
bg_color = "#1e2327",
fg_color = "#9da9a0",
},
inactive_tab_hover = {
bg_color = "#1e2327",
fg_color = "#d3c6aa",
italic = false,
},
new_tab = {
bg_color = "#1e2327",
fg_color = "#9da9a0",
italic = false,
},
new_tab_hover = {
bg_color = "#1e2327",
fg_color = "#d3c6aa",
italic = false,
},
}
},
unix_domains = {
{
name = "unix",
},
},
default_gui_startup_args = {"connect", "unix"},
}

View file

@ -19,9 +19,10 @@ if [[ $CONF_ENABLEGIT -eq 1 ]]; then
fi
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
setopt SHARE_HISTORY
# End of lines configured by zsh-newuser-install
####
@ -155,6 +156,9 @@ bindkey '^[[A' up-line-or-beginning-search # up prev command in his
bindkey '^[[B' down-line-or-beginning-search # down next command in history
bindkey '^[[5~' history-search-backward # pgup prev in history no search
bindkey '^[[6~' history-search-forward # pgdn next in history no search
bindkey '^F' expand-or-complete # ctrl+f tab
bindkey -r '^I'
####

View file

@ -10,37 +10,28 @@ Plug 'tpope/vim-sensible'
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'
"Plug 'rrethy/vim-hexokinase', { 'do': 'make hexokinase' }
Plug 'rhysd/committia.vim'
Plug 'tpope/vim-sleuth'
Plug 'm-demare/hlargs.nvim'
Plug 'nvim-treesitter/nvim-treesitter', { 'do': { -> TSUpdate } }
Plug 'nvim-treesitter/nvim-treesitter'
Plug 'windwp/nvim-ts-autotag'
" interface
Plug 'romgrk/barbar.nvim'
Plug 'preservim/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'lukas-reineke/indent-blankline.nvim'
Plug 'folke/lsp-colors.nvim'
Plug 'nacro90/numb.nvim'
Plug 'xiyaowong/nvim-cursorword'
Plug 'kevinhwang91/nvim-hlslens'
Plug 'simrat39/symbols-outline.nvim'
Plug 'norcalli/nvim-colorizer.lua'
" 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 'jose-elias-alvarez/null-ls.nvim'
"Plug 'jose-elias-alvarez/null-ls.nvim'
Plug 'hrsh7th/nvim-cmp'
Plug 'hrsh7th/cmp-nvim-lsp'
@ -59,10 +50,6 @@ call plug#end()
set notermguicolors
colorscheme lena
"let g:mode = "old_amora"
"colorscheme amora
"set termguicolors
set fileformat=unix
set fileformats=unix,dos
@ -93,7 +80,7 @@ let g:presence_buttons = 0
let g:ale_fixers = {
\ '*': ['trim_whitespace'],
\ 'vim': [],
\ 'javascript': ['eslint', 'prettier'],
\ 'javascript': ['prettier'],
\ 'json': ['prettier'],
\ 'css': ['prettier'],
\}
@ -144,17 +131,29 @@ require("hlslens").setup(
EOF
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,
}
}
)
--[[local null_ls = require("null-ls")
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
null_ls.setup({
sources = {
null_ls.builtins.diagnostics.eslint,
null_ls.builtins.diagnostics.zsh,
null_ls.builtins.formatting.eslint,
null_ls.builtins.formatting.prettier,
},
on_attach = function(client, buffer)
if client.supports_method("textDocument/formatting") then
vim.api.nvim_clear_autocmds({group = augroup, buffer = buffer})
vim.api.nvim_create_autocmd("BufWritePre", {
group = augroup,
buffer = buffer,
callback = function()
vim.lsp.buf.formatting_sync()
end,
})
end
end,
})--]]
EOF
lua <<EOF
@ -170,9 +169,16 @@ local feedkey = function(key, mode)
end
local mapping = {
["<C-Space>"] = cmp.mapping.complete(),
["<CR>"] = cmp.mapping.confirm({behavior = cmp.ConfirmBehavior.Insert, select = true}),
["<Tab>"] = cmp.mapping(function(fallback)
["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), {"i", "s", "c"}),
["<CR>"] = cmp.mapping(function(fallback)
local entry = cmp.get_selected_entry()
if entry then
cmp.confirm({behavior = cmp.ConfirmBehavior.Insert, select = true})
else
fallback()
end
end, {"i", "s", "c"}),
["<C-f>"] = cmp.mapping(function(fallback)
-- This little snippet will confirm with tab, and if no entry is selected, will confirm the first item
if cmp.visible() then
local entry = cmp.get_selected_entry()
@ -184,8 +190,11 @@ local mapping = {
else
fallback()
end
end, {"i", "s"}),
["<Esc>"] = cmp.mapping.abort(),
end, {"i", "s", "c"}),
["<Tab>"] = cmp.mapping(cmp.mapping.abort(), {"i", "s", "c"}),
["<Esc>"] = cmp.mapping(cmp.mapping.abort(), {"i", "s", "c"}),
["<Down>"] = cmp.mapping(cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Select }), {"i", "s", "c"}),
["<Up>"] = cmp.mapping(cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Select }), {"i", "s", "c"}),
}
cmp.setup(
@ -203,7 +212,7 @@ cmp.setup(
},
{
{name = "buffer"},
{name = "path"},
{name = "path"},
}
),
}
@ -225,7 +234,7 @@ cmp.setup.cmdline(
{
sources = {
{name = "cmdline_history"},
{name = "buffer"},
{name = "buffer"}
},
mapping = cmp.mapping.preset.insert(mapping),
}
@ -239,42 +248,45 @@ lspconfig.eslint.setup(
capabilities = capabilities,
}
)
lspconfig.tsserver.setup(
--[[lspconfig.tsserver.setup(
{
capabilities = capabilities,
}
)
)--]]
EOF
" tre
let g:NERDTreeGitStatusIndicatorMapCustom = {
\ 'Modified' :'U',
\ 'Staged' :'A',
\ 'Untracked' :'',
\ 'Renamed' :'R',
\ 'Unmerged' :'M',
\ 'Deleted' :'D',
\ 'Dirty' :'',
\ 'Ignored' :'I',
\ 'Clean' :'',
\ 'Unknown' :'?',
\ }
"let g:NERDTreeGitStatusIndicatorMapCustom = {
" \ 'Modified' :'U',
" \ 'Staged' :'A',
" \ 'Untracked' :'',
" \ 'Renamed' :'R',
" \ 'Unmerged' :'M',
" \ 'Deleted' :'D',
" \ 'Dirty' :'',
" \ 'Ignored' :'I',
" \ 'Clean' :'',
" \ 'Unknown' :'?',
" \ }
" keys
tnoremap <Esc> <C-\><C-n>
map! <silent> <C-f> <C-i>
map! <silent> <Tab> <Esc>
cnoremap <silent> <Tab> <C-c>
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>
nnoremap <silent> <C-b> :NERDTreeToggle<CR>
nnoremap <silent> <C-t> :SymbolsOutline<CR>
"nnoremap <silent> <C-b> :NERDTreeToggle<CR>
"nnoremap <silent> <C-t> :SymbolsOutline<CR>
":lua require'bufferline.state'.set_offset(require'nvim-tree.view'.win_open() and 30 or 0)<CR>
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>": "\<S-Tab>"
"inoremap <expr> <C-f> pumvisible() ? "\<C-n>" : "\<Tab>"
"inoremap <expr> <C-S-f> pumvisible() ? "\<C-p>": "\<S-Tab>"
" barbar keys
" Move to previous/next
@ -299,39 +311,12 @@ nnoremap <silent> <A-p> :BufferPin<CR>
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 = [
\ '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],
\]
execute join(l:hl_string, ' ')
endfunction
hi Normal ctermbg=NONE
hi LineNr ctermfg=7
hi CursorLineNr ctermfg=1 ctermbg=0
hi CursorLine cterm=NONE ctermfg=NONE ctermbg=0
hi StatusLine ctermbg=2 ctermfg=0
hi StatusLineNC ctermbg=7 ctermfg=0
hi StatusLine ctermfg=2 ctermbg=8 cterm=NONE
hi StatusLineNC ctermfg=7 ctermbg=0 cterm=NONE
hi VertSplit ctermbg=0 ctermfg=0
hi ExtraWhitespace ctermbg=1
hi SignColumn ctermbg=8
@ -365,39 +350,12 @@ hi LspDiagnosticsDefaultInformation ctermfg=7
hi ALEErrorSign ctermfg=1
hi ALEWarningSign ctermfg=3
"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)
" 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
hi StatusLineEmpty ctermbg=8 ctermfg=2
"call s:h('StatusLineMode', g:amora#palette.bgdark, g:amora#palette.red)
"call s:h('StatusLineGitBranch', g:amora#palette.bgdark, g:amora#palette.pink)
@ -438,7 +396,6 @@ set statusline+=%#StatusLineGitBranch#
set statusline+=%{GitBranch()}
set statusline+=%*
set statusline+=\ %f
set statusline+=%#StatusLineEmpty#
set statusline+=\ %m%r
set statusline+=%=
set statusline+=%#StatusLineChar#