More linux friendly, lunarvim, zsh fixes
This commit is contained in:
parent
057c5753a7
commit
73d2dd1248
4 changed files with 17 additions and 313 deletions
4
.zshrc
4
.zshrc
|
@ -1,3 +1,5 @@
|
|||
source <(curl -sL init.zshell.dev); zzinit
|
||||
|
||||
# Vim key bindings
|
||||
bindkey -v
|
||||
|
||||
|
@ -22,8 +24,6 @@ zi light spaceship-prompt/spaceship-prompt
|
|||
zi ice depth=1
|
||||
zi light jeffreytse/zsh-vi-mode
|
||||
zi ice as"program" pick"bin/git-dsf"
|
||||
zi light z-shell/zsh-diff-so-fancy
|
||||
ZSH_BITWARDEN_COPY_CMD=pbcopy
|
||||
#zi ice depth"1"
|
||||
#zi light romkatv/powerlevel10k
|
||||
|
||||
|
|
29
README.md
29
README.md
|
@ -1,18 +1,19 @@
|
|||
# Gaiety's Dotfiles
|
||||
|
||||
Designed for MacOS.
|
||||
Designed for Unix Systems.
|
||||
|
||||
## Setup
|
||||
* [Install asdf](https://asdf-vm.com/#/core-manage-asdf) version manager `brew install asdf`
|
||||
* `brew install ripgrep`
|
||||
* `brew install iterm2` (a color theme is in the root directory, feel free to import it in preferences
|
||||
* `brew install neovim`
|
||||
* `brew install fzf` & `$(brew --prefix)/opt/fzf/install`
|
||||
* `sh -c "$(curl -fsSL https://git.io/get-zi)" --`
|
||||
|
||||
```sh
|
||||
npm i -g pyright
|
||||
sh init
|
||||
```
|
||||
|
||||
First time neovim `nvim` loads it will not be happy haha, so run `:PlugInstall`.
|
||||
* Install a nice terminal
|
||||
* iterm2 for MacOS (via [brew](https://docs.brew.sh/Installation)) `brew install iterm2` (a color theme is in the root directory, feel free to import it in preferences)
|
||||
* [Terminology for Linux](https://www.enlightenment.org/about-terminology.md)
|
||||
* [Install asdf](https://asdf-vm.com/#/core-manage-asdf) version manager, configure with tools you'll need
|
||||
* Install [NeoVim](https://neovim.io/)
|
||||
* Install [LunarVim](https://www.lunarvim.org/) (`lvim` to run)
|
||||
* Install fzf
|
||||
```bash
|
||||
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
|
||||
~/.fzf/install
|
||||
```
|
||||
* ZSH
|
||||
* Verify ZSH is installed
|
||||
* Install zi `sh -c "$(curl -fsSL https://git.io/get-zi)" --`
|
||||
|
|
6
init
6
init
|
@ -1,6 +0,0 @@
|
|||
BASEDIR=$(cd $(dirname $0) && pwd)
|
||||
|
||||
mkdir -p ~/.config/nvim
|
||||
ln -sf $BASEDIR/nvim/init.vim ~/.config/nvim/init.vim
|
||||
|
||||
echo source $BASEDIR/.zshrc >> ~/.zshrc
|
291
nvim/init.vim
291
nvim/init.vim
|
@ -1,291 +0,0 @@
|
|||
"" Encoding
|
||||
set encoding=utf8
|
||||
|
||||
"" Disable modeline
|
||||
set nomodeline
|
||||
|
||||
"" System undo levels
|
||||
set undofile
|
||||
set undolevels=100
|
||||
|
||||
" Line Numbers
|
||||
set number
|
||||
set relativenumber
|
||||
|
||||
"" Stop word wrapping
|
||||
set nowrap
|
||||
|
||||
"" Hide Buffers
|
||||
set hidden
|
||||
|
||||
"" Statusline
|
||||
set laststatus=0
|
||||
|
||||
"" Top/Bottom scroll padding
|
||||
set scrolloff=3
|
||||
set sidescrolloff=5
|
||||
|
||||
" Syntax Colors
|
||||
set termguicolors
|
||||
|
||||
" Misc
|
||||
set title
|
||||
|
||||
" Indentation
|
||||
set softtabstop=2
|
||||
set tabstop=2
|
||||
set shiftwidth=2
|
||||
set autoindent
|
||||
|
||||
" Syntax
|
||||
syntax on
|
||||
|
||||
" Save on close
|
||||
set confirm
|
||||
|
||||
" Use system clipboard
|
||||
set clipboard=unnamedplus
|
||||
|
||||
" Faster scrolling
|
||||
set ttyfast
|
||||
|
||||
" Search
|
||||
set hlsearch
|
||||
set smartcase
|
||||
set showmatch
|
||||
|
||||
" Undo
|
||||
set undolevels=1000
|
||||
|
||||
" Filetypes
|
||||
filetype plugin on
|
||||
|
||||
" auto-install vim-plug
|
||||
if empty(glob('~/.config/nvim/autoload/plug.vim'))
|
||||
silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs
|
||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
autocmd VimEnter * PlugInstall
|
||||
autocmd VimEnter * PlugInstall | source $MYVIMRC
|
||||
endif
|
||||
|
||||
call plug#begin('~/.config/nvim/autoload/plugged')
|
||||
" LSP Support
|
||||
Plug 'neovim/nvim-lspconfig'
|
||||
Plug 'williamboman/nvim-lsp-installer'
|
||||
|
||||
" Autocompletion
|
||||
Plug 'hrsh7th/nvim-cmp'
|
||||
Plug 'hrsh7th/cmp-buffer'
|
||||
Plug 'hrsh7th/cmp-path'
|
||||
Plug 'saadparwaiz1/cmp_luasnip'
|
||||
Plug 'hrsh7th/cmp-nvim-lsp'
|
||||
Plug 'hrsh7th/cmp-nvim-lua'
|
||||
|
||||
" Snippets
|
||||
Plug 'L3MON4D3/LuaSnip'
|
||||
Plug 'rafamadriz/friendly-snippets'
|
||||
|
||||
" Emmet Completion
|
||||
Plug 'mattn/emmet-vim'
|
||||
|
||||
Plug 'VonHeikemen/lsp-zero.nvim'
|
||||
|
||||
Plug 'nvim-treesitter/nvim-treesitter', { 'do': ':TSUpdate' }
|
||||
Plug 'sheerun/vim-polyglot'
|
||||
Plug 'nvim-lua/plenary.nvim'
|
||||
|
||||
Plug 'nvim-telescope/telescope.nvim'
|
||||
|
||||
Plug 'BurntSushi/ripgrep'
|
||||
Plug 'sharkdp/fd'
|
||||
|
||||
Plug 'baliestri/aura-theme', { 'branch': 'feat/neovim-port', 'rtp': 'packages/neovim' }
|
||||
|
||||
Plug 'lukelbd/vim-toggle'
|
||||
|
||||
Plug 'kyazdani42/nvim-tree.lua'
|
||||
|
||||
Plug 'preservim/nerdcommenter'
|
||||
|
||||
Plug 'akinsho/bufferline.nvim', { 'tag': '*' }
|
||||
|
||||
Plug 'voldikss/vim-floaterm'
|
||||
Plug 'skywind3000/asyncrun.vim'
|
||||
|
||||
Plug 'vim-test/vim-test'
|
||||
|
||||
Plug 'folke/which-key.nvim'
|
||||
|
||||
Plug 'mhinz/vim-startify'
|
||||
|
||||
Plug 'lewis6991/gitsigns.nvim'
|
||||
|
||||
Plug 'lukas-reineke/indent-blankline.nvim'
|
||||
|
||||
Plug 'xiyaowong/nvim-cursorword'
|
||||
call plug#end()
|
||||
|
||||
" Use aura theme installed above
|
||||
colorscheme aura-soft-dark
|
||||
|
||||
" - Core Key Bindings -
|
||||
"" Map Leader to spacebar
|
||||
let mapleader=" "
|
||||
|
||||
"" Shortcut to save
|
||||
nnoremap <Leader>s :w<CR>
|
||||
|
||||
"" Shortcut to close buffer
|
||||
nnoremap <Leader>w :bd<CR>
|
||||
|
||||
"" Moving current lines up/down
|
||||
nnoremap <Leader>k :<c-u>execute 'move -1-'. v:count1<cr>
|
||||
nnoremap <Leader>j :<c-u>execute 'move +'. v:count1<cr>
|
||||
|
||||
"" Buffers Next/Previous
|
||||
nnoremap <Tab> :bnext<CR>
|
||||
nnoremap <S-Tab> :bprev<CR>
|
||||
"" Shortcut to close buffer
|
||||
nnoremap <Esc><Esc> :bd<CR>
|
||||
"" Shortcut to reopen closed buffer
|
||||
nmap <Leader><Leader> <c-^>
|
||||
"" Toggle
|
||||
let g:toggle_map = '<C-a>'
|
||||
|
||||
"" Tree
|
||||
lua require'nvim-tree'.setup {}
|
||||
let g:nvim_tree_icons = {
|
||||
\ 'default': "",
|
||||
\ 'symlink': "",
|
||||
\ 'git': {
|
||||
\ 'unstaged': "✗",
|
||||
\ 'staged': "✓",
|
||||
\ 'unmerged': "",
|
||||
\ 'renamed': "➜",
|
||||
\ 'untracked': "★",
|
||||
\ 'deleted': "R",
|
||||
\ 'ignored': "◌"
|
||||
\ },
|
||||
\ 'folder': {
|
||||
\ 'arrow_open': ">",
|
||||
\ 'arrow_closed': "<",
|
||||
\ 'default': "",
|
||||
\ 'open': "",
|
||||
\ 'empty': "=",
|
||||
\ 'empty_open': "==",
|
||||
\ 'symlink': "-",
|
||||
\ 'symlink_open': "--",
|
||||
\ }
|
||||
\ }
|
||||
nnoremap <Leader><Tab> :NvimTreeToggle<CR>
|
||||
|
||||
"" Telescope
|
||||
nnoremap <leader>ff <cmd>Telescope find_files<cr>
|
||||
nnoremap <leader>fb <cmd>Telescope buffers<cr>
|
||||
nnoremap <leader>fs <cmd>Telescope spell_suggest<cr>
|
||||
nnoremap <leader>fr <cmd>Telescope registers<cr>
|
||||
nnoremap <leader>fo <cmd>Telescope oldfiles<cr>
|
||||
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
|
||||
nnoremap <leader>/ <cmd>Telescope current_buffer_fuzzy_find<cr>
|
||||
|
||||
" Bufferline
|
||||
lua << EOF
|
||||
require("bufferline").setup {
|
||||
options = {
|
||||
show_buffer_close_icons = false,
|
||||
diagnostics = "nvim_lsp"
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
" Floating Terminal
|
||||
nnoremap <leader>` <cmd>:FloatermToggle<cr>
|
||||
|
||||
" Async Run (:AsyncRun)
|
||||
let g:asyncrun_open=1
|
||||
nnoremap <leader>a :AsyncRun -mode=term -pos=floaterm
|
||||
nnoremap <leader>ga <cmd>:AsyncRun -mode=term -pos=floaterm git add -p<cr>
|
||||
nnoremap <leader>gc :AsyncRun -mode=term -pos=floaterm git commit -m ""
|
||||
|
||||
" LSP Zero
|
||||
lua << EOF
|
||||
require'lspconfig'.pyright.setup{}
|
||||
local lsp = require('lsp-zero')
|
||||
|
||||
lsp.preset('recommended')
|
||||
lsp.setup()
|
||||
EOF
|
||||
|
||||
" vim-test
|
||||
let test#strategy = "floaterm"
|
||||
nmap <silent> <leader>t :TestNearest<CR>
|
||||
nmap <silent> <leader>T :TestFile<CR>
|
||||
nmap <silent> <leader>ts :TestSuite<CR>
|
||||
nmap <silent> <leader>tl :TestLast<CR>
|
||||
nmap <silent> <leader>tv :TestVisit<CR>
|
||||
|
||||
" which-key
|
||||
nmap <silent> <leader>? :WhichKey<CR>
|
||||
lua << EOF
|
||||
require("which-key").setup {}
|
||||
EOF
|
||||
|
||||
"" vim-startify
|
||||
let g:startify_custom_header = [
|
||||
\ 'Gaiety | 2022',
|
||||
\ '▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄',
|
||||
\ '██░▄▄▀█░▄▄█░▄▀▄░█▀▄▄▀█░▄▄▄█▀▄▄▀█░▄▄▀█░▄▄▄█▀▄▄▀█░▄▄▀██',
|
||||
\ '██░██░█░▄▄█░█▄█░█░██░█░█▄▀█░██░█░▀▀▄█░█▄▀█░██░█░██░██',
|
||||
\ '██░▀▀░█▄▄▄█▄███▄██▄▄██▄▄▄▄██▄▄██▄█▄▄█▄▄▄▄██▄▄██▄██▄██',
|
||||
\ '▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀',
|
||||
\ '',
|
||||
\ 'MAPPING ACTION',
|
||||
\ '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━',
|
||||
\ '<Space> Leader',
|
||||
\ '<Leader>? List Bindings',
|
||||
\ '',
|
||||
\ ]
|
||||
let g:startify_change_to_dir = 0
|
||||
|
||||
" gitsigns
|
||||
lua << EOF
|
||||
require('gitsigns').setup()
|
||||
EOF
|
||||
|
||||
" indent-blankline
|
||||
lua << EOF
|
||||
vim.opt.termguicolors = true
|
||||
vim.cmd [[highlight IndentBlanklineIndent1 guifg=#56B6C2 gui=nocombine]]
|
||||
vim.cmd [[highlight IndentBlanklineIndent2 guifg=#61AFEF gui=nocombine]]
|
||||
vim.cmd [[highlight IndentBlanklineIndent3 guifg=#C678DD gui=nocombine]]
|
||||
vim.cmd [[highlight IndentBlanklineIndent4 guifg=#E5C07B gui=nocombine]]
|
||||
vim.cmd [[highlight IndentBlanklineIndent5 guifg=#98C379 gui=nocombine]]
|
||||
-- vim.opt.list = true
|
||||
-- vim.opt.listchars:append("space:⋅")
|
||||
-- vim.opt.listchars:append("eol:↴")
|
||||
|
||||
require("indent_blankline").setup {
|
||||
-- space_char_blankline = " ",
|
||||
char_highlight_list = {
|
||||
"IndentBlanklineIndent1",
|
||||
"IndentBlanklineIndent2",
|
||||
"IndentBlanklineIndent3",
|
||||
"IndentBlanklineIndent4",
|
||||
"IndentBlanklineIndent5",
|
||||
},
|
||||
}
|
||||
EOF
|
||||
|
||||
" nvim-treesitter
|
||||
lua << EOF
|
||||
local configs = require'nvim-treesitter.configs'
|
||||
configs.setup {
|
||||
ensure_installed = "maintained",
|
||||
highlight = {
|
||||
enable = true,
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
" Comment italics
|
||||
highlight TSComment cterm=italic gui=italic
|
Loading…
Add table
Reference in a new issue