let g:loaded_netrw = 1 let g:loaded_netrwPlugin = 1 if filereadable('/etc/hostname') let hostname=join(readfile('/etc/hostname')) else let hostname='unknown' endif call plug#begin() if filereadable(printf('%s/.config/nvim/local-plug.vim', $HOME)) exec "source " . printf('%s/.config/nvim/local-plug.vim', $HOME) endif Plug 'dylnmc/synstack.vim' Plug 'folke/trouble.nvim' Plug 'google/vim-codefmt' Plug 'google/vim-glaive' Plug 'google/vim-maktaba' Plug 'hrsh7th/cmp-buffer' Plug 'hrsh7th/cmp-nvim-lsp' Plug 'hrsh7th/cmp-nvim-lua' Plug 'hrsh7th/cmp-path' Plug 'hrsh7th/cmp-vsnip' Plug 'hrsh7th/nvim-cmp' Plug 'hrsh7th/vim-vsnip' Plug 'kyazdani42/nvim-web-devicons' Plug 'neovim/nvim-lspconfig' Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} Plug 'onsails/lspkind.nvim' Plug 'nvim-tree/nvim-tree.lua' Plug 'vim-airline/vim-airline' Plug 'git://git.josher.dev/fieldmarshal.vim.git' if has('rneovim') Plug 'git://git.josher.dev/rneovim-userregs.git' endif Plug 'git@git.josher.dev:config.vim.git', { 'dir': g:plug_home . '/config.vim' } call plug#end() set termguicolors set shiftwidth=2 set tabstop=2 set expandtab set nowrap set splitright set wildmode=longest,list,full let mapleader=" " noremap % v noremap " s noremap Y y$ augroup InitVim au! autocmd BufRead *.java,*.c,*.cpp,*.cxx TSBufEnable highlight autocmd TermOpen * startinsert augroup END noremap ú FormatCode noremap p (SynStack) " Local configuration that can be set by hostname or just a local " configuration. if isdirectory(printf('%s/.config/nvim/%s', $HOME, hostname)) exec "set rtp+=" . printf('%s/.config/nvim/%s', $HOME, hostname) endif if isdirectory(printf('%s/.config/nvim/local', $HOME)) exec "set rtp+=" . printf('%s/.config/nvim/local', $HOME) endif if filereadable(printf('%s/.config/nvim/%s.vim', $HOME, hostname)) exec "source " . printf('%s/.config/nvim/%s.vim', $HOME, hostname) endif if filereadable(printf('%s/.config/nvim/local.vim', $HOME)) exec "source " . printf('%s/.config/nvim/local.vim', $HOME) endif map nt NvimTreeToggle noremap nE :e =expand('%:h')/ if has('rneovim') hi ColorColumn guifg=#3a3a3a guibg=none gui=None " This is my patched version of neovim. set fillchars+=colorcol:│ augroup InitVim au ColorScheme * hi ColorColumn guifg=#3a3a3a guibg=none gui=None augroup END endif set colorcolumn=81 set textwidth=80 " Opens a terminal in the directory of the current file. command! TERM exec "term sh -c 'cd " . expand('%:p:h') . " && exec $SHELL'" lua << EOF -- CiderLSP vim.opt.completeopt = { "menu", "menuone", "noselect" } require("lsp") require("lspconfig") -- Diagnostics require("diagnostics") require("nvim-tree").setup() EOF