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

125
.vimrc

@ -2,56 +2,57 @@ set nocompatible
" Plugins -------------------------------------------------------------------{{{ " Plugins -------------------------------------------------------------------{{{
" set the runtime path to include Vundle and initialize " set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim if !has('nvim')
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin() call vundle#begin()
" let Vundle manage Vundle, required " let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim' Plugin 'VundleVim/Vundle.vim'
Plugin 'dense-analysis/ale' " asynchronous linting engine Plugin 'dense-analysis/ale' " asynchronous linting engine
Plugin 'tpope/vim-fugitive' " integration with the git cli Plugin 'tpope/vim-fugitive' " integration with the git cli
Plugin 'tpope/vim-surround' " edits surrounding quotes and parens and the like Plugin 'tpope/vim-surround' " edits surrounding quotes and parens and the like
Plugin 'tpope/vim-rails' " rails project management stuff Plugin 'tpope/vim-rails' " rails project management stuff
Plugin 'tpope/vim-repeat' " fixes the . key for ...something Plugin 'tpope/vim-repeat' " fixes the . key for ...something
" Plugin 'airblade/vim-gitgutter' " in-file git integration " Plugin 'airblade/vim-gitgutter' " in-file git integration
Plugin 'mhinz/vim-signify' Plugin 'mhinz/vim-signify'
Plugin 'slim-template/vim-slim' " what in the 2008 is this Plugin 'slim-template/vim-slim' " what in the 2008 is this
Plugin 'kchmck/vim-coffee-script' " lol coffee script Plugin 'kchmck/vim-coffee-script' " lol coffee script
Plugin 'fatih/vim-go' " all-in-one Go tools Plugin 'fatih/vim-go' " all-in-one Go tools
Plugin 'fatih/vim-hclfmt' " nicely formats hcl files Plugin 'fatih/vim-hclfmt' " nicely formats hcl files
Plugin 'nanotech/jellybeans.vim' " the best colorscheme Plugin 'nanotech/jellybeans.vim' " the best colorscheme
Plugin 'ervandew/supertab' " makes tab better apparently Plugin 'ervandew/supertab' " makes tab better apparently
Plugin 'scrooloose/nerdcommenter' " no idea if I'm even using this Plugin 'scrooloose/nerdcommenter' " no idea if I'm even using this
Plugin 'scrooloose/nerdtree' " better file navigation Plugin 'scrooloose/nerdtree' " better file navigation
Plugin 'Align' " aligns things on demand Plugin 'Align' " aligns things on demand
Plugin 'tomtom/tlib_vim' " dependency of flashdevelop Plugin 'tomtom/tlib_vim' " dependency of flashdevelop
Plugin 'endel/flashdevelop.vim' " this is probably old now Plugin 'endel/flashdevelop.vim' " this is probably old now
Plugin 'ctrlpvim/ctrlp.vim' " don't actually know how to use this honestly Plugin 'ctrlpvim/ctrlp.vim' " don't actually know how to use this honestly
Plugin 'itchyny/lightline.vim' " fancy status line Plugin 'itchyny/lightline.vim' " fancy status line
Plugin 'heavenshell/vim-jsdoc' " js docs? Plugin 'heavenshell/vim-jsdoc' " js docs?
Plugin 'hashivim/vim-terraform' " hclfmt but for terraform Plugin 'hashivim/vim-terraform' " hclfmt but for terraform
Plugin 'b4b4r07/vim-hcl' " hcl syntax stuff? Plugin 'b4b4r07/vim-hcl' " hcl syntax stuff?
Plugin 'Glench/Vim-Jinja2-Syntax' " jinja2 syntax stuff Plugin 'Glench/Vim-Jinja2-Syntax' " jinja2 syntax stuff
Plugin 'rust-lang/rust.vim' " bare minimum rust syntax stuff Plugin 'rust-lang/rust.vim' " bare minimum rust syntax stuff
Plugin 'elubow/cql-vim' Plugin 'elubow/cql-vim'
" Past plugins " Past plugins
" "
" Seems to break NERDTree. I dunno why. Kinda problematic since it's " Seems to break NERDTree. I dunno why. Kinda problematic since it's
" intended to improve NERDTree. " intended to improve NERDTree.
" Plugin 'Xuyuanp/nerdtree-git-plugin' " Plugin 'Xuyuanp/nerdtree-git-plugin'
" "
" Still figuring this one out. I think I hate it? " Still figuring this one out. I think I hate it?
" Plugin 'neoclide/coc.nvim' " Plugin 'neoclide/coc.nvim'
" "
" this repo is gone " this repo is gone
" Plugin 'calviken/vim-gdscript3' " Plugin 'calviken/vim-gdscript3'
" "
" I'm trying ALE instead " I'm trying ALE instead
" Plugin 'ycm-core/YouCompleteMe' " Plugin 'ycm-core/YouCompleteMe'
" Plugin 'prabirshrestha/vim-lsp' " Plugin 'prabirshrestha/vim-lsp'
" Plugin 'mattn/vim-lsp-settings' " Plugin 'mattn/vim-lsp-settings'
call vundle#end() " required call vundle#end() " required
endif
" enable the filetype plugin " enable the filetype plugin
filetype plugin indent on filetype plugin indent on
@ -230,7 +231,9 @@ if has("autocmd")
autocmd FileType php set omnifunc=phpcomplete#CompletePHP autocmd FileType php set omnifunc=phpcomplete#CompletePHP
autocmd FileType python set omnifunc=pythoncomplete#Complete autocmd FileType python set omnifunc=pythoncomplete#Complete
autocmd FileType css set omnifunc=csscomplete#CompleteCSS autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType rust set omnifunc=ale#completion#OmniFunc 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 " causes VIM to enter the directory of the file being edited to simplify
" finding related files. " finding related files.
@ -400,7 +403,9 @@ let g:terminal_ansi_colors = [
\ '#ffffff' \ '#ffffff'
\ ] \ ]
autocmd TerminalOpen * set nonu if !has('nvim')
autocmd TerminalOpen * set nonu
endif
highlight Terminal guibg='#0c0c0c' highlight Terminal guibg='#0c0c0c'
highlight Terminal guifg='#cccccc' highlight Terminal guifg='#cccccc'
@ -459,13 +464,15 @@ let g:SuperTabClosePreviewOnPopupClose = 1
" ---------------------------------------------------------------------------}}} " ---------------------------------------------------------------------------}}}
" ALE -----------------------------------------------------------------------{{{ " ALE -----------------------------------------------------------------------{{{
let g:ale_linters = {'rust': ['analyzer']} if !has('nvim')
let g:ale_fixers = {'rust': ['rustfmt', 'trim_whitespace', 'remove_trailing_lines']} let g:ale_linters = {'rust': ['analyzer']}
let g:rustfmt_autosave = 1 let g:ale_fixers = {'rust': ['rustfmt', 'trim_whitespace', 'remove_trailing_lines']}
let g:ale_rust_analyzer_executable = "/home/jorelli/analyzer-spy" let g:rustfmt_autosave = 1
let g:ale_rust_cargo_use_clippy = executable('cargo-clippy') let g:ale_rust_analyzer_executable = "/home/jorelli/analyzer-spy"
let g:ale_completion_enabled = 1 let g:ale_rust_cargo_use_clippy = executable('cargo-clippy')
set completeopt=menu,menuone,preview,noselect,noinsert let g:ale_completion_enabled = 1
set completeopt=menu,menuone,preview,noselect,noinsert
endif
" ---------------------------------------------------------------------------}}} " ---------------------------------------------------------------------------}}}
" CtrlP ---------------------------------------------------------------------{{{ " 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 # placed on windows, relative to the user's home directory
[map.windows] [map.windows]
nvim/init.vim=AppData/Local/nvim/init.vim 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 path: {source_path}")
print(f"source drive: {source_path.drive}") print(f"source drive: {source_path.drive}")
if not source_path.exists(): if not source_path.exists():
print('skip: no such file') print("skip: no such file\n")
return return
for target in self.targets: for target in self.targets:

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

@ -53,7 +53,7 @@ class Target:
if target_path.is_symlink(): if target_path.is_symlink():
print("target path is symlink") print("target path is symlink")
if target_path.resolve() == source_path: if target_path.resolve() == source_path:
print("symlink is up to date") print("symlink is up to date\n")
return return
print("removing out of date symlink") print("removing out of date symlink")
target_path.unlink() target_path.unlink()
@ -61,7 +61,7 @@ class Target:
print("removing existing regular file") print("removing existing regular file")
target_path.unlink() target_path.unlink()
elif target_path.is_dir(): elif target_path.is_dir():
print("skip: target path is existing directory") print("skip: target path is existing directory\n")
return return
else: else:
print("skip: target path already exists") print("skip: target path already exists")
@ -77,6 +77,7 @@ class Target:
target_path.unlink() target_path.unlink()
print("creating symlink") print("creating symlink")
target_path.symlink_to(source_path) target_path.symlink_to(source_path)
print("")
class Linux(Target): class Linux(Target):
""" """
@ -146,3 +147,4 @@ class WSLHost(Target):
print("target path does not exist") print("target path does not exist")
print("copying file to target") print("copying file to target")
clone(source_path, target_path) 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 set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath let &packpath = &runtimepath
filetype plugin indent on
source ~/.vimrc source ~/.vimrc

Loading…
Cancel
Save