organizing some stufffff

master
Jordan Orelli 2 years ago
parent b29d26f7f8
commit e57e776111

3
.gitmodules vendored

@ -0,0 +1,3 @@
[submodule "Vundle.vim"]
path = Vundle.vim
url = https://github.com/VundleVim/Vundle.vim.git

@ -2,8 +2,8 @@ set nocompatible
" Plugins -------------------------------------------------------------------{{{
" set the runtime path to include Vundle and initialize
if !has('nvim')
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
@ -52,6 +52,7 @@ call vundle#begin()
" Plugin 'prabirshrestha/vim-lsp'
" Plugin 'mattn/vim-lsp-settings'
call vundle#end() " required
endif
" enable the filetype plugin
filetype plugin indent on
@ -230,7 +231,9 @@ if has("autocmd")
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
autocmd FileType python set omnifunc=pythoncomplete#Complete
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
if !has('nvim')
autocmd FileType rust set omnifunc=ale#completion#OmniFunc
endif
" causes VIM to enter the directory of the file being edited to simplify
" finding related files.
@ -400,7 +403,9 @@ let g:terminal_ansi_colors = [
\ '#ffffff'
\ ]
if !has('nvim')
autocmd TerminalOpen * set nonu
endif
highlight Terminal guibg='#0c0c0c'
highlight Terminal guifg='#cccccc'
@ -459,6 +464,7 @@ let g:SuperTabClosePreviewOnPopupClose = 1
" ---------------------------------------------------------------------------}}}
" ALE -----------------------------------------------------------------------{{{
if !has('nvim')
let g:ale_linters = {'rust': ['analyzer']}
let g:ale_fixers = {'rust': ['rustfmt', 'trim_whitespace', 'remove_trailing_lines']}
let g:rustfmt_autosave = 1
@ -466,6 +472,7 @@ let g:ale_rust_analyzer_executable = "/home/jorelli/analyzer-spy"
let g:ale_rust_cargo_use_clippy = executable('cargo-clippy')
let g:ale_completion_enabled = 1
set completeopt=menu,menuone,preview,noselect,noinsert
endif
" ---------------------------------------------------------------------------}}}
" CtrlP ---------------------------------------------------------------------{{{

@ -0,0 +1,24 @@
# dotfiles
my preferences files
## setup
The way this repo is setup is that the .dotfiles directory is expected to be
the authoritative storage of all of the preferences file on a given machine.
The `install` script creates the necessary symlinks for these preference files
to be seen by the appropriate applications.
## sharing between WSL and Windows
If you want to use this repo to manage the preferences file of both a WSL
instance and its Windows host, clone this repo on WSL and then symlink the
directory into the home directory of the Windows host like so:
C:\Users\Name>mklink /D .dotfiles \\wsl$\instance\home\name\.dotfiles
You can then navigate into the Linux directory from Windows, either on the
command line or in Explorer.exe. Using an administrator shell, run the install
script from the Windows side. Windows requires admin privileges in order to
make symbolic links, so you need an admin shell to register new links on
Windows.

@ -0,0 +1 @@
Subproject commit b255382d6242d7ea3877bf059d2934125e0c4d95

@ -24,3 +24,4 @@ nvim/init.vim=.config/nvim/init.vim
# placed on windows, relative to the user's home directory
[map.windows]
nvim/init.vim=AppData/Local/nvim/init.vim
Vundle.vim=AppData/Local/nvim/bundle/Vundle.vim

@ -1,15 +0,0 @@
{
"home_files": [
".bash_profile",
".bashrc",
".screenrc",
".tmux.conf",
".vimrc",
".config/htop/htoprc",
".config/lazydocker/config.yml"
],
"home_dirs": [
".vim/pack",
".vim/ftplugin"
]
}

@ -66,7 +66,7 @@ class Installer:
print(f"source path: {source_path}")
print(f"source drive: {source_path.drive}")
if not source_path.exists():
print('skip: no such file')
print("skip: no such file\n")
return
for target in self.targets:

@ -70,5 +70,7 @@ class Options:
with open(path, 'r', encoding='utf-8') as config_file:
parser = configparser.ConfigParser()
# make keys case-sensitive
parser.optionxform = str
parser.read_file(config_file)
self._config = parser

@ -53,7 +53,7 @@ class Target:
if target_path.is_symlink():
print("target path is symlink")
if target_path.resolve() == source_path:
print("symlink is up to date")
print("symlink is up to date\n")
return
print("removing out of date symlink")
target_path.unlink()
@ -61,7 +61,7 @@ class Target:
print("removing existing regular file")
target_path.unlink()
elif target_path.is_dir():
print("skip: target path is existing directory")
print("skip: target path is existing directory\n")
return
else:
print("skip: target path already exists")
@ -77,6 +77,7 @@ class Target:
target_path.unlink()
print("creating symlink")
target_path.symlink_to(source_path)
print("")
class Linux(Target):
"""
@ -146,3 +147,4 @@ class WSLHost(Target):
print("target path does not exist")
print("copying file to target")
clone(source_path, target_path)
print("")

@ -1,3 +1,34 @@
set nocompatible
filetype off
if has('win32')
set rtp+=~/AppData/Local/nvim/bundle/Vundle.vim
else
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
endif
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'tpope/vim-fugitive' " integration with the git cli
Plugin 'tpope/vim-surround' " edits surrounding quotes and parens and the like
Plugin 'mhinz/vim-signify'
Plugin 'fatih/vim-go' " all-in-one Go tools
Plugin 'fatih/vim-hclfmt' " nicely formats hcl files
Plugin 'nanotech/jellybeans.vim' " the best colorscheme
Plugin 'ervandew/supertab' " makes tab better apparently
Plugin 'scrooloose/nerdcommenter' " no idea if I'm even using this
Plugin 'scrooloose/nerdtree' " better file navigation
Plugin 'Align' " aligns things on demand
Plugin 'itchyny/lightline.vim' " fancy status line
Plugin 'hashivim/vim-terraform' " hclfmt but for terraform
Plugin 'Glench/Vim-Jinja2-Syntax' " jinja2 syntax stuff
Plugin 'rust-lang/rust.vim' " bare minimum rust syntax stuff
call vundle#end()
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
filetype plugin indent on
source ~/.vimrc

Loading…
Cancel
Save