From 73d2dd1248f07e2d3cddeb1882396762f3e92920 Mon Sep 17 00:00:00 2001 From: Ava Gaiety W Date: Sat, 17 Feb 2024 12:35:33 -0600 Subject: [PATCH] More linux friendly, lunarvim, zsh fixes --- .zshrc | 4 +- README.md | 29 ++--- init | 6 -- nvim/init.vim | 291 -------------------------------------------------- 4 files changed, 17 insertions(+), 313 deletions(-) delete mode 100644 init delete mode 100644 nvim/init.vim diff --git a/.zshrc b/.zshrc index f8396d2..1a4a517 100644 --- a/.zshrc +++ b/.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 diff --git a/README.md b/README.md index 5d4b2f2..b3865a9 100644 --- a/README.md +++ b/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)" --` diff --git a/init b/init deleted file mode 100644 index 78b5244..0000000 --- a/init +++ /dev/null @@ -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 diff --git a/nvim/init.vim b/nvim/init.vim deleted file mode 100644 index d00ece7..0000000 --- a/nvim/init.vim +++ /dev/null @@ -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 s :w - -"" Shortcut to close buffer -nnoremap w :bd - -"" Moving current lines up/down -nnoremap k :execute 'move -1-'. v:count1 -nnoremap j :execute 'move +'. v:count1 - -"" Buffers Next/Previous -nnoremap :bnext -nnoremap :bprev - "" Shortcut to close buffer - nnoremap :bd - "" Shortcut to reopen closed buffer - nmap -"" Toggle -let g:toggle_map = '' - -"" 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 :NvimTreeToggle - -"" Telescope -nnoremap ff Telescope find_files -nnoremap fb Telescope buffers -nnoremap fs Telescope spell_suggest -nnoremap fr Telescope registers -nnoremap fo Telescope oldfiles -nnoremap fg Telescope live_grep -nnoremap / Telescope current_buffer_fuzzy_find - -" Bufferline -lua << EOF - require("bufferline").setup { - options = { - show_buffer_close_icons = false, - diagnostics = "nvim_lsp" - } - } -EOF - -" Floating Terminal -nnoremap ` :FloatermToggle - -" Async Run (:AsyncRun) -let g:asyncrun_open=1 -nnoremap a :AsyncRun -mode=term -pos=floaterm -nnoremap ga :AsyncRun -mode=term -pos=floaterm git add -p -nnoremap 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 t :TestNearest -nmap T :TestFile -nmap ts :TestSuite -nmap tl :TestLast -nmap tv :TestVisit - -" which-key -nmap ? :WhichKey -lua << EOF - require("which-key").setup {} -EOF - -"" vim-startify -let g:startify_custom_header = [ - \ 'Gaiety | 2022', - \ '▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄', - \ '██░▄▄▀█░▄▄█░▄▀▄░█▀▄▄▀█░▄▄▄█▀▄▄▀█░▄▄▀█░▄▄▄█▀▄▄▀█░▄▄▀██', - \ '██░██░█░▄▄█░█▄█░█░██░█░█▄▀█░██░█░▀▀▄█░█▄▀█░██░█░██░██', - \ '██░▀▀░█▄▄▄█▄███▄██▄▄██▄▄▄▄██▄▄██▄█▄▄█▄▄▄▄██▄▄██▄██▄██', - \ '▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀', - \ '', - \ 'MAPPING ACTION', - \ '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━', - \ ' 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