" (_) " __ ___ _ __ ___ _ __ ___ " \ \ / / | '_ ` _ \| '__/ __| " \ V /| | | | | | | | | (__ " \_/ |_|_| |_| |_|_| \___| syntax on " theme lua << EOF vim.o.background = 'dark' require('solarized').setup { -- theme = 'neo'; theme = 'default'; -- highlights = function (colors, colorhelper) -- return { -- " Folded = { underline = false, fg = colors.base3, bg = colors.base03 } -- } -- end } vim.cmd("colorscheme solarized") EOF " plugins call plug#begin('~/.vim/plugged') Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } Plug 'junegunn/fzf.vim' Plug 'airblade/vim-gitgutter' Plug 'godlygeek/tabular' Plug 'itchyny/lightline.vim' Plug 'jgdavey/tslime.vim' Plug 'justinmk/vim-dirvish' Plug 'tpope/vim-commentary' Plug 'tpope/vim-fugitive' Plug 'tpope/vim-surround' Plug 'github/copilot.vim', {'branch': 'release'} Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} Plug 'neovim/nvim-lspconfig' call plug#end() " options set autoindent " take indent for new line from previous line set backspace=eol,start,indent " how backspace works at start of line set breakindent " wrapped line repeats indent set breakindentopt=shift:3,min:40,sbr " settings for 'breakindent' set colorcolumn=80 " columns to highlight set comments=b:# " patterns that can start a comment line set completeopt=noinsert,menuone,noselect " options for Insert mode completion set completeopt=noinsert,menuone,noselect " options for Insert mode completion set cursorline " highlight the screen line of the cursor " set foldenable " set to display all folds open " set foldopen-=block " for which commands a fold will be opened set foldmethod=expr set foldexpr=nvim_treesitter#foldexpr() " expression used to determine fold level " set foldmethod=marker set nofoldenable " disable folding at startup. set foldtext=FoldText() " expression used to display for a closed fold set formatoptions-=cro " how automatic formatting is to be done set hlsearch " highlight matches with last search pattern set ignorecase " ignore case in search patterns set incsearch " highlight match while typing search pattern set linebreak " wrap long lines at a blank set listchars+=space:. " characters for displaying in list mode set matchtime=2 " tenths of a second to show matching paren set modeline " recognize modelines at start or end of file set noexpandtab " (don't) use spaces when is inserted set number " print the line number in front of each line set runtimepath+=~/.vim/after " list of directories used for runtime files set runtimepath-=~/.vim/after " list of directories used for runtime files set shiftwidth=4 " number of spaces to use for (auto)indent step set shortmess+=c " list of flags, reduce length of messages set smartcase " no ignore case when pattern has uppercase set softtabstop=4 " number of spaces that uses while editing set splitbelow " new window from split is below the current one set splitright " new window is put right of the current one set tabstop=4 " number of spaces that in file uses set updatetime=300 " after this many milliseconds flush swap file set visualbell " use visual bell instead of beeping set whichwrap+=<,>,h,l " allow specified keys to cross line boundaries set wrap " long lines wrap and continue on the next line function! FoldText() return repeat(" ", indent(v:foldstart)) . trim(getline(v:foldstart))[0:-1] . " +" . repeat(" ", winwidth(0)) endfunction " variables if exists('$VIRTUAL_ENV') let g:python3_host_prog = $VIRTUAL_ENV . '/bin/python' else let g:python3_host_prog= $HOME . "/.env/bin/python" endif let g:lightline = { \ 'colorscheme': 'solarized', \ 'inactive': { \ 'left': [ ['filename'] ], \ 'right': [] \ } \ } let g:ale_lint_on_save = 1 let g:ale_fix_on_save = 0 let g:ale_python_auto_virtualenv = 1 let g:python_highlight_all = 1 let g:tslime_always_current_session = 1 let g:tslime_always_current_window = 1 " mappings nnoremap x ((foldclosed('.')==-1)?('x'):('zo0x')) nnoremap nnoremap nnoremap nnoremap nnoremap = = tnoremap inoremap pumvisible() ? "\" : "\" inoremap pumvisible() ? "\" : "\" nmap (dirvish_up) nmap vmap nmap vmap nnoremap gn :GitGutterNextHunk nnoremap gp :GitGutterPrevHunk nnoremap gv :Gvdiffsplit nnoremap an :ALENext nnoremap ap :ALEPrevious inoremap (pumvisible() ? "\\" : "\") nnoremap n nnoremap N nnoremap / :execute "normal! mf"/ nnoremap :noh nnoremap go :noh`f vmap SendSelectionToTmux nmap NormalModeSendToTmux nmap r SetTmuxVars " autocommands augroup CursorLineOnlyInActiveWindow autocmd! autocmd VimEnter,WinEnter,BufWinEnter * setlocal cursorline autocmd WinLeave * setlocal nocursorline augroup END augroup dirvish_config autocmd! autocmd FileType dirvish \ nmap o (dovish_create_file) \ | nmap O (dovish_create_file) \ | nmap dd (dovish_delete) \ | nmap c (dovish_rename) \ | nmap yy (dovish_yank) \ | xmap yy (dovish_yank) \ | nmap p (dovish_copy) augroup END " Enable Treesitter lua << EOF require'nvim-treesitter.configs'.setup { ensure_installed = { "javascript", "python", }, highlight = { enable = true, }, } EOF " Enable LSP lua << EOF local lspconfig = require('lspconfig') lspconfig.gopls.setup{} lspconfig.jedi_language_server.setup{} EOF let g:gsed_command = '/Users/gl6/.homebrew/bin/gsed'