Compare commits
14 commits
03fe14895c
...
6b08decfb9
Author | SHA1 | Date | |
---|---|---|---|
6b08decfb9 | |||
884fa0a542 | |||
aefda50590 | |||
09f0985006 | |||
71ab83d8f3 | |||
cf613b3012 | |||
196004e993 | |||
972d5f4524 | |||
e0f813182a | |||
bd05bc392a | |||
fa0e59ea39 | |||
6dc9120dd0 | |||
bb82a7ca75 | |||
f7e802d3f3 |
11 changed files with 145 additions and 6 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -32,3 +32,5 @@ vim/backup/
|
||||||
zsh/cache/
|
zsh/cache/
|
||||||
|
|
||||||
Ansible/*.retry
|
Ansible/*.retry
|
||||||
|
|
||||||
|
Fortune/*.dat
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ ansible_local.xdg.state_home }}/vim"
|
path: "{{ ansible_local.xdg.state_home }}/vim"
|
||||||
owner: "{{ ansible_user_id }}"
|
owner: "{{ ansible_user_id }}"
|
||||||
mode: 0750
|
mode: "0750"
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: "vim : Symlink runtime directory"
|
- name: "vim : Symlink runtime directory"
|
||||||
|
|
16
Fortune/Makefile
Normal file
16
Fortune/Makefile
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
|
||||||
|
STRFILE=strfile
|
||||||
|
|
||||||
|
DATFILES=eryn.dat
|
||||||
|
|
||||||
|
.PHONY: all clean
|
||||||
|
|
||||||
|
%.dat: %
|
||||||
|
$(STRFILE) $^ $@
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
|
all: $(DATFILES)
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
rm -f $(DATFILES)
|
16
Fortune/eryn
Normal file
16
Fortune/eryn
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
Please practice this until you can easily do it.
|
||||||
|
-- Andrej Diamantstein
|
||||||
|
%
|
||||||
|
Easy, isn't it?
|
||||||
|
-- Andrej Diamantstein
|
||||||
|
%
|
||||||
|
TWENTY THREE NINETEEN!!!!
|
||||||
|
%
|
||||||
|
You only have to let the soft animal of your body
|
||||||
|
love what it loves.
|
||||||
|
-- Mary Oliver, Wild Geese
|
||||||
|
%
|
||||||
|
Be a lamp, or a lifeboat, or a ladder
|
||||||
|
help someone’s soul to heal
|
||||||
|
Walk out of your house like a shepherd.
|
||||||
|
-- Rumi, Ode 3090
|
38
config/nvim/UltiSnips/rust.snippets
Normal file
38
config/nvim/UltiSnips/rust.snippets
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
# rust.snippets
|
||||||
|
# vim: set ts=8 sw=8 sts=8 noet list:
|
||||||
|
# Eryn Wells <eryn@erynwells.me>
|
||||||
|
|
||||||
|
snippet nnapp
|
||||||
|
// Eryn Wells <eryn@erynwells.me>
|
||||||
|
|
||||||
|
use nannou::prelude::*;
|
||||||
|
|
||||||
|
struct Model {
|
||||||
|
_window: window::Id,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Model {
|
||||||
|
fn new(app: &App) -> Self {
|
||||||
|
let window = app.new_window().view(view).build().unwrap();
|
||||||
|
Self {
|
||||||
|
_window: window,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn update(app: &App, model: &mut Model, update: Update) {
|
||||||
|
model.update(app, update)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn update(&mut self, app: &App, update: Update) {
|
||||||
|
// TODO: Update the model here.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn view(app: &App, model: &Model, frame: Frame) {
|
||||||
|
// TODO: Draw the view here.
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
nannou::app(Model::new).update(update).run();
|
||||||
|
}
|
||||||
|
endsnippet
|
|
@ -6,7 +6,7 @@ local function init_key_options()
|
||||||
vim.g.mapleader = ","
|
vim.g.mapleader = ","
|
||||||
end
|
end
|
||||||
|
|
||||||
local function navigation_mappings()
|
local function text_navigation_mappings()
|
||||||
local options = { noremap = true }
|
local options = { noremap = true }
|
||||||
|
|
||||||
-- Navigate by soft-wrapped lines using Alt/Option/Meta + jk
|
-- Navigate by soft-wrapped lines using Alt/Option/Meta + jk
|
||||||
|
@ -87,17 +87,22 @@ end
|
||||||
|
|
||||||
local function telescope_mappings()
|
local function telescope_mappings()
|
||||||
local builtin = require('telescope.builtin')
|
local builtin = require('telescope.builtin')
|
||||||
|
|
||||||
map('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
|
map('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
|
||||||
map('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' })
|
map('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' })
|
||||||
map('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' })
|
map('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' })
|
||||||
map('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })
|
map('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })
|
||||||
|
|
||||||
|
if vim.fn.has('gui_running') then
|
||||||
|
map('n', 'D-O', builtin.buffers, { desc = 'Open existing' })
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function init_all_global_keybindings()
|
local function init_all_global_keybindings()
|
||||||
init_key_options()
|
init_key_options()
|
||||||
clipboard_mappings()
|
clipboard_mappings()
|
||||||
window_key_mappings()
|
window_key_mappings()
|
||||||
navigation_mappings()
|
text_navigation_mappings()
|
||||||
diagnostic_mappings()
|
diagnostic_mappings()
|
||||||
telescope_mappings()
|
telescope_mappings()
|
||||||
end
|
end
|
||||||
|
|
|
@ -76,6 +76,11 @@ lspconfig.eslint.setup {
|
||||||
capabilities = cmp_capabilities,
|
capabilities = cmp_capabilities,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lspconfig.ts_ls.setup {
|
||||||
|
on_attach = on_attach,
|
||||||
|
capabilities = cmp_capabilities,
|
||||||
|
}
|
||||||
|
|
||||||
lspconfig.html.setup {
|
lspconfig.html.setup {
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
capabilities = cmp_capabilities,
|
capabilities = cmp_capabilities,
|
||||||
|
@ -115,7 +120,8 @@ lspconfig.rust_analyzer.setup {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
checkOnSave = {
|
checkOnSave = true,
|
||||||
|
check = {
|
||||||
command = 'clippy',
|
command = 'clippy',
|
||||||
extraArgs = {
|
extraArgs = {
|
||||||
"--",
|
"--",
|
||||||
|
|
25
setup.sh
25
setup.sh
|
@ -3,7 +3,23 @@
|
||||||
dotfiles_dir=$(cd "$(dirname "$0")" && pwd)
|
dotfiles_dir=$(cd "$(dirname "$0")" && pwd)
|
||||||
sys=`uname -s | tr A-Z a-z`
|
sys=`uname -s | tr A-Z a-z`
|
||||||
|
|
||||||
skipitems=(setup.sh README.md py bin Alfred Colors Dotfiles LaunchAgents Python '.*\.orig' '.*~')
|
skipitems=( \
|
||||||
|
'.*\.orig' \
|
||||||
|
'.*~' \
|
||||||
|
Alfred \
|
||||||
|
Ansible \
|
||||||
|
bin \
|
||||||
|
Colors \
|
||||||
|
Dotfiles \
|
||||||
|
Fortune \
|
||||||
|
LaunchAgents \
|
||||||
|
py \
|
||||||
|
Python \
|
||||||
|
README.md \
|
||||||
|
setup.sh \
|
||||||
|
Web \
|
||||||
|
Xcode \
|
||||||
|
)
|
||||||
|
|
||||||
function link {
|
function link {
|
||||||
local action
|
local action
|
||||||
|
@ -38,6 +54,11 @@ function matches_skip_item {
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function build_fortunes {
|
||||||
|
echo "Building fortunes file"
|
||||||
|
(cd Fortune && make)
|
||||||
|
}
|
||||||
|
|
||||||
print -P " %BHome:%b $HOME"
|
print -P " %BHome:%b $HOME"
|
||||||
print -P " %BDotfiles:%b $dotfiles_dir"
|
print -P " %BDotfiles:%b $dotfiles_dir"
|
||||||
print -P "%BSkip Items:%b $skipitems\n"
|
print -P "%BSkip Items:%b $skipitems\n"
|
||||||
|
@ -147,4 +168,6 @@ if (( $configure_vim )); then
|
||||||
$VIM +PlugInstall +qall
|
$VIM +PlugInstall +qall
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
build_fortunes
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
31
zsh/func/bool
Normal file
31
zsh/func/bool
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
# Eryn Wells <eryn@erynwells.me>
|
||||||
|
# vim: set ft=zsh:
|
||||||
|
|
||||||
|
function bool {
|
||||||
|
if [[ "$1" =~ '^-?[0-9]+$' ]]; then
|
||||||
|
if (( $1 == 0 )); then
|
||||||
|
echo "no"
|
||||||
|
return 1
|
||||||
|
else
|
||||||
|
echo "yes"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
local lowercase_value=${(L)1}
|
||||||
|
|
||||||
|
if [[ "$lowercase_value" == "yes" || "$lowercase_value" == "true" ]]; then
|
||||||
|
echo "yes"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$lowercase_value" == "no" || "$lowercase_value" == "false" ]]; then
|
||||||
|
echo "no"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "no"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
bool "$@"
|
|
@ -20,7 +20,8 @@ Arguments
|
||||||
---------
|
---------
|
||||||
|
|
||||||
%B-e%b | %B--export%b | %B--no-export%b
|
%B-e%b | %B--export%b | %B--no-export%b
|
||||||
Export the variable after modification.
|
Export the variable after modification. The default is to export if the
|
||||||
|
variable is modified.
|
||||||
|
|
||||||
%B-f%b | %B--force%b
|
%B-f%b | %B--force%b
|
||||||
Unconditionally add the path, even if it doesn't exist.
|
Unconditionally add the path, even if it doesn't exist.
|
||||||
|
|
1
zshrc
1
zshrc
|
@ -21,6 +21,7 @@ fi
|
||||||
|
|
||||||
do_init_functions zsh_init_rc_functions
|
do_init_functions zsh_init_rc_functions
|
||||||
|
|
||||||
|
autoload -Uz bool
|
||||||
autoload -Uz g
|
autoload -Uz g
|
||||||
autoload -Uz nethack
|
autoload -Uz nethack
|
||||||
autoload -Uz pw
|
autoload -Uz pw
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue