105 Commits

Author SHA1 Message Date
eed9c143ea feat: Updates zsh tns (tmux new session) function 2024-11-20 08:18:35 -05:00
d06648864e feat: Updates zsh config 2024-11-20 08:07:12 -05:00
9bb33cfaee feat: cleans up tmux config and updates to tmux-sessionator 2024-11-19 09:16:32 -05:00
917ac3ff2a feat: Updates to tmux config 2024-11-18 22:55:15 -05:00
23bd867430 feat: nvim config updates 2024-11-18 17:16:17 -05:00
2e3c750979 feat: Updates to nvim config and snippets 2024-11-18 08:33:38 -05:00
eff01f42fd feat: Working on snippets for nvim 2024-11-17 14:52:30 -05:00
8a17c5ad80 feat: Adds oil.nvim and removes neo-tree 2024-11-17 09:00:59 -05:00
d8891e40fc feat: More nvim plugins and changes, better xcodebuild experience. 2024-11-16 23:43:40 -05:00
f6f45a8c58 feat: Updates plugins for nvim 2024-11-16 11:38:43 -05:00
3b75e6e918 feat: Adds xcodebuild nvim plugin 2024-11-16 01:56:14 -05:00
2813d5b56d feat: Adds xcodebuild nvim plugin 2024-11-16 01:47:09 -05:00
b3476a4af2 feat: Updates git config 2024-11-14 17:52:30 -05:00
49524fef66 feat: Updates to nvim config and git config 2024-11-14 16:26:35 -05:00
15eedbfd1e feat: Updates to nvim config 2024-11-13 10:29:40 -05:00
365baec18a feat: Adds more keymaps to harpoon nvim config 2024-11-11 10:45:50 -05:00
051a418d0b fix: Fixes moving lines up and down in nvim keymaps 2024-11-10 11:25:22 -05:00
f7484147f7 feat: Adds harpoon to nvim 2024-11-10 09:39:09 -05:00
2334f33cdb feat: Cleanup some nvim config 2024-11-07 21:44:00 -05:00
33c011067f feat: Adds nvim-lint configuration and swiftformat 2024-11-07 17:11:05 -05:00
2d687e8c61 feat: Updates command timeout in starship configuration 2024-11-07 10:07:16 -05:00
377f5849f7 feat: Adds hvac-iot repos variables 2024-11-07 10:03:08 -05:00
37d8e4c678 feat: Updates tmux-sessionator path to use nas 2024-11-07 09:58:21 -05:00
edf62341df feat: Updates nvim lsp config 2024-11-06 18:01:34 -05:00
9f9854e9d5 feat: Begins fixes for lsp errors in nvim config 2024-11-06 17:08:26 -05:00
ef45abdd16 feat: Updates ssh config 2024-11-06 09:10:58 -05:00
23c4afabbc feat: Updates gopass config 2024-10-30 13:20:48 -04:00
329589612b feat: Fixes ssh config encryption 2024-10-21 16:35:07 -04:00
87b901f6c0 feat: Updates todos 2024-09-23 09:13:41 -04:00
c0c5e92184 feat: Update tmux config fixes catppucin warning 2024-09-23 08:44:48 -04:00
728c77a2d2 feat: Update nvim config for ts_ls name 2024-09-23 08:42:18 -04:00
319a63ddcc Updates ssh config 2024-06-14 09:55:37 -04:00
6a6c6ace8a Updates git credential helper. 2024-06-14 08:32:51 -04:00
4dbd2864c1 feat: Adds fzf-tab plugin 2024-05-16 18:50:24 -04:00
7b75cca4d7 feat: Adds fzf to shell searches / history 2024-05-16 18:43:38 -04:00
be1ab62d8f feat: Adds fzf to shell searches / history 2024-05-16 18:36:49 -04:00
a379a9ce60 Fix background colors on prompt when ssh 2024-04-24 21:04:52 -04:00
3c172a4597 Adds hostname to zsh prompt when ssh 2024-04-24 20:55:57 -04:00
3f91ec849d Adds karabiner 2024-04-17 21:57:16 -04:00
326ce37b02 Fixes some lsp / cmp errors in nvim 2024-04-15 16:58:44 -04:00
54b6377407 Adds gopass config 2024-04-13 19:10:16 -04:00
61258c8a32 Adds raycast config export from my macbook-pro 2024-04-13 18:32:57 -04:00
ffcb53f6e2 Update .zshenv to source local env if it exists 2024-04-08 21:42:21 -04:00
9c6d5a1e91 Fixes broken tmux-sessionator-path on mymini 2024-04-08 10:13:38 -04:00
a344d29ca4 Updates starship config 2024-04-08 09:38:36 -04:00
a70e1a70b4 Updates colors in starship config 2024-04-07 16:24:07 -04:00
53bad22017 Adds starship configuration 2024-04-07 16:17:38 -04:00
8a9a378f18 Updates to nvim to harden for gopass 2024-04-07 00:07:45 -04:00
65e8de5b75 Adds raycast pass-attribute script 2024-04-06 12:43:37 -04:00
b860ff8858 Adds raycast scripts directory and pass-copy command. 2024-04-06 11:03:50 -04:00
6e33524859 Failed with auto-commit launchd service because gpg signing 2024-04-05 15:39:51 -04:00
6599d90e39 Fixes some errors since moving xdg_data_home 2024-04-05 13:02:06 -04:00
6158763985 Fixes XDG_DATA_HOME directory 2024-04-05 12:37:57 -04:00
9b8e30bde3 Adds pgc alias to get an attribute of a password file and copy to clipboard 2024-04-05 12:15:05 -04:00
094a77c22e Adds pass word store aliases to zshrc 2024-04-05 09:47:20 -04:00
91e05a1345 Enables password store extensions 2024-04-04 12:20:55 -04:00
d9445d4e89 Adds gpg-tty to fix broken prompt for password 2024-04-02 22:15:50 -04:00
87594a5d96 Adds gpg-tui config 2024-04-02 22:14:39 -04:00
6759e4e85b Fixes typo in git config 2024-04-01 18:02:59 -04:00
712b209c86 Adds gpg signing to git config 2024-04-01 18:02:04 -04:00
19fbce7dd1 Adds pass word store generated length 2024-04-01 16:37:56 -04:00
48b4278ae9 Adds pass word store directory environment variable 2024-04-01 16:35:00 -04:00
47930ad6da updates tmux config. 2024-03-30 23:02:45 -04:00
a9d76c5107 Updates neovim 2024-03-30 22:51:11 -04:00
c4da654111 Updates ssh config 2024-03-27 12:58:10 -04:00
557da77caf adds edit-ssh-config function 2024-03-27 08:56:03 -04:00
01a7c4845f Adds edit-ssh-config function 2024-03-26 14:32:09 -04:00
1ae41a0fac Adds update dots script and fixes some typos 2024-03-26 14:27:01 -04:00
a696e4e658 Updates frankenMini ssh key 2024-03-26 14:16:18 -04:00
6527ad88df Updates frankenMini ip-address 2024-03-26 14:09:10 -04:00
cbf26b10e7 Adds some zsh aliases 2024-03-26 07:54:49 -04:00
a9d7f24d24 Removes lazy-lock from being tracked 2024-03-25 08:06:51 -04:00
2d39db3401 Adds tka alias to quickly kill tmux server and all it's sessions 2024-03-24 17:19:52 -04:00
1e26df8ef0 Adds cda to cd into local ansible directory 2024-03-24 17:05:48 -04:00
d653110ec2 Adds ANSIBLE_LOCAL environment variable 2024-03-24 17:02:27 -04:00
128dd695b9 Adds SITES environment variable 2024-03-24 17:00:36 -04:00
a2558e0296 Adds comments and new aliases to zshrc 2024-03-24 16:56:04 -04:00
19285a539d adds: gen alias and env exports, removes some unused scripts 2024-03-24 11:17:47 -04:00
6c0eda81d5 Adds tns shell function, to start a new tmux session in current or supplied directory. 2024-03-23 21:48:02 -04:00
842bf84c25 Adds tns shell function 2024-03-23 21:47:32 -04:00
f6bad2b0f5 Updates ssh config 2024-03-23 18:57:25 -04:00
47ea7ba28a Adds vault files to be copied to clients 2024-03-23 12:25:40 -04:00
54408de2cf nvim settings updates 2024-03-23 10:50:28 -04:00
a2e6d3e825 Updates to look for additional local environment variables 2024-03-23 08:55:07 -04:00
090b0fb2f3 Updates to look for additional local environment variables 2024-03-23 01:11:52 -04:00
2bab3d516c Rename local env file stored in xdg_data_home 2024-03-23 00:48:42 -04:00
9ef283fda1 Adds lookup for a zsh env file in xdg_data_home, for local configuration options. 2024-03-22 23:26:06 -04:00
881905f203 Updates to wezterm config and removes lazy-lock.json 2024-03-22 16:40:38 -04:00
55be390f7f updates permissions on files 2024-03-21 10:45:12 -04:00
3763775bb6 updates nvim packages and ignores certain ansible directories 2024-03-21 10:43:30 -04:00
b61004554a Updates tmux-sessionator script to use an environment variable for path lookups 2024-03-20 23:18:43 -04:00
0f8e56394d removes lua-snip 2024-03-20 19:19:05 -04:00
2434fb52e2 trying catppuccin color scheme in wezterm 2024-03-20 18:21:26 -04:00
cd8808ab74 removes lua-snip 2024-03-20 18:09:15 -04:00
fb235ab19d removes lua-snip 2024-03-20 18:03:05 -04:00
1db62e3457 trying catppuccin color scheme 2024-03-20 17:54:12 -04:00
411f660cbb updates nvim lock file 2024-03-20 17:47:36 -04:00
5572c8f0e3 fixed nvim back to original, problem was in my ansible playbook 2024-03-20 16:56:19 -04:00
d258f14376 adds: bootstrap for lazy 2024-03-20 16:15:33 -04:00
7660587a33 fixes permissions on zshenv file 2024-03-20 14:55:51 -04:00
aafdef33e3 adds: ansible configuration 2024-03-20 12:11:07 -04:00
bcd9742b37 Fixed broken permissions 2024-03-20 10:56:52 -04:00
c0714cb010 adds: tmux-yank plugin 2024-03-19 22:54:11 -04:00
8e20f20b4f update: uses catppuccin for tmux status bar 2024-03-19 22:35:45 -04:00
eae33a6705 adds: Ansible repos to autocd path and tmux-sessionator 2024-03-19 11:07:05 -04:00
73 changed files with 7319 additions and 1055 deletions

7
.gitignore vendored
View File

@@ -10,3 +10,10 @@
**/.netrwhist **/.netrwhist
**/.zshrc-local **/.zshrc-local
facebook-bot/config/* facebook-bot/config/*
facebook-bot/config/*
**/tmp
ansible/tmp/*
ansible/collections/*
ansible/galaxy_cache/*
ansible/galaxy_token
**/lazy-lock.json

View File

@@ -79,4 +79,4 @@
"${3rd}/luv/library", "${3rd}/luv/library",
"${3rd}/luassert/library" "${3rd}/luassert/library"
] ]
} }

View File

@@ -4,3 +4,4 @@
- Add tmux plugins to dots cli manager. - Add tmux plugins to dots cli manager.
- Add tmux-powerline linking to `dots` cli manager. - Add tmux-powerline linking to `dots` cli manager.
- Clean up zet commands, maybe make a gum / fzf filter script. - Clean up zet commands, maybe make a gum / fzf filter script.
- Update README to reflect ansible installation

985
ansible/ansible.cfg Normal file
View File

@@ -0,0 +1,985 @@
[defaults]
# (boolean) By default Ansible will issue a warning when received from a task action (module or action plugin)
# These warnings can be silenced by adjusting this setting to False.
;action_warnings=True
# (list) Accept list of cowsay templates that are 'safe' to use, set to empty list if you want to enable all installed templates.
;cowsay_enabled_stencils=bud-frogs, bunny, cheese, daemon, default, dragon, elephant-in-snake, elephant, eyes, hellokitty, kitty, luke-koala, meow, milk, moofasa, moose, ren, sheep, small, stegosaurus, stimpy, supermilker, three-eyes, turkey, turtle, tux, udder, vader-koala, vader, www
# (string) Specify a custom cowsay path or swap in your cowsay implementation of choice
;cowpath=
# (string) This allows you to chose a specific cowsay stencil for the banners or use 'random' to cycle through them.
;cow_selection=default
# (boolean) This option forces color mode even when running without a TTY or the "nocolor" setting is True.
;force_color=False
# (path) The default root path for Ansible config files on the controller.
home=~/.config/ansible
# (boolean) This setting allows suppressing colorizing output, which is used to give a better indication of failure and status information.
;nocolor=False
# (boolean) If you have cowsay installed but want to avoid the 'cows' (why????), use this.
;nocows=False
# (boolean) Sets the default value for the any_errors_fatal keyword, if True, Task failures will be considered fatal errors.
;any_errors_fatal=False
# (path) The password file to use for the become plugin. --become-password-file.
# If executable, it will be run and the resulting stdout will be used as the password.
;become_password_file=
# (pathspec) Colon separated paths in which Ansible will search for Become Plugins.
;become_plugins={{ ANSIBLE_HOME ~ "/plugins/become:/usr/share/ansible/plugins/become" }}
# (string) Chooses which cache plugin to use, the default 'memory' is ephemeral.
;fact_caching=memory
# (string) Defines connection or path information for the cache plugin
;fact_caching_connection=
# (string) Prefix to use for cache plugin files/tables
;fact_caching_prefix=ansible_facts
# (integer) Expiration timeout for the cache plugin data
;fact_caching_timeout=86400
# (list) List of enabled callbacks, not all callbacks need enabling, but many of those shipped with Ansible do as we don't want them activated by default.
;callbacks_enabled=
# (string) When a collection is loaded that does not support the running Ansible version (with the collection metadata key `requires_ansible`).
;collections_on_ansible_version_mismatch=warning
# (pathspec) Colon separated paths in which Ansible will search for collections content. Collections must be in nested *subdirectories*, not directly in these directories. For example, if ``COLLECTIONS_PATHS`` includes ``'{{ ANSIBLE_HOME ~ "/collections" }}'``, and you want to add ``my.collection`` to that directory, it must be saved as ``'{{ ANSIBLE_HOME} ~ "/collections/ansible_collections/my/collection" }}'``.
;collections_path={{ ANSIBLE_HOME ~ "/collections:/usr/share/ansible/collections" }}
# (boolean) A boolean to enable or disable scanning the sys.path for installed collections
;collections_scan_sys_path=True
# (path) The password file to use for the connection plugin. --connection-password-file.
;connection_password_file=
# (pathspec) Colon separated paths in which Ansible will search for Action Plugins.
;action_plugins={{ ANSIBLE_HOME ~ "/plugins/action:/usr/share/ansible/plugins/action" }}
# (boolean) When enabled, this option allows lookup plugins (whether used in variables as ``{{lookup('foo')}}`` or as a loop as with_foo) to return data that is not marked 'unsafe'.
# By default, such data is marked as unsafe to prevent the templating engine from evaluating any jinja2 templating language, as this could represent a security risk. This option is provided to allow for backward compatibility, however users should first consider adding allow_unsafe=True to any lookups which may be expected to contain data which may be run through the templating engine late
;allow_unsafe_lookups=False
# (boolean) This controls whether an Ansible playbook should prompt for a login password. If using SSH keys for authentication, you probably do not need to change this setting.
;ask_pass=False
# (boolean) This controls whether an Ansible playbook should prompt for a vault password.
;ask_vault_pass=False
# (pathspec) Colon separated paths in which Ansible will search for Cache Plugins.
;cache_plugins={{ ANSIBLE_HOME ~ "/plugins/cache:/usr/share/ansible/plugins/cache" }}
# (pathspec) Colon separated paths in which Ansible will search for Callback Plugins.
;callback_plugins={{ ANSIBLE_HOME ~ "/plugins/callback:/usr/share/ansible/plugins/callback" }}
# (pathspec) Colon separated paths in which Ansible will search for Cliconf Plugins.
;cliconf_plugins={{ ANSIBLE_HOME ~ "/plugins/cliconf:/usr/share/ansible/plugins/cliconf" }}
# (pathspec) Colon separated paths in which Ansible will search for Connection Plugins.
;connection_plugins={{ ANSIBLE_HOME ~ "/plugins/connection:/usr/share/ansible/plugins/connection" }}
# (boolean) Toggles debug output in Ansible. This is *very* verbose and can hinder multiprocessing. Debug output can also include secret information despite no_log settings being enabled, which means debug mode should not be used in production.
;debug=False
# (string) This indicates the command to use to spawn a shell under for Ansible's execution needs on a target. Users may need to change this in rare instances when shell usage is constrained, but in most cases it may be left as is.
;executable=/bin/sh
# (string) This option allows you to globally configure a custom path for 'local_facts' for the implied :ref:`ansible_collections.ansible.builtin.setup_module` task when using fact gathering.
# If not set, it will fallback to the default from the ``ansible.builtin.setup`` module: ``/etc/ansible/facts.d``.
# This does **not** affect user defined tasks that use the ``ansible.builtin.setup`` module.
# The real action being created by the implicit task is currently ``ansible.legacy.gather_facts`` module, which then calls the configured fact modules, by default this will be ``ansible.builtin.setup`` for POSIX systems but other platforms might have different defaults.
;fact_path=
# (pathspec) Colon separated paths in which Ansible will search for Jinja2 Filter Plugins.
;filter_plugins={{ ANSIBLE_HOME ~ "/plugins/filter:/usr/share/ansible/plugins/filter" }}
# (boolean) This option controls if notified handlers run on a host even if a failure occurs on that host.
# When false, the handlers will not run if a failure has occurred on a host.
# This can also be set per play or on the command line. See Handlers and Failure for more details.
;force_handlers=False
# (integer) Maximum number of forks Ansible will use to execute tasks on target hosts.
;forks=5
# (string) This setting controls the default policy of fact gathering (facts discovered about remote systems).
# This option can be useful for those wishing to save fact gathering time. Both 'smart' and 'explicit' will use the cache plugin.
;gathering=implicit
# (list) Set the `gather_subset` option for the :ref:`ansible_collections.ansible.builtin.setup_module` task in the implicit fact gathering. See the module documentation for specifics.
# It does **not** apply to user defined ``ansible.builtin.setup`` tasks.
;gather_subset=
# (integer) Set the timeout in seconds for the implicit fact gathering, see the module documentation for specifics.
# It does **not** apply to user defined :ref:`ansible_collections.ansible.builtin.setup_module` tasks.
;gather_timeout=
# (string) This setting controls how duplicate definitions of dictionary variables (aka hash, map, associative array) are handled in Ansible.
# This does not affect variables whose values are scalars (integers, strings) or arrays.
# **WARNING**, changing this setting is not recommended as this is fragile and makes your content (plays, roles, collections) non portable, leading to continual confusion and misuse. Don't change this setting unless you think you have an absolute need for it.
# We recommend avoiding reusing variable names and relying on the ``combine`` filter and ``vars`` and ``varnames`` lookups to create merged versions of the individual variables. In our experience this is rarely really needed and a sign that too much complexity has been introduced into the data structures and plays.
# For some uses you can also look into custom vars_plugins to merge on input, even substituting the default ``host_group_vars`` that is in charge of parsing the ``host_vars/`` and ``group_vars/`` directories. Most users of this setting are only interested in inventory scope, but the setting itself affects all sources and makes debugging even harder.
# All playbooks and roles in the official examples repos assume the default for this setting.
# Changing the setting to ``merge`` applies across variable sources, but many sources will internally still overwrite the variables. For example ``include_vars`` will dedupe variables internally before updating Ansible, with 'last defined' overwriting previous definitions in same file.
# The Ansible project recommends you **avoid ``merge`` for new projects.**
# It is the intention of the Ansible developers to eventually deprecate and remove this setting, but it is being kept as some users do heavily rely on it. New projects should **avoid 'merge'**.
;hash_behaviour=replace
# (pathlist) Comma separated list of Ansible inventory sources
;inventory=/etc/ansible/hosts
# (pathspec) Colon separated paths in which Ansible will search for HttpApi Plugins.
;httpapi_plugins={{ ANSIBLE_HOME ~ "/plugins/httpapi:/usr/share/ansible/plugins/httpapi" }}
# (float) This sets the interval (in seconds) of Ansible internal processes polling each other. Lower values improve performance with large playbooks at the expense of extra CPU load. Higher values are more suitable for Ansible usage in automation scenarios, when UI responsiveness is not required but CPU usage might be a concern.
# The default corresponds to the value hardcoded in Ansible <= 2.1
;internal_poll_interval=0.001
# (pathspec) Colon separated paths in which Ansible will search for Inventory Plugins.
;inventory_plugins={{ ANSIBLE_HOME ~ "/plugins/inventory:/usr/share/ansible/plugins/inventory" }}
# (string) This is a developer-specific feature that allows enabling additional Jinja2 extensions.
# See the Jinja2 documentation for details. If you do not know what these do, you probably don't need to change this setting :)
;jinja2_extensions=[]
# (boolean) This option preserves variable types during template operations.
;jinja2_native=False
# (boolean) Enables/disables the cleaning up of the temporary files Ansible used to execute the tasks on the remote.
# If this option is enabled it will disable ``ANSIBLE_PIPELINING``.
;keep_remote_files=False
# (boolean) Controls whether callback plugins are loaded when running /usr/bin/ansible. This may be used to log activity from the command line, send notifications, and so on. Callback plugins are always loaded for ``ansible-playbook``.
;bin_ansible_callbacks=False
# (tmppath) Temporary directory for Ansible to use on the controller.
local_tmp=~/.local/ansible/tmp
# (list) List of logger names to filter out of the log file
;log_filter=
# (path) File to which Ansible will log on the controller. When empty logging is disabled.
;log_path=
# (pathspec) Colon separated paths in which Ansible will search for Lookup Plugins.
;lookup_plugins={{ ANSIBLE_HOME ~ "/plugins/lookup:/usr/share/ansible/plugins/lookup" }}
# (string) Sets the macro for the 'ansible_managed' variable available for :ref:`ansible_collections.ansible.builtin.template_module` and :ref:`ansible_collections.ansible.windows.win_template_module`. This is only relevant for those two modules.
;ansible_managed=Ansible managed
# (string) This sets the default arguments to pass to the ``ansible`` adhoc binary if no ``-a`` is specified.
;module_args=
# (string) Compression scheme to use when transferring Python modules to the target.
;module_compression=ZIP_DEFLATED
# (string) Module to use with the ``ansible`` AdHoc command, if none is specified via ``-m``.
;module_name=command
# (pathspec) Colon separated paths in which Ansible will search for Modules.
;library={{ ANSIBLE_HOME ~ "/plugins/modules:/usr/share/ansible/plugins/modules" }}
# (pathspec) Colon separated paths in which Ansible will search for Module utils files, which are shared by modules.
;module_utils={{ ANSIBLE_HOME ~ "/plugins/module_utils:/usr/share/ansible/plugins/module_utils" }}
# (pathspec) Colon separated paths in which Ansible will search for Netconf Plugins.
;netconf_plugins={{ ANSIBLE_HOME ~ "/plugins/netconf:/usr/share/ansible/plugins/netconf" }}
# (boolean) Toggle Ansible's display and logging of task details, mainly used to avoid security disclosures.
;no_log=False
# (boolean) Toggle Ansible logging to syslog on the target when it executes tasks. On Windows hosts this will disable a newer style PowerShell modules from writing to the event log.
;no_target_syslog=False
# (raw) What templating should return as a 'null' value. When not set it will let Jinja2 decide.
;null_representation=
# (integer) For asynchronous tasks in Ansible (covered in Asynchronous Actions and Polling), this is how often to check back on the status of those tasks when an explicit poll interval is not supplied. The default is a reasonably moderate 15 seconds which is a tradeoff between checking in frequently and providing a quick turnaround when something may have completed.
;poll_interval=15
# (path) Option for connections using a certificate or key file to authenticate, rather than an agent or passwords, you can set the default value here to avoid re-specifying --private-key with every invocation.
;private_key_file=
# (boolean) By default, imported roles publish their variables to the play and other roles, this setting can avoid that.
# This was introduced as a way to reset role variables to default values if a role is used more than once in a playbook.
# Included roles only make their variables public at execution, unlike imported roles which happen at playbook compile time.
;private_role_vars=False
# (integer) Port to use in remote connections, when blank it will use the connection plugin default.
;remote_port=
# (string) Sets the login user for the target machines
# When blank it uses the connection plugin's default, normally the user currently executing Ansible.
;remote_user=
# (pathspec) Colon separated paths in which Ansible will search for Roles.
roles_path={{ ANSIBLE_HOME ~ "~/.local/ansible/roles:/roles:/usr/share/ansible/roles:/etc/ansible/roles" }}
# (string) Set the main callback used to display Ansible output. You can only have one at a time.
# You can have many other callbacks, but just one can be in charge of stdout.
# See :ref:`callback_plugins` for a list of available options.
;stdout_callback=default
# (string) Set the default strategy used for plays.
;strategy=linear
# (pathspec) Colon separated paths in which Ansible will search for Strategy Plugins.
;strategy_plugins={{ ANSIBLE_HOME ~ "/plugins/strategy:/usr/share/ansible/plugins/strategy" }}
# (boolean) Toggle the use of "su" for tasks.
;su=False
# (string) Syslog facility to use when Ansible logs to the remote target
;syslog_facility=LOG_USER
# (pathspec) Colon separated paths in which Ansible will search for Terminal Plugins.
;terminal_plugins={{ ANSIBLE_HOME ~ "/plugins/terminal:/usr/share/ansible/plugins/terminal" }}
# (pathspec) Colon separated paths in which Ansible will search for Jinja2 Test Plugins.
;test_plugins={{ ANSIBLE_HOME ~ "/plugins/test:/usr/share/ansible/plugins/test" }}
# (integer) This is the default timeout for connection plugins to use.
;timeout=10
# (string) Can be any connection plugin available to your ansible installation.
# There is also a (DEPRECATED) special 'smart' option, that will toggle between 'ssh' and 'paramiko' depending on controller OS and ssh versions.
;transport=ssh
# (boolean) When True, this causes ansible templating to fail steps that reference variable names that are likely typoed.
# Otherwise, any '{{ template_expression }}' that contains undefined variables will be rendered in a template or ansible action line exactly as written.
;error_on_undefined_vars=True
# (pathspec) Colon separated paths in which Ansible will search for Vars Plugins.
;vars_plugins={{ ANSIBLE_HOME ~ "/plugins/vars:/usr/share/ansible/plugins/vars" }}
# (string) The vault_id to use for encrypting by default. If multiple vault_ids are provided, this specifies which to use for encryption. The --encrypt-vault-id cli option overrides the configured value.
;vault_encrypt_identity=
# (string) The label to use for the default vault id label in cases where a vault id label is not provided
;vault_identity=default
# (list) A list of vault-ids to use by default. Equivalent to multiple --vault-id args. Vault-ids are tried in order.
;vault_identity_list=
# (string) If true, decrypting vaults with a vault id will only try the password from the matching vault-id
;vault_id_match=False
# (path) The vault password file to use. Equivalent to --vault-password-file or --vault-id
# If executable, it will be run and the resulting stdout will be used as the password.
vault_password_file=~/.local/ansible/.vaultpwd
# (integer) Sets the default verbosity, equivalent to the number of ``-v`` passed in the command line.
;verbosity=0
# (boolean) Toggle to control the showing of deprecation warnings
;deprecation_warnings=True
# (boolean) Toggle to control showing warnings related to running devel
;devel_warning=True
# (boolean) Normally ``ansible-playbook`` will print a header for each task that is run. These headers will contain the name: field from the task if you specified one. If you didn't then ``ansible-playbook`` uses the task's action to help you tell which task is presently running. Sometimes you run many of the same action and so you want more information about the task to differentiate it from others of the same action. If you set this variable to True in the config then ``ansible-playbook`` will also include the task's arguments in the header.
# This setting defaults to False because there is a chance that you have sensitive values in your parameters and you do not want those to be printed.
# If you set this to True you should be sure that you have secured your environment's stdout (no one can shoulder surf your screen and you aren't saving stdout to an insecure file) or made sure that all of your playbooks explicitly added the ``no_log: True`` parameter to tasks which have sensitive values See How do I keep secret data in my playbook? for more information.
;display_args_to_stdout=False
# (boolean) Toggle to control displaying skipped task/host entries in a task in the default callback
;display_skipped_hosts=True
# (string) Root docsite URL used to generate docs URLs in warning/error text; must be an absolute URL with valid scheme and trailing slash.
;docsite_root_url=https://docs.ansible.com/ansible-core/
# (pathspec) Colon separated paths in which Ansible will search for Documentation Fragments Plugins.
;doc_fragment_plugins={{ ANSIBLE_HOME ~ "/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments" }}
# (string) By default Ansible will issue a warning when a duplicate dict key is encountered in YAML.
# These warnings can be silenced by adjusting this setting to False.
;duplicate_dict_key=warn
# (boolean) Whether or not to enable the task debugger, this previously was done as a strategy plugin.
# Now all strategy plugins can inherit this behavior. The debugger defaults to activating when
# a task is failed on unreachable. Use the debugger keyword for more flexibility.
;enable_task_debugger=False
# (boolean) Toggle to allow missing handlers to become a warning instead of an error when notifying.
;error_on_missing_handler=True
# (list) Which modules to run during a play's fact gathering stage, using the default of 'smart' will try to figure it out based on connection type.
# If adding your own modules but you still want to use the default Ansible facts, you will want to include 'setup' or corresponding network module to the list (if you add 'smart', Ansible will also figure it out).
# This does not affect explicit calls to the 'setup' module, but does always affect the 'gather_facts' action (implicit or explicit).
;facts_modules=smart
# (boolean) Set this to "False" if you want to avoid host key checking by the underlying tools Ansible uses to connect to the host
;host_key_checking=True
# (boolean) Facts are available inside the `ansible_facts` variable, this setting also pushes them as their own vars in the main namespace.
# Unlike inside the `ansible_facts` dictionary, these will have an `ansible_` prefix.
;inject_facts_as_vars=True
# (string) Path to the Python interpreter to be used for module execution on remote targets, or an automatic discovery mode. Supported discovery modes are ``auto`` (the default), ``auto_silent``, ``auto_legacy``, and ``auto_legacy_silent``. All discovery modes employ a lookup table to use the included system Python (on distributions known to include one), falling back to a fixed ordered list of well-known Python interpreter locations if a platform-specific default is not available. The fallback behavior will issue a warning that the interpreter should be set explicitly (since interpreters installed later may change which one is used). This warning behavior can be disabled by setting ``auto_silent`` or ``auto_legacy_silent``. The value of ``auto_legacy`` provides all the same behavior, but for backwards-compatibility with older Ansible releases that always defaulted to ``/usr/bin/python``, will use that interpreter if present.
interpreter_python=auto_silent
# (boolean) If 'false', invalid attributes for a task will result in warnings instead of errors
;invalid_task_attribute_failed=True
# (boolean) Toggle to control showing warnings related to running a Jinja version older than required for jinja2_native
;jinja2_native_warning=True
# (boolean) By default Ansible will issue a warning when there are no hosts in the inventory.
# These warnings can be silenced by adjusting this setting to False.
;localhost_warning=True
# (int) Maximum size of files to be considered for diff display
;max_diff_size=104448
# (list) List of extensions to ignore when looking for modules to load
# This is for rejecting script and binary module fallback extensions
;module_ignore_exts={{(REJECT_EXTS + ('.yaml', '.yml', '.ini'))}}
# (bool) Enables whether module responses are evaluated for containing non UTF-8 data
# Disabling this may result in unexpected behavior
# Only ansible-core should evaluate this configuration
;module_strict_utf8_response=True
# (list) TODO: write it
;network_group_modules=eos, nxos, ios, iosxr, junos, enos, ce, vyos, sros, dellos9, dellos10, dellos6, asa, aruba, aireos, bigip, ironware, onyx, netconf, exos, voss, slxos
# (boolean) Previously Ansible would only clear some of the plugin loading caches when loading new roles, this led to some behaviours in which a plugin loaded in previous plays would be unexpectedly 'sticky'. This setting allows to return to that behaviour.
;old_plugin_cache_clear=False
# (path) A number of non-playbook CLIs have a ``--playbook-dir`` argument; this sets the default value for it.
;playbook_dir=
# (string) This sets which playbook dirs will be used as a root to process vars plugins, which includes finding host_vars/group_vars
;playbook_vars_root=top
# (path) A path to configuration for filtering which plugins installed on the system are allowed to be used.
# See :ref:`plugin_filtering_config` for details of the filter file's format.
# The default is /etc/ansible/plugin_filters.yml
;plugin_filters_cfg=
# (string) Attempts to set RLIMIT_NOFILE soft limit to the specified value when executing Python modules (can speed up subprocess usage on Python 2.x. See https://bugs.python.org/issue11284). The value will be limited by the existing hard limit. Default value of 0 does not attempt to adjust existing system-defined limits.
;python_module_rlimit_nofile=0
# (bool) This controls whether a failed Ansible playbook should create a .retry file.
;retry_files_enabled=False
# (path) This sets the path in which Ansible will save .retry files when a playbook fails and retry files are enabled.
# This file will be overwritten after each run with the list of failed hosts from all plays.
;retry_files_save_path=
# (str) This setting can be used to optimize vars_plugin usage depending on user's inventory size and play selection.
;run_vars_plugins=demand
# (bool) This adds the custom stats set via the set_stats plugin to the default output
;show_custom_stats=False
# (string) Action to take when a module parameter value is converted to a string (this does not affect variables). For string parameters, values such as '1.00', "['a', 'b',]", and 'yes', 'y', etc. will be converted by the YAML parser unless fully quoted.
# Valid options are 'error', 'warn', and 'ignore'.
# Since 2.8, this option defaults to 'warn' but will change to 'error' in 2.12.
;string_conversion_action=warn
# (boolean) Allows disabling of warnings related to potential issues on the system running ansible itself (not on the managed hosts)
# These may include warnings about 3rd party packages or other conditions that should be resolved if possible.
;system_warnings=True
# (boolean) This option defines whether the task debugger will be invoked on a failed task when ignore_errors=True is specified.
# True specifies that the debugger will honor ignore_errors, False will not honor ignore_errors.
;task_debugger_ignore_errors=True
# (integer) Set the maximum time (in seconds) that a task can run for.
# If set to 0 (the default) there is no timeout.
;task_timeout=0
# (string) Make ansible transform invalid characters in group names supplied by inventory sources.
;force_valid_group_names=never
# (boolean) Toggles the use of persistence for connections.
;use_persistent_connections=False
# (bool) A toggle to disable validating a collection's 'metadata' entry for a module_defaults action group. Metadata containing unexpected fields or value types will produce a warning when this is True.
;validate_action_group_metadata=True
# (list) Accept list for variable plugins that require it.
;vars_plugins_enabled=host_group_vars
# (list) Allows to change the group variable precedence merge order.
;precedence=all_inventory, groups_inventory, all_plugins_inventory, all_plugins_play, groups_plugins_inventory, groups_plugins_play
# (string) The salt to use for the vault encryption. If it is not provided, a random salt will be used.
;vault_encrypt_salt=
# (bool) Force 'verbose' option to use stderr instead of stdout
;verbose_to_stderr=False
# (integer) For asynchronous tasks in Ansible (covered in Asynchronous Actions and Polling), this is how long, in seconds, to wait for the task spawned by Ansible to connect back to the named pipe used on Windows systems. The default is 5 seconds. This can be too low on slower systems, or systems under heavy load.
# This is not the total time an async command can run for, but is a separate timeout to wait for an async command to start. The task will only start to be timed against its async_timeout once it has connected to the pipe, so the overall maximum duration the task can take will be extended by the amount specified here.
;win_async_startup_timeout=5
# (list) Check all of these extensions when looking for 'variable' files which should be YAML or JSON or vaulted versions of these.
# This affects vars_files, include_vars, inventory and vars plugins among others.
;yaml_valid_extensions=.yml, .yaml, .json
# (bool) Toggle to control displaying markers when running in check mode.
# The markers are C(DRY RUN) at the beginning and ending of playbook execution (when calling C(ansible-playbook --check)) and C(CHECK MODE) as a suffix at every play and task that is run in check mode.
;check_mode_markers=False
# (bool) Toggle to control whether failed and unreachable tasks are displayed to STDERR (vs. STDOUT)
;display_failed_stderr=False
# (bool) Toggle to control displaying 'ok' task/host results in a task
;display_ok_hosts=True
# (bool) Configure the result format to be more readable
# When O(result_format) is set to V(yaml) this option defaults to V(True), and defaults to V(False) when configured to V(json).
# Setting this option to V(True) will force V(json) and V(yaml) results to always be pretty printed regardless of verbosity.
# When set to V(True) and used with the V(yaml) result format, this option will modify module responses in an attempt to produce a more human friendly output at the expense of correctness, and should not be relied upon to aid in writing variable manipulations or conditionals. For correctness, set this option to V(False) or set O(result_format) to V(json).
;callback_format_pretty=
# (str) Define the task result format used in the callback output.
# These formats do not cause the callback to emit valid JSON or YAML formats.
# The output contains these formats interspersed with other non-machine parsable data.
;callback_result_format=json
# (bool) This adds output that shows when a task is started to execute for each host
;show_per_host_start=False
# (bool) When a task fails, display the path to the file containing the failed task and the line number. This information is displayed automatically for every task when running with C(-vv) or greater verbosity.
;show_task_path_on_failure=False
# (list) list of users to be expected to have admin privileges. This is used by the controller to determine how to share temporary files between the remote user and the become user.
;admin_users=root, toor
# (string) Directory in which ansible will keep async job information
;async_dir=~/.ansible_async
# (string) Checked when Ansible needs to execute a module as a different user.
# If setfacl and chown both fail and do not let the different user access the module's files, they will be chgrp'd to this group.
# In order for this to work, the remote_user and become_user must share a common group and this setting must be set to that group.
;common_remote_group=
# (string) Temporary directory to use on targets when executing tasks.
;remote_tmp=~/.ansible/tmp
# (list) List of valid system temporary directories on the managed machine for Ansible to validate O(remote_tmp) against, when specific permissions are needed. These must be world readable, writable, and executable. This list should only contain directories which the system administrator has pre-created with the proper ownership and permissions otherwise security issues can arise.
# When O(remote_tmp) is required to be a system temp dir and it does not match any in the list, the first one from the list will be used instead.
;system_tmpdirs=/var/tmp, /tmp
# (boolean) This makes the temporary files created on the machine world-readable and will issue a warning instead of failing the task.
# It is useful when becoming an unprivileged user.
;allow_world_readable_tmpfiles=False
[privilege_escalation]
# (boolean) Display an agnostic become prompt instead of displaying a prompt containing the command line supplied become method
;agnostic_become_prompt=True
# (boolean) This setting controls if become is skipped when remote user and become user are the same. I.E root sudo to root.
# If executable, it will be run and the resulting stdout will be used as the password.
;become_allow_same_user=False
# (boolean) Toggles the use of privilege escalation, allowing you to 'become' another user after login.
;become=False
# (boolean) Toggle to prompt for privilege escalation password.
;become_ask_pass=False
# (string) executable to use for privilege escalation, otherwise Ansible will depend on PATH
;become_exe=
# (string) Flags to pass to the privilege escalation executable.
;become_flags=
# (string) Privilege escalation method to use when `become` is enabled.
;become_method=sudo
# (string) The user your login/remote user 'becomes' when using privilege escalation, most systems will use 'root' when no user is specified.
;become_user=root
[persistent_connection]
# (path) Specify where to look for the ansible-connection script. This location will be checked before searching $PATH.
# If null, ansible will start with the same directory as the ansible script.
;ansible_connection_path=
# (int) This controls the amount of time to wait for response from remote device before timing out persistent connection.
;command_timeout=30
# (integer) This controls the retry timeout for persistent connection to connect to the local domain socket.
;connect_retry_timeout=15
# (integer) This controls how long the persistent connection will remain idle before it is destroyed.
;connect_timeout=30
# (path) Path to socket to be used by the connection persistence system.
;control_path_dir={{ ANSIBLE_HOME ~ "/pc" }}
[connection]
# (boolean) This is a global option, each connection plugin can override either by having more specific options or not supporting pipelining at all.
# Pipelining, if supported by the connection plugin, reduces the number of network operations required to execute a module on the remote server, by executing many Ansible modules without actual file transfer.
# It can result in a very significant performance improvement when enabled.
# However this conflicts with privilege escalation (become). For example, when using 'sudo:' operations you must first disable 'requiretty' in /etc/sudoers on all managed hosts, which is why it is disabled by default.
# This setting will be disabled if ``ANSIBLE_KEEP_REMOTE_FILES`` is enabled.
;pipelining=False
[colors]
# (string) Defines the color to use on 'Changed' task status
;changed=yellow
# (string) Defines the default color to use for ansible-console
;console_prompt=white
# (string) Defines the color to use when emitting debug messages
;debug=dark gray
# (string) Defines the color to use when emitting deprecation messages
;deprecate=purple
# (string) Defines the color to use when showing added lines in diffs
;diff_add=green
# (string) Defines the color to use when showing diffs
;diff_lines=cyan
# (string) Defines the color to use when showing removed lines in diffs
;diff_remove=red
# (string) Defines the color to use when emitting error messages
;error=red
# (string) Defines the color to use for highlighting
;highlight=white
# (string) Defines the color to use when showing 'OK' task status
;ok=green
# (string) Defines the color to use when showing 'Skipped' task status
;skip=cyan
# (string) Defines the color to use on 'Unreachable' status
;unreachable=bright red
# (string) Defines the color to use when emitting verbose messages. i.e those that show with '-v's.
;verbose=blue
# (string) Defines the color to use when emitting warning messages
;warn=bright purple
[selinux]
# (boolean) This setting causes libvirt to connect to lxc containers by passing --noseclabel to virsh. This is necessary when running on systems which do not have SELinux.
;libvirt_lxc_noseclabel=False
# (list) Some filesystems do not support safe operations and/or return inconsistent errors, this setting makes Ansible 'tolerate' those in the list w/o causing fatal errors.
# Data corruption may occur and writes are not always verified when a filesystem is in the list.
;special_context_filesystems=fuse, nfs, vboxsf, ramfs, 9p, vfat
[diff]
# (bool) Configuration toggle to tell modules to show differences when in 'changed' status, equivalent to ``--diff``.
;always=False
# (integer) How many lines of context to show when displaying the differences between files.
;context=3
[galaxy]
# (path) The directory that stores cached responses from a Galaxy server.
# This is only used by the ``ansible-galaxy collection install`` and ``download`` commands.
# Cache files inside this dir will be ignored if they are world writable.
cache_dir=~/.cache/ansible
# (bool) whether ``ansible-galaxy collection install`` should warn about ``--collections-path`` missing from configured :ref:`collections_paths`
;collections_path_warning=True
# (path) Collection skeleton directory to use as a template for the ``init`` action in ``ansible-galaxy collection``, same as ``--collection-skeleton``.
;collection_skeleton=
# (list) patterns of files to ignore inside a Galaxy collection skeleton directory
;collection_skeleton_ignore=^.git$, ^.*/.git_keep$
# (bool) Disable GPG signature verification during collection installation.
;disable_gpg_verify=False
# (bool) Some steps in ``ansible-galaxy`` display a progress wheel which can cause issues on certain displays or when outputting the stdout to a file.
# This config option controls whether the display wheel is shown or not.
# The default is to show the display wheel if stdout has a tty.
;display_progress=
# (path) Configure the keyring used for GPG signature verification during collection installation and verification.
;gpg_keyring=
# (boolean) If set to yes, ansible-galaxy will not validate TLS certificates. This can be useful for testing against a server with a self-signed certificate.
;ignore_certs=
# (list) A list of GPG status codes to ignore during GPG signature verification. See L(https://github.com/gpg/gnupg/blob/master/doc/DETAILS#general-status-codes) for status code descriptions.
# If fewer signatures successfully verify the collection than `GALAXY_REQUIRED_VALID_SIGNATURE_COUNT`, signature verification will fail even if all error codes are ignored.
;ignore_signature_status_codes=
# (str) The number of signatures that must be successful during GPG signature verification while installing or verifying collections.
# This should be a positive integer or all to indicate all signatures must successfully validate the collection.
# Prepend + to the value to fail if no valid signatures are found for the collection.
;required_valid_signature_count=1
# (path) Role skeleton directory to use as a template for the ``init`` action in ``ansible-galaxy``/``ansible-galaxy role``, same as ``--role-skeleton``.
;role_skeleton=
# (list) patterns of files to ignore inside a Galaxy role or collection skeleton directory
;role_skeleton_ignore=^.git$, ^.*/.git_keep$
# (string) URL to prepend when roles don't specify the full URI, assume they are referencing this server as the source.
;server=https://galaxy.ansible.com
# (list) A list of Galaxy servers to use when installing a collection.
# The value corresponds to the config ini header ``[galaxy_server.{{item}}]`` which defines the server details.
# See :ref:`galaxy_server_config` for more details on how to define a Galaxy server.
# The order of servers in this list is used to as the order in which a collection is resolved.
# Setting this config option will ignore the :ref:`galaxy_server` config option.
;server_list=
# (int) The default timeout for Galaxy API calls. Galaxy servers that don't configure a specific timeout will fall back to this value.
;server_timeout=60
# (path) Local path to galaxy access token file
;token_path={{ ANSIBLE_HOME ~ "/galaxy_token" }}
[inventory]
# (string) This setting changes the behaviour of mismatched host patterns, it allows you to force a fatal error, a warning or just ignore it
;host_pattern_mismatch=warning
# (boolean) If 'true', it is a fatal error when any given inventory source cannot be successfully parsed by any available inventory plugin; otherwise, this situation only attracts a warning.
;any_unparsed_is_failed=False
# (bool) Toggle to turn on inventory caching.
# This setting has been moved to the individual inventory plugins as a plugin option :ref:`inventory_plugins`.
# The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory configuration.
# This message will be removed in 2.16.
;cache=False
# (string) The plugin for caching inventory.
# This setting has been moved to the individual inventory plugins as a plugin option :ref:`inventory_plugins`.
# The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory and fact cache configuration.
# This message will be removed in 2.16.
;cache_plugin=
# (string) The inventory cache connection.
# This setting has been moved to the individual inventory plugins as a plugin option :ref:`inventory_plugins`.
# The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory and fact cache configuration.
# This message will be removed in 2.16.
;cache_connection=
# (string) The table prefix for the cache plugin.
# This setting has been moved to the individual inventory plugins as a plugin option :ref:`inventory_plugins`.
# The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory and fact cache configuration.
# This message will be removed in 2.16.
;cache_prefix=ansible_inventory_
# (string) Expiration timeout for the inventory cache plugin data.
# This setting has been moved to the individual inventory plugins as a plugin option :ref:`inventory_plugins`.
# The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory and fact cache configuration.
# This message will be removed in 2.16.
;cache_timeout=3600
# (list) List of enabled inventory plugins, it also determines the order in which they are used.
;enable_plugins=host_list, script, auto, yaml, ini, toml
# (bool) Controls if ansible-inventory will accurately reflect Ansible's view into inventory or its optimized for exporting.
;export=False
# (list) List of extensions to ignore when using a directory as an inventory source
;ignore_extensions={{(REJECT_EXTS + ('.orig', '.ini', '.cfg', '.retry'))}}
# (list) List of patterns to ignore when using a directory as an inventory source
;ignore_patterns=
# (bool) If 'true' it is a fatal error if every single potential inventory source fails to parse, otherwise this situation will only attract a warning.
;unparsed_is_failed=False
# (boolean) By default Ansible will issue a warning when no inventory was loaded and notes that it will use an implicit localhost-only inventory.
# These warnings can be silenced by adjusting this setting to False.
;inventory_unparsed_warning=True
[netconf_connection]
# (string) This variable is used to enable bastion/jump host with netconf connection. If set to True the bastion/jump host ssh settings should be present in ~/.ssh/config file, alternatively it can be set to custom ssh configuration file path to read the bastion/jump host settings.
;ssh_config=
[paramiko_connection]
# (boolean) TODO: write it
;host_key_auto_add=False
# (boolean) TODO: write it
;look_for_keys=True
# (float) Configures, in seconds, the amount of time to wait for the SSH banner to be presented. This option is supported by paramiko version 1.15.0 or newer.
;banner_timeout=30
# (boolean) Set this to "False" if you want to avoid host key checking by the underlying tools Ansible uses to connect to the host
;host_key_checking=True
# (int) Remote port to connect to.
;remote_port=22
# (string) Path to private key file to use for authentication.
;private_key_file=
# (string) Proxy information for running the connection via a jumphost
# Also this plugin will scan 'ssh_args', 'ssh_extra_args' and 'ssh_common_args' from the 'ssh' plugin settings for proxy information if set.
;proxy_command=
# (boolean) SUDO usually requires a PTY, True to give a PTY and False to not give a PTY.
;pty=True
# (boolean) Save the host keys to a file
;record_host_keys=True
# (string) User to login/authenticate as
# Can be set from the CLI via the C(--user) or C(-u) options.
;remote_user=
# (int) Number of seconds until the plugin gives up on failing to establish a TCP connection.
;timeout=10
# (boolean) Whether or not to enable RSA SHA2 algorithms for pubkeys and hostkeys
# On paramiko versions older than 2.9, this only affects hostkeys
# For behavior matching paramiko<2.9 set this to V(False)
;use_rsa_sha2_algorithms=True
[jinja2]
# (list) This list of filters avoids 'type conversion' when templating variables
# Useful when you want to avoid conversion into lists or dictionaries for JSON strings, for example.
;dont_type_filters=string, to_json, to_nice_json, to_yaml, to_nice_yaml, ppretty, json
[tags]
# (list) default list of tags to run in your plays, Skip Tags has precedence.
;run=
# (list) default list of tags to skip in your plays, has precedence over Run Tags
;skip=
[runas_become_plugin]
# (string) Options to pass to runas, a space delimited list of k=v pairs
;flags=
# (string) password
;password=
# (string) User you 'become' to execute the task
;user=
[su_become_plugin]
# (string) Su executable
;executable=su
# (string) Options to pass to su
;flags=
# (string) Password to pass to su
;password=
# (string) User you 'become' to execute the task
;user=root
# (list) List of localized strings to match for prompt detection
# If empty we'll use the built in one
# Do NOT add a colon (:) to your custom entries. Ansible adds a colon at the end of each prompt; if you add another one in your string, your prompt will fail with a "Timeout" error.
;localized_prompts=
[sudo_become_plugin]
# (string) Sudo executable
;executable=sudo
# (string) Options to pass to sudo
;flags=-H -S -n
# (string) Password to pass to sudo
;password=
# (string) User you 'become' to execute the task
;user=root
[callback_tree]
# (path) directory that will contain the per host JSON files. Also set by the C(--tree) option when using adhoc.
;directory=~/.ansible/tree
[ssh_connection]
# (string) Only used in parsing ProxyCommand for use in this plugin.
;ssh_args=
# (string) Only used in parsing ProxyCommand for use in this plugin.
;ssh_common_args=
# (string) Only used in parsing ProxyCommand for use in this plugin.
;ssh_extra_args=
# (string) This is the location to save SSH's ControlPath sockets, it uses SSH's variable substitution.
# Since 2.3, if null (default), ansible will generate a unique hash. Use ``%(directory)s`` to indicate where to use the control dir path setting.
# Before 2.3 it defaulted to ``control_path=%(directory)s/ansible-ssh-%%h-%%p-%%r``.
# Be aware that this setting is ignored if C(-o ControlPath) is set in ssh args.
;control_path=
# (string) This sets the directory to use for ssh control path if the control path setting is null.
# Also, provides the ``%(directory)s`` variable for the control path setting.
;control_path_dir=~/.ansible/cp
# (boolean) Determines if SSH should check host keys.
;host_key_checking=True
# (boolean) Pipelining reduces the number of connection operations required to execute a module on the remote server, by executing many Ansible modules without actual file transfers.
# This can result in a very significant performance improvement when enabled.
# However this can conflict with privilege escalation (become). For example, when using sudo operations you must first disable 'requiretty' in the sudoers file for the target hosts, which is why this feature is disabled by default.
;pipelining=False
# (string) PKCS11 SmartCard provider such as opensc, example: /usr/local/lib/opensc-pkcs11.so
# Requires sshpass version 1.06+, sshpass must support the -P option.
;pkcs11_provider=
# (integer) Number of attempts to connect.
# Ansible retries connections only if it gets an SSH error with a return code of 255.
# Any errors with return codes other than 255 indicate an issue with program execution.
;retries=0
# (string) This defines the location of the scp binary. It defaults to V(scp) which will use the first binary available in $PATH.
;scp_executable=scp
# (string) Extra exclusive to the C(scp) CLI
;scp_extra_args=
# (string) Preferred method to use when transferring files over SSH.
# When set to V(smart), Ansible will try them until one succeeds or they all fail.
# If set to V(True), it will force 'scp', if V(False) it will use 'sftp'.
# For OpenSSH >=9.0 you must add an additional option to enable scp (C(scp_extra_args="-O"))
# This setting will overridden by O(ssh_transfer_method) if set.
;scp_if_ssh=smart
# (bool) TODO: write it
;sftp_batch_mode=True
# (string) This defines the location of the sftp binary. It defaults to V(sftp) which will use the first binary available in $PATH.
;sftp_executable=sftp
# (string) Extra exclusive to the C(sftp) CLI
;sftp_extra_args=
# (string) This defines the location of the SSH binary. It defaults to V(ssh) which will use the first SSH binary available in $PATH.
# This option is usually not required, it might be useful when access to system SSH is restricted, or when using SSH wrappers to connect to remote hosts.
;ssh_executable=ssh
# (string) Preferred method to use when transferring files over ssh
# Setting to 'smart' (default) will try them in order, until one succeeds or they all fail
# For OpenSSH >=9.0 you must add an additional option to enable scp (scp_extra_args="-O")
# Using 'piped' creates an ssh pipe with C(dd) on either side to copy the data
;transfer_method=
# (string) Password prompt that sshpass should search for. Supported by sshpass 1.06 and up.
# Defaults to C(Enter PIN for) when pkcs11_provider is set.
;sshpass_prompt=
# (integer) This is the default amount of time we will wait while establishing an SSH connection.
# It also controls how long we can wait to access reading the connection once established (select on the socket).
;timeout=10
# (bool) add -tt to ssh commands to force tty allocation.
;usetty=True
[winrm]
# (list) A list of environment variables to pass through to C(kinit) when getting the Kerberos authentication ticket.
# By default no environment variables are passed through and C(kinit) is run with a blank slate.
# The environment variable C(KRB5CCNAME) cannot be specified here as it's used to store the temp Kerberos ticket used by WinRM.
;kinit_env_vars=
[inventory_plugins]
# (bool) Merge extra vars into the available variables for composition (highest precedence).
;use_extra_vars=False
[inventory_plugin_script]
# (boolean) Toggle display of stderr even when script was successful
;always_show_stderr=True
[inventory_plugin_yaml]
# (list) list of 'valid' extensions for files containing YAML
;yaml_valid_extensions=.yaml, .yml, .json
[url_lookup]
# (string) String of file system path to CA cert bundle to use
;ca_path=
# (list) SSL/TLS Ciphers to use for the request
# When a list is provided, all ciphers are joined in order with C(:)
# See the L(OpenSSL Cipher List Format,https://www.openssl.org/docs/manmaster/man1/openssl-ciphers.html#CIPHER-LIST-FORMAT) for more details.
# The available ciphers is dependent on the Python and OpenSSL/LibreSSL versions
;ciphers=
# (string) String of urllib2, all/yes, safe, none to determine how redirects are followed, see RedirectHandlerFactory for more information
;follow_redirects=urllib2
# (boolean) Whether or not to set "cache-control" header with value "no-cache"
;force=False
# (boolean) Force basic authentication
;force_basic_auth=False
# (string) User-Agent to use in the request. The default was changed in 2.11 to V(ansible-httpget).
;agent=ansible-httpget
# (float) How long to wait for the server to send data before giving up
;timeout=10
# (string) String of file system path to unix socket file to use when establishing connection to the provided url
;unix_socket=
# (list) A list of headers to not attach on a redirected request
;unredirected_headers=
# (boolean) Use GSSAPI handler of requests
# As of Ansible 2.11, GSSAPI credentials can be specified with O(username) and O(password).
;use_gssapi=False
# (boolean) Determining whether to use credentials from ``~/.netrc`` file
# By default .netrc is used with Basic authentication headers
# When set to False, .netrc credentials are ignored
;use_netrc=True
[powershell]
# (string) Directory in which ansible will keep async job information.
# Before Ansible 2.8, this was set to C(remote_tmp + "\.ansible_async").
;async_dir=%USERPROFILE%\.ansible_async
# (string) Temporary directory to use on targets when copying files to the host.
;remote_tmp=%TEMP%
[vars_host_group_vars]
# (str) Control when this vars plugin may be executed.
# Setting this option to V(all) will run the vars plugin after importing inventory and whenever it is demanded by a task.
# Setting this option to V(task) will only run the vars plugin whenever it is demanded by a task.
# Setting this option to V(inventory) will only run the vars plugin after parsing inventory.
# If this option is omitted, the global C(RUN_VARS_PLUGINS) configuration is used to determine when to execute the vars plugin.
;stage=

View File

@@ -0,0 +1,14 @@
## Actually All Emojis
An up-to-date package for [espanso](https://espanso.org/) which provides triggers for all emojis (`v14.0`). Emojis and codes fetched from [Unicode.org](https://unicode.org/emoji/charts/full-emoji-list.html)
### Usage
To use this package, just type the name of the emoji between two colons. For example, to use the `smile` emoji 😄, you can type: `:smile:`
A full list of emojis and their CLDR Short Names can be found [here](https://unicode.org/emoji/charts/full-emoji-list.html)
**Note**: There are two options for this package. One with spaces between words, and one with underscores. This version uses _spaces_
For example `:kissing face:`
To install the version with underscores use `actually-all-emojis`

View File

@@ -0,0 +1,7 @@
author: Jobie Wong
description: An updated package providing all v.14 emojis - fetched from unicode.org
name: actually-all-emojis-spaces
title: Actually All Emojis (Spaces)
version: 0.1.0
homepage: "https://github.com/jobiewong/espanso-emojis"
tags: ["emoji", "chat"]

View File

@@ -0,0 +1,2 @@
---
hub

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +1,18 @@
[core] [core]
excludesfile = ~/.config/git/gitignore excludesfile = ~/.config/git/gitignore
ignorecasse = false
[init] [init]
defaultBranch = main defaultBranch = main
[user] [user]
name = Michael Housh name = Michael Housh
email = mhoush@houshhomeenergy.com email = mhoush@houshhomeenergy.com
signingkey = mhoush@houshhomeenergy.com
[commit]
gpgsign = true
[tag]
gpgSign = true
[color] [color]
ui = true ui = true
[filter "lfs"] [filter "lfs"]
@@ -12,3 +20,10 @@
smudge = git-lfs smudge -- %f smudge = git-lfs smudge -- %f
process = git-lfs filter-process process = git-lfs filter-process
required = true required = true
[credential]
helper = gopass
[credential "https://git.housh.dev"]
username = michael
[push]
autoSetupRemote = true

6
gopass/config Normal file
View File

@@ -0,0 +1,6 @@
[mounts]
path = /Users/michael/.local/share/password-store
[recipients]
hash = 3199e2acda60d6f17a15882ba11749feda9775cf848554c8f04f12bc84521fd3
[mounts "servers"]
path = /Users/michael/.local/share/gopass/stores/servers

32
gpg-tui/gpg-tui.toml Normal file
View File

@@ -0,0 +1,32 @@
[general]
splash = false
tick_rate = 250
color = "gray"
style = "colored"
file_explorer = "xplr"
detail_level = "minimum"
# log_file = "test"
# key_bindings = [
# { keys = [ "?" ], command = ":help" },
# { keys = [ "o" ], command = ":options" },
# { keys = [ "n" ], command = ":normal" },
# { keys = [ "v" ], command = ":visual" },
# { keys = [ "c" ], command = ":copy" },
# { keys = [ "p", "C-v" ], command = ":paste" },
# { keys = [ "x" ], command = ":export" },
# { keys = [ "s" ], command = ":set prompt :sign" },
# { keys = [ "e" ], command = ":set prompt :edit" },
# { keys = [ "i" ], command = ":set prompt :import"},
# { keys = [ "f" ], command = ":set prompt :receive" },
# { keys = [ "u" ], command = ":set prompt :send" },
# { keys = [ "g" ], command = ":generate" },
# { keys = [ "d", "backspace" ], command = ":delete" },
# { keys = [ "C-r" ], command = ":refresh" },
# ]
[gpg]
armor = false
homedir = "~/.gnupg"
outdir = "~/.gnupg/out"
# outfile = "{type}_{query}.{ext}"
# default_key = "0xA1B2C3XY"

View File

@@ -0,0 +1,202 @@
{
"global": {
"ask_for_confirmation_before_quitting": true,
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false,
"unsafe_ui": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
"basic.simultaneous_threshold_milliseconds": 50,
"basic.to_delayed_action_delay_milliseconds": 500,
"basic.to_if_alone_timeout_milliseconds": 1000,
"basic.to_if_held_down_threshold_milliseconds": 500,
"mouse_motion_to_scroll.speed": 100
},
"rules": []
},
"devices": [
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"game_pad_swap_sticks": false,
"identifiers": {
"is_game_pad": false,
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 834,
"vendor_id": 1452
},
"ignore": false,
"manipulate_caps_lock_led": true,
"mouse_flip_horizontal_wheel": false,
"mouse_flip_vertical_wheel": false,
"mouse_flip_x": false,
"mouse_flip_y": false,
"mouse_swap_wheels": false,
"mouse_swap_xy": false,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"game_pad_swap_sticks": false,
"identifiers": {
"is_game_pad": false,
"is_keyboard": false,
"is_pointing_device": true,
"product_id": 834,
"vendor_id": 1452
},
"ignore": true,
"manipulate_caps_lock_led": false,
"mouse_flip_horizontal_wheel": false,
"mouse_flip_vertical_wheel": false,
"mouse_flip_x": false,
"mouse_flip_y": false,
"mouse_swap_wheels": false,
"mouse_swap_xy": false,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
}
],
"fn_function_keys": [
{
"from": {
"key_code": "f1"
},
"to": [
{
"consumer_key_code": "display_brightness_decrement"
}
]
},
{
"from": {
"key_code": "f2"
},
"to": [
{
"consumer_key_code": "display_brightness_increment"
}
]
},
{
"from": {
"key_code": "f3"
},
"to": [
{
"apple_vendor_keyboard_key_code": "mission_control"
}
]
},
{
"from": {
"key_code": "f4"
},
"to": [
{
"apple_vendor_keyboard_key_code": "spotlight"
}
]
},
{
"from": {
"key_code": "f5"
},
"to": [
{
"consumer_key_code": "dictation"
}
]
},
{
"from": {
"key_code": "f6"
},
"to": [
{
"key_code": "f6"
}
]
},
{
"from": {
"key_code": "f7"
},
"to": [
{
"consumer_key_code": "rewind"
}
]
},
{
"from": {
"key_code": "f8"
},
"to": [
{
"consumer_key_code": "play_or_pause"
}
]
},
{
"from": {
"key_code": "f9"
},
"to": [
{
"consumer_key_code": "fast_forward"
}
]
},
{
"from": {
"key_code": "f10"
},
"to": [
{
"consumer_key_code": "mute"
}
]
},
{
"from": {
"key_code": "f11"
},
"to": [
{
"consumer_key_code": "volume_decrement"
}
]
},
{
"from": {
"key_code": "f12"
},
"to": [
{
"consumer_key_code": "volume_increment"
}
]
}
],
"name": "Default profile",
"parameters": {
"delay_milliseconds_before_open_device": 1000
},
"selected": true,
"simple_modifications": [],
"virtual_hid_keyboard": {
"country_code": 0,
"indicate_sticky_modifier_keys_state": true,
"mouse_key_xy_scale": 100
}
}
]
}

240
karabiner/karabiner.json Normal file
View File

@@ -0,0 +1,240 @@
{
"global": {
"ask_for_confirmation_before_quitting": true,
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false,
"unsafe_ui": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
"basic.simultaneous_threshold_milliseconds": 50,
"basic.to_delayed_action_delay_milliseconds": 500,
"basic.to_if_alone_timeout_milliseconds": 1000,
"basic.to_if_held_down_threshold_milliseconds": 500,
"mouse_motion_to_scroll.speed": 100
},
"rules": [
{
"manipulators": [
{
"description": "Change caps_lock to command+control+option+shift.",
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_shift",
"modifiers": [
"left_command",
"left_control",
"left_option"
]
}
],
"type": "basic"
}
]
}
]
},
"devices": [
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"game_pad_swap_sticks": false,
"identifiers": {
"is_game_pad": false,
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 834,
"vendor_id": 1452
},
"ignore": false,
"manipulate_caps_lock_led": true,
"mouse_flip_horizontal_wheel": false,
"mouse_flip_vertical_wheel": false,
"mouse_flip_x": false,
"mouse_flip_y": false,
"mouse_swap_wheels": false,
"mouse_swap_xy": false,
"simple_modifications": [
{
"from": {
"key_code": "caps_lock"
},
"to": [
{
"key_code": "left_control"
}
]
}
],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"game_pad_swap_sticks": false,
"identifiers": {
"is_game_pad": false,
"is_keyboard": false,
"is_pointing_device": true,
"product_id": 834,
"vendor_id": 1452
},
"ignore": true,
"manipulate_caps_lock_led": false,
"mouse_flip_horizontal_wheel": false,
"mouse_flip_vertical_wheel": false,
"mouse_flip_x": false,
"mouse_flip_y": false,
"mouse_swap_wheels": false,
"mouse_swap_xy": false,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
}
],
"fn_function_keys": [
{
"from": {
"key_code": "f1"
},
"to": [
{
"consumer_key_code": "display_brightness_decrement"
}
]
},
{
"from": {
"key_code": "f2"
},
"to": [
{
"consumer_key_code": "display_brightness_increment"
}
]
},
{
"from": {
"key_code": "f3"
},
"to": [
{
"apple_vendor_keyboard_key_code": "mission_control"
}
]
},
{
"from": {
"key_code": "f4"
},
"to": [
{
"apple_vendor_keyboard_key_code": "spotlight"
}
]
},
{
"from": {
"key_code": "f5"
},
"to": [
{
"consumer_key_code": "dictation"
}
]
},
{
"from": {
"key_code": "f6"
},
"to": [
{
"key_code": "f6"
}
]
},
{
"from": {
"key_code": "f7"
},
"to": [
{
"consumer_key_code": "rewind"
}
]
},
{
"from": {
"key_code": "f8"
},
"to": [
{
"consumer_key_code": "play_or_pause"
}
]
},
{
"from": {
"key_code": "f9"
},
"to": [
{
"consumer_key_code": "fast_forward"
}
]
},
{
"from": {
"key_code": "f10"
},
"to": [
{
"consumer_key_code": "mute"
}
]
},
{
"from": {
"key_code": "f11"
},
"to": [
{
"consumer_key_code": "volume_decrement"
}
]
},
{
"from": {
"key_code": "f12"
},
"to": [
{
"consumer_key_code": "volume_increment"
}
]
}
],
"name": "Default profile",
"parameters": {
"delay_milliseconds_before_open_device": 1000
},
"selected": true,
"simple_modifications": [],
"virtual_hid_keyboard": {
"country_code": 0,
"indicate_sticky_modifier_keys_state": true,
"mouse_key_xy_scale": 100
}
}
]
}

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.micheal.dotfiles.commit</string>
<key>WorkingDirectory</key>
<string>/Users/michael/.dotfiles</string>
<key>ProgramArguments</key>
<array>
<string>/Users/michael/.local/share/scripts/auto-git-commit</string>
</array>
<key>StartInterval</key>
<integer>3600</integer>
<key>KeepAlive</key>
<true/>
<key>RunAtLoad</key>
<true/>
<key>StandardOutPath</key>
<string>/tmp/com.michael.dotfiles.commit.log</string>
<key>StandardErrorPath</key>
<string>/tmp/com.michael.dotfiles.commit.error.log</string>
</dict>
</plist>

14
nvim/m-housh/init.lua Normal file → Executable file
View File

@@ -1,20 +1,18 @@
-- Leader needs to be set before loading plugins -- Leader needs to be set before loading plugins
vim.g.mapleader = " " vim.g.mapleader = " "
vim.g.maplocalleader = " " vim.g.maplocalleader = " "
-- Auto commands -- Auto commands
require('user.autocmd') require("user.autocmd")
-- Plugins -- Plugins
require('user.plugins') require("user.plugins")
-- Key maps -- Key maps
require('user.mappings') require("user.keymaps")
-- Theme (must stay after plugins are loaded) -- Theme (must stay after plugins are loaded)
require('user.theme') require("user.theme")
-- Common settings -- Common settings
require('user.settings') require("user.settings")
vim.o.shiftwidth = 2

View File

@@ -1,49 +0,0 @@
{
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"LuaSnip": { "branch": "master", "commit": "80a8528f084a97b624ae443a6f50ff8074ba486b" },
"bufdelete.nvim": { "branch": "master", "commit": "07d1f8ba79dec59d42b975a4df1c732b2e4e37b4" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-calc": { "branch": "main", "commit": "ce91d14d2e7a8b3f6ad86d85e34d41c1ae6268d9" },
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
"cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp-spell": { "branch": "master", "commit": "32a0867efa59b43edbb2db67b0871cfad90c9b66" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"formatter.nvim": { "branch": "master", "commit": "34dcdfa0c75df667743b2a50dd99c84a557376f0" },
"friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" },
"go.nvim": { "branch": "master", "commit": "694af9c0ee3a1d11bdb312ec67eebde74b6a4bbe" },
"guess-indent.nvim": { "branch": "main", "commit": "b8ae749fce17aa4c267eec80a6984130b94f80b2" },
"guihua.lua": { "branch": "master", "commit": "5ad8dba19ce9b9fd8965598984dfdc9c119f97e4" },
"lazy.nvim": { "branch": "main", "commit": "42fb1e89adb8008a401848e131c5ecb985db52f1" },
"lazygit.nvim": { "branch": "main", "commit": "de35012036d43bca03628d40d083f7c02a4cda3f" },
"lsp_signature.nvim": { "branch": "master", "commit": "33250c84c7a552daf28ac607d9d9e82f88cd0907" },
"lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" },
"lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "09be3766669bfbabbe2863c624749d8da392c916" },
"mason.nvim": { "branch": "main", "commit": "cd7835b15f5a4204fc37e0aa739347472121a54c" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "0b9a83e6dc47513a81fd9086440d5638683f4f17" },
"neodev.nvim": { "branch": "main", "commit": "d617d9eb27e73e701e446874c6ea2cb528719260" },
"nightfox.nvim": { "branch": "main", "commit": "6a6076bd678f825ffbe16ec97807793c3167f1a7" },
"noice.nvim": { "branch": "main", "commit": "8f1b53ab85f83e0687d0f267085ad781ec240432" },
"nui.nvim": { "branch": "main", "commit": "c0c8e347ceac53030f5c1ece1c5a5b6a17a25b32" },
"nvim-cmp": { "branch": "main", "commit": "d3a3056204e1a9dbb7c7fe36c114dc43b681768c" },
"nvim-dap": { "branch": "master", "commit": "b595c820018a15b6d54bf53b5cbeaa6f2d7a27e2" },
"nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "57f1dbd0458dd84a286b27768c142e1567f3ce3b" },
"nvim-lsp-installer": { "branch": "main", "commit": "17e0bfa5f2c8854d1636fcd036dc8284db136baa" },
"nvim-lspconfig": { "branch": "master", "commit": "38da5bbe1eaab2394056109e48c7e195bdb8fdfe" },
"nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" },
"nvim-treesitter": { "branch": "master", "commit": "0179a89656b4ce395a4487c07ae385b8425524ae" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "eb208bfdfcf76efea0424747e23e44641e13aaa6" },
"nvim-web-devicons": { "branch": "master", "commit": "f0267921c845c42685968401bc49aa65e18d3e09" },
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
"swift.nvim": { "branch": "main", "commit": "bbbd2e5eb988920ac35f00e67fbb08cb2ebbe958" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
"telescope.nvim": { "branch": "0.1.x", "commit": "7011eaae0ac1afe036e30c95cf80200b8dc3f21a" },
"toggleterm.nvim": { "branch": "main", "commit": "c80844fd52ba76f48fabf83e2b9f9b93273f418d" },
"vim-tmux-navigator": { "branch": "master", "commit": "7db70e08ea03b3e4d91f63713d76134512e28d7e" },
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" },
"wrapping.nvim": { "branch": "master", "commit": "696febba72939cf9082e0fd9cb9c603254cfa8a6" },
"zen-mode.nvim": { "branch": "main", "commit": "50e2e2a36cc97847d9ab3b1a3555ba2ef6839b50" }
}

102
nvim/m-housh/lua/user/autocmd.lua Normal file → Executable file
View File

@@ -1,81 +1,41 @@
local defaultGroupOptions = { clear = true } local defaultGroupOptions = { clear = true }
local markdownGroup = vim.api.nvim_create_augroup("MyMarkdownGroup", defaultGroupOptions) local markdownGroup = vim.api.nvim_create_augroup("MyMarkdownGroup", defaultGroupOptions)
local spellGroup = vim.api.nvim_create_augroup('SpellGroup', defaultGroupOptions) local spellGroup = vim.api.nvim_create_augroup("SpellGroup", defaultGroupOptions)
local createCmd = vim.api.nvim_create_autocmd local createCmd = vim.api.nvim_create_autocmd
local swiftGroup = vim.api.nvim_create_augroup('swift_lsp', { clear = true })
-- Remove all trailing whitespace on save
vim.api.nvim_exec([[
augroup TrimWhiteSpace
au!
autocmd BufWritePre * :%s/\s\+$//e
augroup END
]], false)
-- Prevent new line to also start with a comment
vim.api.nvim_exec([[
augroup NewLineComment
au!
au FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
augroup END
]], false)
-- Spell check -- Spell check
createCmd( createCmd("BufEnter", {
"BufEnter", pattern = { "*.md", "*.markdown", "*.txt", "*.tex" },
{ group = spellGroup,
pattern = { '*.md', '*.markdown', '*.txt', '*.tex' }, callback = function(_)
group = spellGroup, vim.cmd.setlocal("textwidth=80")
callback = function(_) vim.cmd.setlocal("spell spelllang=en_us")
vim.cmd.setlocal('textwidth=80') end,
vim.cmd.setlocal('spell spelllang=en_us') })
end,
}
)
-- Markdown -- Markdown
createCmd( createCmd("BufWritePost", {
"BufWritePost", pattern = { "*.md", "*.markdown" },
{ group = markdownGroup,
pattern = { "*.md", "*.markdown" }, callback = function(_)
group = markdownGroup, local cursor = vim.fn.getpos(".")
callback = function(_) vim.cmd("FormatWrite")
local cursor = vim.fn.getpos('.') vim.fn.setpos(".", cursor)
vim.cmd("FormatWrite") end,
vim.fn.setpos('.', cursor) })
end,
}
)
-- Go -- Go
createCmd( createCmd("BufWritePre", {
"BufWritePre", pattern = "*.go",
{ callback = function()
pattern = "*.go", require("go.format").goimport()
callback = function() end,
require('go.format').goimport() group = vim.api.nvim_create_augroup("GoFormat", defaultGroupOptions),
end, })
group = vim.api.nvim_create_augroup("GoFormat", defaultGroupOptions)
}
)
-- Swift vim.api.nvim_exec2(
-- createCmd( [[
-- "FileType", autocmd BufNewFile,BufRead /private/**/gopass** setlocal noswapfile nobackup noundofile shada=""
-- { ]],
-- pattern = { 'swift' }, {}
-- callback = function() )
-- local root_dir = vim.fs.dirname(vim.fs.find({
-- "Package.swift",
-- ".git",
-- }, { upward = true })[1])
-- local client = vim.lsp.start({
-- name = "sourcekit-lsp",
-- cmd = { "sourcekit-lsp" },
-- root_dir = root_dir
-- })
-- vim.lsp.buf_attach_client(0, client)
-- end,
-- group = swiftGroup
-- }
-- )

View File

@@ -0,0 +1,73 @@
vim.g.mapleader = " "
vim.g.maplocalleader = " "
local keymap = vim.keymap.set
local default_options = { noremap = true, silent = true }
local telescope = require("telescope.builtin")
local wk = require("which-key")
local wk_add = function(mode, keymaps)
wk.add(keymaps, { mode = mode, silent = true })
end
local find_files = function(dir)
return function()
telescope.find_files({ cwd = dir, hidden = true, no_ignore = true })
end
end
--------------------------------------------------------------------------------
-- Insert Mode
--------------------------------------------------------------------------------
-- easier escape key mapping
keymap("i", "jk", "<ESC>", default_options)
wk_add("i", {
{ "<C-s>", "<ESC>:write<CR>a", desc = "[S]ave" },
})
--------------------------------------------------------------------------------
-- Normal Mode
--------------------------------------------------------------------------------
wk_add("n", {
{ "<Left>", ":vertical resize +1<CR>", desc = "Resize Pane Left" },
{ "<Right>", ":vertical resize -1<CR>", desc = "Resize Pane Right" },
{ "<Up>", "resize -1<CR>", desc = "Resize Pane Up" },
{ "<Down>", "resize +1<CR>", desc = "Resize Pane Down" },
{ "<leader>n", "<CMD>:noh<CR>", desc = "[N]o highlighting" },
{ "<leader>s", "<CMD>:set spell!<CR>", desc = "[S]pell check toggle" },
{ "<C-s>", "<CMD>:write<CR>", desc = "[S]ave" },
{ "J", ":move .+1<CR>==", desc = "Move line down" },
{ "K", ":move .-2<CR>==", desc = "Move line up" },
-- Git
{ "<leader>gg", ":LazyGit<CR>", desc = "Open [G]it" },
{ "<leader>gf", ":Telescope git_files<CR>", desc = "Find [G]it [F]ile" },
{ "<leader>t", ":ToggleTerm<CR>", desc = "Open [T]erminal" },
-- Telescope keymaps
{ "<leader>ff", telescope.find_files, desc = "[F]ind [F]iles" },
{ "<leader>fg", telescope.live_grep, desc = "[F]ind [G]rep" },
{ "<leader>fb", telescope.buffers, desc = "[F]ind [B]uffers" },
{ "<leader>fh", telescope.help_tags, desc = "[F]ind [H]elp" },
{ "<leader>fd", find_files("$DOTFILES"), desc = "[F]ind [D]otfiles" },
{ "<leader>fn", find_files("$DOTFILES/nvim/m-housh"), desc = "[F]ind [N]vim file" },
{ "<leader>fs", find_files("$DOTFILES/scripts/scripts"), desc = "[F]ind [S]cript" },
{ "<leader>fz", find_files("$DOTFILES/zsh/config"), desc = "[F]ind [Z]sh config file" },
{ "<leader>z", "<CMD>:ZenMode<CR>", desc = "[Z]en Mode" },
})
--------------------------------------------------------------------------------
-- Visual Mode
--------------------------------------------------------------------------------
vim.keymap.set("v", "K", ":move '<-2<CR>gv=gv", { desc = "Move selected block up.", silent = true, noremap = true })
vim.keymap.set("v", "J", ":move '>+1<CR>gv=gv", { desc = "Move selected block up.", silent = true, noremap = true })
-- Toggle term key maps, that get attached when terminal is opened.
function _G.set_terminal_keymaps()
local opts = { buffer = 0 }
keymap("t", "<esc>", [[<C-\><C-n>]], opts)
end
vim.cmd("autocmd! TermOpen term://* lua set_terminal_keymaps()")

View File

@@ -1,126 +0,0 @@
local keymap = vim.keymap.set
local default_options = {noremap = true, silent = true}
local telescope = require('telescope.builtin')
-- local expr_options = {noremap = true, expr = true, silent = true}
vim.g.mapleader = " "
vim.g.maplocalleader = " "
-- easier escape key mapping
keymap('i', 'jk', '<ESC>', default_options)
keymap('n', '<c-s>', ':w<CR>', default_options)
keymap('i', '<c-s>', '<ESC>:w<CR>a', default_options)
-- paste over currently selected text without yanking it
keymap("v", "p", "\"_dP", default_options)
-- buffer focus
-- keymap('n', '<c-j>', '<c-w>j', default_options)
-- keymap('n', '<c-h>', '<c-w>h', default_options)
-- keymap('n', '<c-k>', '<c-w>k', default_options)
-- keymap('n', '<c-l>', '<c-w>l', default_options)
-- Resizing panes
keymap("n", "<Left>", ":vertical resize +1<CR>", default_options)
keymap("n", "<Right>", ":vertical resize -1<CR>", default_options)
keymap("n", "<Up>", ":resize -1<CR>", default_options)
keymap("n", "<Down>", ":resize +1<CR>", default_options)
-- Move selected line / block of text in visual mode
keymap("x", "K", ":move '<-2<CR>gv-gv", default_options)
keymap("x", "J", ":move '>+1<CR>gv-gv", default_options)
-- Toggle neo-tree open or closed
keymap("n", "<c-n>", "<CMD>:Neotree toggle<CR>", default_options)
-- Toggle Lazy Git
keymap("n", '<leader>gg', ':LazyGit<CR>', default_options)
keymap("n", "<leader>gf", ":Telescope git_files<CR>", default_options)
keymap("n", "<leader>t", ":ToggleTerm<CR>", default_options)
-- Zen Mode Toggle
keymap('n', '<leader>z', "<cmd>:ZenMode<CR>", default_options)
-- Toggle term key maps, that get attached when terminal is opened.
function _G.set_terminal_keymaps()
local opts = { buffer = 0 }
vim.keymap.set('t', '<esc>', [[<C-\><C-n>]], opts)
end
vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()')
-- Formatting
keymap('n', '<leader>f', '<cmd>:Format<CR>', default_options)
keymap('n', '<leader>F', '<cmd>:FormatWrite<CR>', default_options)
-- Telescope keymaps
vim.keymap.set('n', '<leader>ff', telescope.find_files, {})
vim.keymap.set('n', '<leader>fg', telescope.live_grep, {})
vim.keymap.set('n', '<leader>fb', telescope.buffers, {})
vim.keymap.set('n', '<leader>fh', telescope.help_tags, {})
-- Find espanso config files.
keymap('n', '<leader>fe', function()
telescope.find_files({
cwd='$HOME/.dotfiles/espanso/espanso'
})
end, default_options)
-- Find nvim config files.
keymap('n', '<leader>fn', function()
telescope.find_files({
cwd='$HOME/.dotfiles/nvim/m-housh'
})
end, default_options)
-- Find script files.
keymap('n', '<leader>fs', function()
telescope.find_files({
cwd='$HOME/.dotfiles/scripts/scripts'
})
end, default_options)
-- Find zsh config files.
keymap('n', '<leader>fz', function()
telescope.find_files({
cwd = '$HOME/.dotfiles/zsh/config',
hidden = true
})
end, default_options)
-- Turn off highlighting after search.
keymap('n', '<leader>n', '<cmd>:noh<cr>', default_options)
-- Toggle Spell Checking.
keymap('n', '<leader>s', '<cmd>:set spell!<cr>', default_options)
-- LuaSnip Keymaps
--local ls = require('luasnip')
-- <c-k> to expand snippets.
-- This will expand the snippet or jump to the next item within the snippet.
-- vim.keymap.set({ "i", "s" }, "<c-k>", function()
-- if ls.expand_or_jumpable() then
-- ls.expand_or_jump()
-- end
-- end, { silent = true })
-- <c-j>
-- This will jump backwards in the snippet.
-- vim.keymap.set({ "i", "s" }, "<c-j>", function()
-- if ls.jumpable(-1) then
-- ls.jump(-1)
-- end
-- end, { silent = true })
-- <c-l>
-- This is for selecting withing a list of options.
-- vim.keymap.set("i", "<c-l>", function()
-- if ls.choice_active() then
-- ls.change_choice(1)
-- end
-- end, { silent = true })
-- Reload the snippets.
--vim.keymap.set("n", "<leader><leader>s", "<cmd>source ~/.config/m-housh/lua/snippets/init.lua<cr>")

227
nvim/m-housh/lua/user/plugin/cmp.lua Normal file → Executable file
View File

@@ -1,153 +1,82 @@
return { return {
"hrsh7th/nvim-cmp", "hrsh7th/nvim-cmp",
enabled = true, event = "InsertEnter",
dependencies = { dependencies = {
"hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer", "hrsh7th/cmp-buffer", -- source for text in buffer
"hrsh7th/cmp-path", "hrsh7th/cmp-path", -- source for file system paths
"hrsh7th/cmp-cmdline", "L3MON4D3/LuaSnip", -- snippet engine
--"hrsh7th/cmp-vsnip", "saadparwaiz1/cmp_luasnip", -- for autocompletion
'saadparwaiz1/cmp_luasnip', "rafamadriz/friendly-snippets", -- useful snippets
"f3fora/cmp-spell", "onsails/lspkind.nvim", -- vs-code like pictograms
"hrsh7th/cmp-calc", },
"hrsh7th/cmp-emoji", config = function()
"L3MON4D3/LuaSnip", local cmp = require("cmp")
local luasnip = require("luasnip")
local lspkind = require("lspkind")
-- Adds a number of user-friendly snippets -- TODO: This is implemented in LuaSnip config, does it need to be here?
'rafamadriz/friendly-snippets',
},
event = { 'BufReadPre', 'BufNewFile' },
config = function()
-- Setup nvim-cmp.
local cmp = require "cmp"
local lspkind = require("lspkind")
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
local luasnip = require('luasnip')
local has_words_before = function() -- loads vscode style snippets from installed plugins (e.g. friendly-snippets)
local line, col = unpack(vim.api.nvim_win_get_cursor(0)) require("luasnip.loaders.from_vscode").lazy_load()
return col ~= 0
and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(
col, col):match("%s") == nil
end
local feedkey = function(key, mode) cmp.setup({
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), completion = {
mode, true) completeopt = "menu,menuone,preview",
end },
snippet = { -- configure how nvim-cmp interacts with snippet engine
expand = function(args)
require('lspconfig').sourcekit.setup { luasnip.lsp_expand(args.body)
capabilities = capabilities end,
} },
mapping = cmp.mapping.preset.insert({
lspkind.init({ ["<C-k>"] = cmp.mapping.select_prev_item(), -- previous suggestion
symbol_map = { ["<C-j>"] = cmp.mapping.select_next_item(), -- next suggestion
["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions
Text = "", ["<C-e>"] = cmp.mapping.abort(), -- close completion window
Method = "󰡱", ["<CR>"] = cmp.mapping(function(fallback)
Function = "󰡱", if cmp.visible() then
Constructor = "", if luasnip.expandable() then
Field = "", luasnip.expand()
Variable = "", else
Class = "", cmp.confirm({ select = true })
Interface = "", end
Module = "", else
Property = "", fallback()
Unit = "", end
Value = "", end),
Enum = "", -- TODO:
Keyword = "", -- The next two mappings are also implemented in the LuaSnip configuration,
Snippet = "", -- as <C-j> and <C-k> do they actually need to be here??
Color = "", ["<C-b>"] = cmp.mapping(function(fallback)
File = "", if luasnip.jumpable(-1) then
Reference = "", luasnip.jump(-1)
Folder = "", else
EnumMember = "", fallback()
Constant = "", end
Struct = "", end, { "i", "s" }),
Event = "", ["<C-f>"] = cmp.mapping(function(fallback)
Operator = "", if luasnip.jumpable(1) then
TypeParameter = "" luasnip.jump(1)
} else
}) fallback()
end
-- Configure nvim-cmp. end, { "i", "s" }),
require('luasnip.loaders.from_vscode').lazy_load() }),
luasnip.config.setup {} -- sources for autocompletion
cmp.setup({ sources = cmp.config.sources({
formatting = { { name = "nvim_lsp" },
format = lspkind.cmp_format { { name = "luasnip" }, -- snippets
with_text = false, { name = "buffer" }, -- text within current buffer
maxwidth = 50, { name = "path" }, -- file system paths
menu = { }),
buffer = "BUF", -- configure lspkind for vs-code like pictograms in completion menu
nvim_lsp = "LSP", formatting = {
path = "PATH", format = lspkind.cmp_format({
vsnip = "SNIP", maxwidth = 50,
calc = "CALC", ellipsis_char = "...",
spell = "SPELL", }),
emoji = "EMOJI" },
} })
} end,
}, }
experimental = {native_menu = false, ghost_text = false},
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
--require('luasnip').lsp_expand(args.body)
end
},
mapping = {
["<C-p>"] = cmp.mapping.select_prev_item(),
["<C-n>"] = cmp.mapping.select_next_item(),
["<C-d>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = true
},
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expandable() then
luasnip.expand()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, {"i", "s"}),
["<S-Tab>"] = cmp.mapping(function()
if cmp.visible() then
cmp.select_prev_item()
-- elseif vim.fn["vsnip#jumpable"](-1) == 1 then
-- feedkey("<Plug>(vsnip-jump-prev)", "")
end
end, {"i", "s"})
},
sources = {
{name = "nvim_lsp"},
{name = "buffer", keyword_length = 5},
{name = 'luasnip', option = { show_autosnippets = true } },
{name = "calc"},
{name = "emoji"},
{name = "spell"},
{name = "path"}
}
})
-- Use buffer source for `/`.
cmp.setup.cmdline("/", {sources = {{name = "buffer"}}})
-- Use cmdline & path source for ':'.
cmp.setup.cmdline(":", {
sources = cmp.config.sources({{name = "path"}}, {{name = "cmdline"}})
})
end
}

0
nvim/m-housh/lua/user/plugin/comment.lua Normal file → Executable file
View File

View File

@@ -0,0 +1,23 @@
return {
"j-hui/fidget.nvim",
event = "VeryLazy",
config = function()
local fidget = require("fidget")
fidget.setup({
notification = {
window = {
normal_hl = "String", -- Base highlight group in the notification window
winblend = 0, -- Background color opacity in the notification window
border = "rounded", -- Border around the notification window
zindex = 45, -- Stacking priority of the notification window
max_width = 0, -- Maximum width of the notification window
max_height = 0, -- Maximum height of the notification window
x_padding = 1, -- Padding from right edge of window boundary
y_padding = 1, -- Padding from bottom edge of window boundary
align = "bottom", -- How to align the notification window
relative = "editor", -- What the notification window position is relative to
},
},
})
end,
}

97
nvim/m-housh/lua/user/plugin/formatter.lua Normal file → Executable file
View File

@@ -1,32 +1,69 @@
return { return {
"mhartington/formatter.nvim", "mhartington/formatter.nvim",
event = { 'BufReadPre', 'BufNewFile' }, event = { "BufReadPre", "BufNewFile" },
config = function() config = function()
local util = require("formatter.util") local util = require("formatter.util")
require("formatter").setup({ require("formatter").setup({
filetype = { filetype = {
markdown = function() lua = {
return { require("formatter.filetypes.lua").stylua,
exe = "prettier", function()
args = { return {
"--stdin-filepath", exe = "stylua",
util.escape_path(util.get_current_buffer_file_path()), args = {
"--print-width", "--search-parent-directories",
"80", "--stdin-filepath",
"--prose-wrap", util.escape_path(util.get_current_buffer_file_path()),
"always", "--",
"--parser", "-",
"markdown" },
}, stdin = true,
stdin = true, }
try_node_modules = true, end,
} },
end, markdown = function()
["*"] = { return {
-- formatter for any / all file types. exe = "prettier",
require("formatter.filetypes.any").remove_trailing_whitespace args = {
} "--stdin-filepath",
} util.escape_path(util.get_current_buffer_file_path()),
}) "--print-width",
end "80",
"--prose-wrap",
"always",
"--parser",
"markdown",
},
stdin = true,
try_node_modules = true,
}
end,
swift = function()
return {
exe = "swiftformat",
}
end,
["*"] = {
-- formatter for any / all file types.
require("formatter.filetypes.any").remove_trailing_whitespace,
},
},
})
-- Keymaps
local wk = require("which-key")
wk.add({
{ "<space>f", ":Format", desc = "[F]ormat" },
{ "<space>F", ":FormateWrite", desc = "[F]ormat write" },
}, { mode = "n", silent = true })
local augroup = vim.api.nvim_create_augroup
local autocmd = vim.api.nvim_create_autocmd
augroup("__formatter__", { clear = true })
autocmd("BufWritePost", {
group = "__formatter__",
command = ":FormatWrite",
})
end,
} }

0
nvim/m-housh/lua/user/plugin/go.lua Normal file → Executable file
View File

View File

@@ -0,0 +1,85 @@
return {
"ThePrimeagen/harpoon",
branch = "harpoon2",
dependencies = {
"nvim-lua/plenary.nvim",
},
config = function()
local harpoon = require("harpoon")
harpoon:setup({
settings = {
save_on_toggle = true,
sync_on_ui_close = true,
key = function()
return vim.loop.cwd()
end,
},
})
local conf = require("telescope.config").values
local function toggle_telescope(harpoon_files)
local file_paths = {}
for _, item in ipairs(harpoon_files.items) do
table.insert(file_paths, item.value)
end
require("telescope.pickers")
.new({}, {
prompt_title = "Harpoon",
finder = require("telescope.finders").new_table({
results = file_paths,
}),
previewer = conf.file_previewer({}),
sorter = conf.generic_sorter({}),
})
:find()
end
-- Keymaps
vim.keymap.set("n", "<C-e>", function()
toggle_telescope(harpoon:list())
end, { desc = "Open Harpoon window" })
vim.keymap.set("n", "<leader>a", function()
harpoon:list():add()
end, { desc = "[A]dd to harpoon list." })
vim.keymap.set("n", "<C-e>", function()
harpoon.ui:toggle_quick_menu(harpoon:list())
end, { desc = "Toggle quick menu." })
-- Buffer key maps. Currently keeping all buffer movements
-- isolated to top left row of keys on keyboard and all begin
-- with the <Control> key.
-- Select buffer numbers.
vim.keymap.set("n", "<A-y>", function()
harpoon:list():select(1)
end, { desc = "Select first harpoon buffer." })
vim.keymap.set("n", "<A-u>", function()
harpoon:list():select(2)
end, { desc = "Select second harpoon buffer." })
vim.keymap.set("n", "<A-i>", function()
harpoon:list():select(3)
end, { desc = "Select third harpoon buffer." })
vim.keymap.set("n", "<A-o>", function()
harpoon:list():select(4)
end, { desc = "Select fourth harpoon buffer." })
-- Toggle previous and next buffers.
vim.keymap.set("n", "<C-[>", function()
harpoon:list():prev()
end, { desc = "[P]revious harpoon buffer." })
vim.keymap.set("n", "<C-]>", function()
harpoon:list():next()
end, { desc = "[N]ext harpoon buffer." })
-- Extensions
harpoon:extend({
UI_CREATE = function(cx)
vim.keymap.set("n", "<C-v>", function()
harpoon.ui:select_menu_item({ vsplit = true })
end, { buffer = cx.buffer, desc = "Open in [V]split" })
end,
})
end,
}

31
nvim/m-housh/lua/user/plugin/init.lua Normal file → Executable file
View File

@@ -1,31 +1,2 @@
-- This file contains plugin's that don't require much configuration. -- This file contains plugin's that don't require much configuration.
return { return {}
{
"L3MON4D3/LuaSnip",
version = "2.*",
build = "make install_jsregexp",
event = { 'BufReadPre', 'BufNewFile' },
config = function()
local luasnip = require('luasnip')
local types = require('luasnip.util.types')
luasnip.config.set_config {
history = true,
updateevents = "TextChanged,TextChangedI",
enable_autosnippets = true,
ext_opts = {
[types.choiceNode] = {
active = {
virt_text = { { "<-", "Error" } },
},
},
},
}
end
},
{
"hrsh7th/vim-vsnip",
config = function()
vim.g.vsnip_snippet_dir = os.getenv('HOME') .. '/.config/m-housh/lua/snippets/'
end
},
}

0
nvim/m-housh/lua/user/plugin/lazygit.lua Normal file → Executable file
View File

313
nvim/m-housh/lua/user/plugin/lsp.lua Normal file → Executable file
View File

@@ -1,224 +1,91 @@
return { -- The language servers to setup.
{ local lsp_servers = {
"williamboman/nvim-lsp-installer", "bashls",
config = function() "clangd",
require("nvim-lsp-installer").setup({}) "dockerls",
end "gopls",
}, "jsonls",
{ "lua_ls",
"williamboman/mason-lspconfig.nvim", "marksman",
dependencies = { "sourcekit",
"williamboman/mason.nvim", "yamlls",
"onsails/lspkind-nvim", }
"famiu/bufdelete.nvim",
"ray-x/lsp_signature.nvim", return {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
"folke/neodev.nvim", event = { "BufReadPre", "BufNewFile" },
"mhartington/formatter.nvim", dependencies = {
"ray-x/go.nvim", "hrsh7th/cmp-nvim-lsp",
}, { "antosha417/nvim-lsp-file-operations", config = true },
opts = { "williamboman/mason.nvim",
ensure_installed = { "williamboman/mason-lspconfig.nvim",
"bashls", },
"clangd", config = function()
"dockerls", require("mason").setup()
"gopls", require("mason-lspconfig").setup({
"jsonls", opts = {
"jedi_language_server", ensure_installed = lsp_servers,
"lua_ls", },
"marksman", })
"terraformls", local lspconfig = require("lspconfig")
"tsserver", local cmp_nvim_lsp = require("cmp_nvim_lsp")
"texlab", local capabilities = cmp_nvim_lsp.default_capabilities()
"yamlls", local opts = { noremap = true, silent = true }
} local on_attach = function(_, bufnr)
} opts.buffer = bufnr
},
{ opts.desc = "Show line diagnostics"
"neovim/nvim-lspconfig", vim.keymap.set("n", "<leader>d", vim.diagnostic.open_float, opts)
dependencies = {
"hrsh7th/cmp-nvim-lsp", opts.desc = "Show diagnostics in Telescope"
}, vim.keymap.set("n", "<leader><leader>d", "<CMD>Telescope diagnostics bufnr=0<CR>", opts)
config = function()
require('neodev').setup() opts.desc = "Show documentation for what is under cursor"
require("mason").setup() vim.keymap.set("n", "<C-k>", vim.lsp.buf.hover, opts)
require("mason-lspconfig").setup()
local nvim_lsp = require("lspconfig") opts.desc = "[G]oto [D]efinition"
vim.keymap.set("n", "gd", "<cmd>Telescope lsp_definitions trim_text=true<cr>", opts)
-- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer opts.desc = "[G]oto [D]eclaration"
local on_attach = function(bufnr) vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts)
local function buf_set_keymap(...)
vim.api.nvim_buf_set_keymap(bufnr, ...) opts.desc = "LSP [C]ode [A]ction"
end vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, opts)
-- Mappings. --opts.desc = "[R]e-[N]ame"
local opts = {noremap = true, silent = true} --vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts)
-- See `:help vim.lsp.*` for documentation on any of the below functions opts.desc = "[R]eload or start LSP"
buf_set_keymap("n", "gD", "<Cmd>lua vim.lsp.buf.declaration()<CR>", opts) vim.keymap.set("n", "<leader>rl", ":LspRestart | :LspStart<CR>", opts)
buf_set_keymap("n", "gd", "<Cmd>lua vim.lsp.buf.definition()<CR>", opts)
buf_set_keymap("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts) opts.desc = "Goto previous diagnostic"
buf_set_keymap("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts) vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts)
buf_set_keymap("n", "gT", vim.lsp.buf.type_definition, opts)
-- buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts) opts.desc = "Goto next diagnostic"
buf_set_keymap("n", "<space>wa", vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts)
"<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>", opts) end
buf_set_keymap("n", "<space>wr",
"<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>", opts) for _, lsp in ipairs(lsp_servers) do
buf_set_keymap("n", "<space>wl", lspconfig[lsp].setup({
"<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>", capabilities = capabilities,
opts) on_attach = on_attach,
buf_set_keymap("n", "<space>D", on_init = function(client)
"<cmd>lua vim.lsp.buf.type_definition()<CR>", opts) -- HACK: to fix some issues with LSP
buf_set_keymap("n", "<space>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", opts) -- more details: https://github.com/neovim/neovim/issues/19237#issuecomment-2237037154
buf_set_keymap("n", "<space>ca", "<cmd>lua vim.lsp.buf.code_action()<CR>", client.offset_encoding = "utf-8"
opts) end,
buf_set_keymap("n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts) cmd = lsp == "sourcekit" and { vim.trim(vim.fn.system("xcrun -f sourcekit-lsp")) } or nil,
buf_set_keymap("n", "<space>e", "<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>", opts) })
buf_set_keymap("n", "[d", "<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>", opts) end
buf_set_keymap("n", "]d", "<cmd>lua vim.lsp.diagnostic.goto_next()<CR>", opts) -- nice icons
buf_set_keymap("n", "<space>q", "<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>", opts) local signs = { Error = "", Warn = "", Hint = "󰠠 ", Info = "" }
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts) for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
end end
-- Use a loop to conveniently call 'setup' on multiple servers and -- For some reason I was having trouble getting this to work inside the on-attach, so it's here.
-- map buffer local keybindings when the language server attaches vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, { desc = "[R]e-[N]ame" })
--local capabilities = vim.lsp.protocol.make_client_capabilities() end,
local capabilities = require("cmp_nvim_lsp").default_capabilities()
local servers = {
"bashls",
"clangd",
"dockerls",
"gopls",
"jsonls",
"jedi_language_server",
"lua_ls",
"marksman",
"sourcekit",
"terraformls",
"tsserver",
"texlab",
"yamlls",
}
for _, lsp in ipairs(servers) do
nvim_lsp[lsp].setup {
on_attach = on_attach,
capabilities = capabilities,
settings = {
gopls = {
experimentalPostfixCompletions = true,
analyses = {
unusedparams = true,
shadow = true
},
staticcheck = true
},
lua_ls = {
Lua = {
completion = {
callSnippet = "Replace"
},
workspace = { checkThirdParty = false },
telemetry = { enable = false },
}
},
json = {
format = {enabled = false},
schemas = {
{
description = "ESLint config",
fileMatch = {".eslintrc.json", ".eslintrc"},
url = "http://json.schemastore.org/eslintrc"
}, {
description = "Package config",
fileMatch = {"package.json"},
url = "https://json.schemastore.org/package"
}, {
description = "Packer config",
fileMatch = {"packer.json"},
url = "https://json.schemastore.org/packer"
}, {
description = "Renovate config",
fileMatch = {
"renovate.json", "renovate.json5",
".github/renovate.json", ".github/renovate.json5",
".renovaterc", ".renovaterc.json"
},
url = "https://docs.renovatebot.com/renovate-schema"
}, {
description = "OpenApi config",
fileMatch = {"*api*.json"},
url = "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json"
}
}
},
redhat = {telemetry = {enabled = false}},
texlab = {
auxDirectory = ".",
bibtexFormatter = "texlab",
build = {
args = {
"--keep-intermediates", "--keep-logs", "--synctex", "%f"
},
executable = "tectonic",
forwardSearchAfter = false,
onSave = false
},
chktex = {onEdit = false, onOpenAndSave = false},
diagnosticsDelay = 300,
formatterLineLength = 80,
forwardSearch = {args = {}},
latexFormatter = "latexindent",
latexindent = {modifyLineBreaks = false}
},
yaml = {
schemaStore = {
enable = true,
url = "https://www.schemastore.org/api/json/catalog.json"
},
schemas = {
kubernetes = "/*.yaml",
["http://json.schemastore.org/github-workflow"] = ".github/workflows/*.{yml,yaml}",
["http://json.schemastore.org/github-action"] = ".github/action.{yml,yaml}",
["http://json.schemastore.org/ansible-stable-2.9"] = "roles/tasks/*.{yml,yaml}",
["http://json.schemastore.org/prettierrc"] = ".prettierrc.{yml,yaml}",
["http://json.schemastore.org/kustomization"] = "kustomization.{yml,yaml}",
["http://json.schemastore.org/ansible-playbook"] = "*play*.{yml,yaml}",
["http://json.schemastore.org/chart"] = "Chart.{yml,yaml}",
["https://json.schemastore.org/dependabot-v2"] = ".github/dependabot.{yml,yaml}",
["https://json.schemastore.org/gitlab-ci"] = "*gitlab-ci*.{yml,yaml}",
["https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json"] = "*api*.{yml,yaml}",
["https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json"] = "docker-compose.{yml,yaml}",
["https://raw.githubusercontent.com/argoproj/argo-workflows/master/api/jsonschema/schema.json"] = "*flow*.{yml,yaml}"
},
format = {enabled = false},
validate = false, -- TODO: conflicts between Kubernetes resources and kustomization.yaml
completion = true,
hover = true
}
},
flags = {debounce_text_changes = 150}
}
require"lsp_signature".setup({
bind = true, -- This is mandatory, otherwise border config won't get registered.
floating_window = true, -- show hint in a floating window, set to false for virtual text only mode
doc_lines = 2, -- Set to 0 for not showing doc
hint_prefix = "🐼 ",
-- use_lspsaga = false, -- set to true if you want to use lspsaga popup
handler_opts = {
border = "shadow" -- double, single, shadow, none
}
})
end
-- Test source-kit
require('lspconfig').sourcekit.setup{}
end
}
} }

324
nvim/m-housh/lua/user/plugin/lualine.lua Normal file → Executable file
View File

@@ -1,119 +1,217 @@
return { return {
"nvim-lualine/lualine.nvim", "nvim-lualine/lualine.nvim",
config = function() dependencies = { "nvim-tree/nvim-web-devicons" },
local colors = { config = function()
red = '#ca1243', local lualine = require("lualine")
grey = '#a0a1a7',
black = '#383a42',
white = '#f3f3f3',
light_green = '#83a598',
orange = '#fe8019',
green = '#8ec07c',
}
local empty = require('lualine.component'):extend() local function xcodebuild_device()
function empty:draw(default_highlight) if vim.g.xcodebuild_platform == "macOS" then
self.status = '' return " macOS"
self.applied_separator = '' end
self:apply_highlights(default_highlight)
self:apply_section_separators()
return self.status
end
-- Put proper separators and gaps between components in sections if vim.g.xcodebuild_os then
local function process_sections(sections) return "" .. vim.g.xcodebuild_device_name .. " (" .. vim.g.xcodebuild_os .. ")"
for name, section in pairs(sections) do end
local left = name:sub(9, 10) < 'x'
for pos = 1, name ~= 'lualine_z' and #section or #section - 1 do
table.insert(section, pos * 2, { empty, color = { fg = colors.white, bg = colors.white } })
end
for id, comp in ipairs(section) do
if type(comp) ~= 'table' then
comp = { comp }
section[id] = comp
end
comp.separator = left and { right = '' } or { left = '' }
end
end
return sections
end
local function search_result() return "" .. vim.g.xcodebuild_device_name
if vim.v.hlsearch == 0 then end
return ''
end
local last_search = vim.fn.getreg '/'
if not last_search or last_search == '' then
return ''
end
local searchcount = vim.fn.searchcount { maxcount = 9999 }
return last_search .. '(' .. searchcount.current .. '/' .. searchcount.total .. ')'
end
local function modified() lualine.setup({
if vim.bo.modified then options = {
return '+' globalstatus = true,
elseif vim.bo.modifiable == false or vim.bo.readonly == true then theme = "auto",
return '-' symbols = {
end alternate_file = "#",
return '' directory = "",
end readonly = "",
unnamed = "[No Name]",
require('lualine').setup { newfile = "[New]",
options = { },
theme = 'auto', disabled_buftypes = { "quickfix", "prompt" },
component_separators = '', component_separators = "",
section_separators = { left = '', right = '' }, section_separators = { left = "", right = "" },
}, },
sections = process_sections { sections = {
lualine_a = { 'mode' }, lualine_a = {
lualine_b = { -- { "mode" },
'branch', { "filename" },
'diff', },
{ lualine_b = {
'diagnostics', { "diagnostics" },
source = { 'nvim' }, { "diff" },
sections = { 'error' }, {
diagnostics_color = { error = { bg = colors.red, fg = colors.white } }, "searchcount",
}, maxcount = 999,
{ timeout = 500,
'diagnostics', },
source = { 'nvim' }, },
sections = { 'warn' }, lualine_c = {},
diagnostics_color = { warn = { bg = colors.orange, fg = colors.white } }, lualine_x = {
}, { "' ' .. vim.g.xcodebuild_last_status", color = { fg = "#a6e3a1" } },
{ 'filename', file_status = false, path = 1 }, -- { "'󰙨 ' .. vim.g.xcodebuild_test_plan", color = { fg = "#a6e3a1", bg = "#161622" } },
{ modified, color = { bg = colors.red } }, { xcodebuild_device, color = { fg = "#f9e2af", bg = "#161622" } },
{ },
'%w', lualine_y = {
cond = function() { "branch" },
return vim.wo.previewwindow },
end, lualine_z = {
}, { "location" },
{ },
'%r', },
cond = function() inactive_sections = {
return vim.bo.readonly lualine_a = {},
end, lualine_b = {},
}, lualine_c = { "filename" },
{ lualine_x = {},
'%q', lualine_y = {},
cond = function() lualine_z = {},
return vim.bo.buftype == 'quickfix' },
end, extensions = { "nvim-dap-ui", "quickfix", "trouble", "nvim-tree", "lazy", "mason" },
}, })
}, end,
lualine_c = {},
lualine_x = {},
lualine_y = { search_result, 'filetype' },
lualine_z = { '%l:%c', '%p%%/%L' },
},
inactive_sections = {
lualine_c = { '%f %y %m' },
lualine_x = {},
},
tabline = {},
extensions = {"nvim-tree"}
}
end
} }
-- return {
-- "nvim-lualine/lualine.nvim",
-- config = function()
-- local colors = {
-- red = '#ca1243',
-- grey = '#a0a1a7',
-- black = '#383a42',
-- white = '#f3f3f3',
-- light_green = '#83a598',
-- orange = '#fe8019',
-- green = '#8ec07c',
-- }
--
-- local empty = require('lualine.component'):extend()
-- function empty:draw(default_highlight)
-- self.status = ''
-- self.applied_separator = ''
-- self:apply_highlights(default_highlight)
-- self:apply_section_separators()
-- return self.status
-- end
--
-- -- Put proper separators and gaps between components in sections
-- local function process_sections(sections)
-- for name, section in pairs(sections) do
-- local left = name:sub(9, 10) < 'x'
-- for pos = 1, name ~= 'lualine_z' and #section or #section - 1 do
-- table.insert(section, pos * 2, { empty, color = { fg = colors.white, bg = colors.white } })
-- end
-- for id, comp in ipairs(section) do
-- if type(comp) ~= 'table' then
-- comp = { comp }
-- section[id] = comp
-- end
-- comp.separator = left and { right = '' } or { left = '' }
-- end
-- end
-- return sections
-- end
--
-- local function search_result()
-- if vim.v.hlsearch == 0 then
-- return ''
-- end
-- local last_search = vim.fn.getreg '/'
-- if not last_search or last_search == '' then
-- return ''
-- end
-- local searchcount = vim.fn.searchcount { maxcount = 9999 }
-- return last_search .. '(' .. searchcount.current .. '/' .. searchcount.total .. ')'
-- end
--
-- local function modified()
-- if vim.bo.modified then
-- return '+'
-- elseif vim.bo.modifiable == false or vim.bo.readonly == true then
-- return '-'
-- end
-- return ''
-- end
--
-- local function xcodebuild_device()
-- if vim.g.xcodebuild_platform == "macOS" then
-- return " macOS"
-- end
--
-- local deviceIcon = ""
-- if vim.g.xcodebuild_platform:match("watch") then
-- deviceIcon = "􀟤"
-- elseif vim.g.xcodebuild_platform:match("tv") then
-- deviceIcon = "􀡴 "
-- elseif vim.g.xcodebuild_platform:match("vision") then
-- deviceIcon = "􁎖 "
-- end
--
-- if vim.g.xcodebuild_os then
-- return deviceIcon .. " " .. vim.g.xcodebuild_device_name .. " (" .. vim.g.xcodebuild_os .. ")"
-- end
--
-- return deviceIcon .. " " .. vim.g.xcodebuild_device_name
-- end
--
--
-- require('lualine').setup {
-- options = {
-- theme = 'auto',
-- component_separators = '',
-- section_separators = { left = '', right = '' },
-- },
-- sections = process_sections {
-- lualine_a = { 'mode' },
-- lualine_b = {
-- 'branch',
-- 'diff',
-- {
-- 'diagnostics',
-- source = { 'nvim' },
-- sections = { 'error' },
-- diagnostics_color = { error = { bg = colors.red, fg = colors.white } },
-- },
-- {
-- 'diagnostics',
-- source = { 'nvim' },
-- sections = { 'warn' },
-- diagnostics_color = { warn = { bg = colors.orange, fg = colors.white } },
-- },
-- { 'filename', file_status = false, path = 1 },
-- { modified, color = { bg = colors.red } },
-- {
-- '%w',
-- cond = function()
-- return vim.wo.previewwindow
-- end,
-- },
-- {
-- '%r',
-- cond = function()
-- return vim.bo.readonly
-- end,
-- },
-- {
-- '%q',
-- cond = function()
-- return vim.bo.buftype == 'quickfix'
-- end,
-- },
-- },
-- lualine_c = {},
-- lualine_x = {
-- { "' ' .. vim.g.xcodebuild_last_status", color = { fg = "Gray" } },
-- { "'󰙨 ' .. vim.g.xcodebuild_test_plan", color = { fg = "#a6e3a1", bg = "#161622" } },
-- { xcodebuild_device, color = { fg = "#f9e2af", bg = "#161622" } },
-- },
-- lualine_y = { search_result, 'filetype' },
-- lualine_z = { '%l:%c', '%p%%/%L' },
-- },
-- inactive_sections = {
-- lualine_c = { '%f %y %m' },
-- lualine_x = {},
-- },
-- tabline = {},
-- extensions = {"nvim-tree"}
-- }
-- end
-- }

View File

@@ -0,0 +1,43 @@
return {
"L3MON4D3/LuaSnip",
config = function()
local ls = require("luasnip")
local types = require("luasnip.util.types")
ls.setup({
history = true,
enable_autosnippets = false,
updatevents = "TextChanged,TextChangedI",
extra_opts = {
[types.choiceNode] = {
active = {
virt_text = { { "choiceNode", "Comment" } },
},
},
},
})
require("luasnip.loaders.from_vscode").lazy_load()
require("luasnip.loaders.from_lua").lazy_load({ paths = "~/.config/m-housh/lua/user/snippets/" })
-- Keymaps
local opts = { silent = true }
-- Use <Ctrl>k to expand snippets.
-- This will expand the current item or jump to the next item within the snippet.
vim.keymap.set({ "i", "s" }, "<C-k>", function()
if ls.expand_or_jumpable() then
ls.expand_or_jump()
end
end, opts)
-- Use <Ctrl>j to jump backwards in a snippet.
-- This always moves to the previous item within a snippet.
vim.keymap.set({ "i", "s" }, "<C-j>", function()
if ls.jumpable(-1) then
ls.jump(-1)
end
end, opts)
-- Reload snippets.
vim.keymap.set("n", "<leader><leader>s", "<CMD>source ~/.config/m-housh/lua/user/plugin/luasnip.lua<CR>")
end,
}

View File

@@ -1,25 +0,0 @@
return {
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
},
opts = {
close_if_last_window = false,
enable_git_status = true,
enable_diagnostics = true,
filesystem = {
always_show = {
"plugins",
".zshrc",
".zshenv"
},
filtered_items = {
hide_dotfiles = false
},
use_libuv_file_watcher = true
},
}
}

0
nvim/m-housh/lua/user/plugin/noice.lua Normal file → Executable file
View File

View File

@@ -0,0 +1,70 @@
local function setupListeners()
local dap = require("dap")
local areSet = false
dap.listeners.after["event_initialized"]["me"] = function()
if not areSet then
areSet = true
vim.keymap.set("n", "<leader>dc", dap.continue, { desc = "Continue", noremap = true })
vim.keymap.set("n", "<leader>dC", dap.run_to_cursor, { desc = "Run To Cursor" })
vim.keymap.set("n", "<leader>ds", dap.step_over, { desc = "Step Over" })
vim.keymap.set("n", "<leader>di", dap.step_into, { desc = "Step Into" })
vim.keymap.set("n", "<leader>do", dap.step_out, { desc = "Step Out" })
vim.keymap.set({ "n", "v" }, "<Leader>dh", require("dap.ui.widgets").hover, { desc = "Hover" })
vim.keymap.set({ "n", "v" }, "<Leader>de", require("dapui").eval, { desc = "Eval" })
end
end
dap.listeners.after["event_terminated"]["me"] = function()
if areSet then
areSet = false
vim.keymap.del("n", "<leader>dc")
vim.keymap.del("n", "<leader>dC")
vim.keymap.del("n", "<leader>ds")
vim.keymap.del("n", "<leader>di")
vim.keymap.del("n", "<leader>do")
vim.keymap.del({ "n", "v" }, "<Leader>dh")
vim.keymap.del({ "n", "v" }, "<Leader>de")
end
end
end
return {
"mfussenegger/nvim-dap",
dependencies = {
"wojciech-kulik/xcodebuild.nvim",
},
config = function()
local xcodebuild = require("xcodebuild.integrations.dap")
-- TODO: make sure to set path to your codelldb
local codelldbPath = os.getenv("HOME") .. "/tools/codelldb-aarch64-darwin/extension/adapter/codelldb"
xcodebuild.setup(codelldbPath)
local define = vim.fn.sign_define
define("DapBreakpoint", { text = "", texthl = "DiagnosticError", linehl = "", numhl = "" })
define("DapBreakpointRejected", { text = "", texthl = "DiagnosticError", linehl = "", numhl = "" })
define("DapStopped", { text = "", texthl = "DiagnosticOk", linehl = "", numhl = "" })
define("DapLogPoint", { text = "", texthl = "DiagnosticInfo", linehl = "", numhl = "" })
define("DapLogPoint", { text = "", texthl = "DiagnosticInfo", linehl = "", numhl = "" })
setupListeners()
--when breakpoint is hit, it sets the focus to the buffer with the breakpoint
require("dap").defaults.fallback.switchbuf = "usetab,uselast"
--stylua: ignore start
vim.keymap.set("n", "<leader>dd", xcodebuild.build_and_debug, { desc = "Build & Debug" })
vim.keymap.set("n", "<leader>dr", xcodebuild.debug_without_build, { desc = "Debug Without Building" })
vim.keymap.set("n", "<leader>dt", xcodebuild.debug_tests, { desc = "Debug Tests" })
vim.keymap.set("n", "<leader>dT", xcodebuild.debug_class_tests, { desc = "Debug Class Tests" })
vim.keymap.set("n", "<leader>b", xcodebuild.toggle_breakpoint, { desc = "Toggle Breakpoint" })
vim.keymap.set("n", "<leader>B", xcodebuild.toggle_message_breakpoint, { desc = "Toggle Message Breakpoint" })
--stylua: ignore end
vim.keymap.set("n", "<leader>dx", function()
xcodebuild.terminate_session()
require("dap").listeners.after["event_terminated"]["me"]()
end, { desc = "Terminate debugger" })
end,
}

View File

@@ -0,0 +1,87 @@
return {
"rcarriga/nvim-dap-ui",
dependencies = {
"mfussenegger/nvim-dap",
"nvim-neotest/nvim-nio",
},
lazy = true,
config = function()
require("dapui").setup({
controls = {
element = "repl",
enabled = true,
icons = {
disconnect = "",
run_last = "",
terminate = "⏹︎",
pause = "⏸︎",
play = "",
step_into = "󰆹",
step_out = "󰆸",
step_over = "",
step_back = "",
},
},
floating = {
border = "single",
mappings = {
close = { "q", "<Esc>" },
},
},
icons = {
collapsed = "",
expanded = "",
current_frame = "",
},
layouts = {
{
elements = {
{ id = "stacks", size = 0.25 },
{ id = "scopes", size = 0.25 },
{ id = "breakpoints", size = 0.25 },
{ id = "watches", size = 0.25 },
},
position = "left",
size = 40,
},
{
elements = {
{ id = "repl", size = 0.4 },
{ id = "console", size = 0.6 },
},
position = "bottom",
size = 10,
},
},
})
local dap, dapui = require("dap"), require("dapui")
local group = vim.api.nvim_create_augroup("dapui_config", { clear = true })
-- hide ~ in DAPUI
vim.api.nvim_create_autocmd("BufWinEnter", {
group = group,
pattern = "DAP*",
callback = function()
vim.wo.fillchars = "eob: "
end,
})
vim.api.nvim_create_autocmd("BufWinEnter", {
group = group,
pattern = "\\[dap\\-repl\\]",
callback = function()
vim.wo.fillchars = "eob: "
end,
})
dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open()
end
dap.listeners.before.event_terminated["dapui_config"] = function()
dapui.close()
end
dap.listeners.before.event_exited["dapui_config"] = function()
dapui.close()
end
end,
}

View File

@@ -0,0 +1,24 @@
return {
"mfussenegger/nvim-lint",
event = { "BufReadPre", "BufNewFile" },
config = function()
local lint = require("lint")
lint.linters_by_ft = {
swift = { "swiftlint" },
}
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
vim.api.nvim_create_autocmd({ "BufWritePost", "BufReadPost", "InsertLeave", "TextChanged" }, {
group = lint_augroup,
callback = function()
require("lint").try_lint()
end,
})
vim.keymap.set("n", "<leader>ml", function()
require("lint").try_lint()
end, { desc = "[L]int file" })
end,
}

View File

@@ -0,0 +1,31 @@
return {
"stevearc/oil.nvim",
dependencies = {
"nvim-tree/nvim-web-devicons",
},
config = function()
require("oil").setup({
columns = { "icon" },
keymaps = {
["<C-h>"] = false,
["<M-h>"] = "actions.select_split",
},
view_options = {
is_hidden_file = function(name, _) -- second arg is bufnr, but not currently used.
-- Don't show .DS_Store in output.
local is_ds_store = name ~= ".DS_Store"
return not is_ds_store
end,
},
})
-- Show the parent directory in current window.
vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory." })
-- Open parent directory in floating window.
vim.keymap.set("n", "<space>-", require("oil").toggle_float)
-- Old habits die hard, map what used to toggle neo-tree to just open a float.
vim.keymap.set("n", "<C-n>", require("oil").toggle_float)
end,
}

4
nvim/m-housh/lua/user/plugin/swift.lua Normal file → Executable file
View File

@@ -9,7 +9,7 @@ return {
local default_options = { noremap = true, silent = true } local default_options = { noremap = true, silent = true }
local actions = require('swift.actions') local actions = require('swift.actions')
vim.keymap.set('n', '<c-b>', actions.build, default_options) vim.keymap.set('n', '<C-b>', actions.build, default_options)
vim.keymap.set('n', '<c-u>', actions.test, default_options) vim.keymap.set('n', '<C-S-U>', actions.test, default_options)
end end
} }

146
nvim/m-housh/lua/user/plugin/telescope.lua Normal file → Executable file
View File

@@ -1,72 +1,82 @@
return { return {
'nvim-telescope/telescope.nvim', "nvim-telescope/telescope.nvim",
branch = '0.1.x', branch = "0.1.x",
dependencies = { dependencies = {
'nvim-lua/plenary.nvim' "nvim-lua/plenary.nvim",
}, },
lazy = true, lazy = true,
config = function() config = function()
local actions = require('telescope.actions') local actions = require("telescope.actions")
local builtin = require("telescope.builtin")
require('telescope').setup({ require("telescope").setup({
defaults = { ensure_installed = {
file_ignore_patterns = {"node_modules", "%.jpg", "%.png", ".swiftpm"}, "swift",
vimgrep_arguments = { },
'rg', defaults = {
'--follow', file_ignore_patterns = { "node_modules", "%.jpg", "%.png", ".swiftpm" },
'--color=never', vimgrep_arguments = {
'--no-heading', "rg",
'--with-filename', "--follow",
'--line-number', "--color=never",
'--column', "--no-heading",
'--smart-case' "--with-filename",
}, "--line-number",
mappings = { "--column",
i = { "--smart-case",
-- Close on first esc instead of gonig to normal mode },
["<esc>"] = actions.close, mappings = {
["<A-q>"] = actions.send_selected_to_qflist, i = {
["<C-q>"] = actions.send_to_qflist, -- Close on first esc instead of going to normal mode
["<s-tab>"] = actions.toggle_selection + actions.move_selection_next, ["<esc>"] = actions.close,
["<tab>"] = actions.toggle_selection + actions.move_selection_previous, ["<A-q>"] = actions.send_selected_to_qflist,
}, ["<C-q>"] = actions.send_to_qflist,
n = { ["<s-tab>"] = actions.toggle_selection + actions.move_selection_next,
["<s-tab>"] = actions.toggle_selection + actions.move_selection_next, ["<tab>"] = actions.toggle_selection + actions.move_selection_previous,
["<tab>"] = actions.toggle_selection + actions.move_selection_previous, ["<C-j>"] = actions.move_selection_next,
["<A-q>"] = actions.send_selected_to_qflist, ["<C-k>"] = actions.move_selection_previous,
["<C-q>"] = actions.send_to_qflist, },
}, n = {
}, ["<C-j>"] = actions.move_selection_next,
prompt_prefix = "", ["<C-k>"] = actions.move_selection_previous,
selection_caret = "", ["<s-tab>"] = actions.toggle_selection + actions.move_selection_next,
entry_prefix = " ", ["<tab>"] = actions.toggle_selection + actions.move_selection_previous,
initial_mode = "insert", ["<A-q>"] = actions.send_selected_to_qflist,
selection_strategy = "reset", ["<C-q>"] = actions.send_to_qflist,
sorting_strategy = "descending", },
layout_strategy = "flex", },
layout_config = { prompt_prefix = "",
width = 0.75, selection_caret = "",
prompt_position = "bottom", entry_prefix = " ",
preview_cutoff = 120, initial_mode = "insert",
horizontal = { mirror = false }, selection_strategy = "reset",
vertical = { mirror = true }, sorting_strategy = "descending",
}, layout_strategy = "flex",
file_sorter = require'telescope.sorters'.get_fuzzy_file, layout_config = {
generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter, width = 0.75,
-- path_display = true, -- strange behaviour not showing the files in result window prompt_position = "bottom",
winblend = 0, preview_cutoff = 120,
border = {}, horizontal = { mirror = false },
borderchars = { '', '', '', '', '', '', '', '' }, vertical = { mirror = true },
color_devicons = true, },
use_less = true, file_sorter = require("telescope.sorters").get_fuzzy_file,
set_env = { ['COLORTERM'] = 'truecolor' }, -- default = nil, generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter,
file_previewer = require'telescope.previewers'.vim_buffer_cat.new, -- path_display = true, -- strange behaviour not showing the files in result window
grep_previewer = require'telescope.previewers'.vim_buffer_vimgrep.new, winblend = 0,
qflist_previewer = require'telescope.previewers'.vim_buffer_qflist.new, border = {},
borderchars = { "", "", "", "", "", "", "", "" },
color_devicons = true,
use_less = true,
set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil,
file_previewer = require("telescope.previewers").vim_buffer_cat.new,
grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new,
qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new,
-- Developer configurations: Not meant for general override -- Developer configurations: Not meant for general override
buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker,
} },
}) })
end
vim.keymap.set("n", "<C-A-j>", builtin.jumplist, { silent = true, noremap = true, desc = "Open [J]ump List." })
end,
} }

60
nvim/m-housh/lua/user/plugin/theme.lua Normal file → Executable file
View File

@@ -1,24 +1,38 @@
return { -- return {
'EdenEast/nightfox.nvim', -- 'EdenEast/nightfox.nvim',
lazy = false, -- make sure we load this during startup -- lazy = false, -- make sure we load this during startup
priority = 1000, -- make sure to load this before all other plugins. -- priority = 1000, -- make sure to load this before all other plugins.
opts = { -- opts = {
--fox = "terafox", -- change the colorscheme to use terafox -- --fox = "terafox", -- change the colorscheme to use terafox
styles = { -- styles = {
comments = "italic", -- change style of comments to be italic -- comments = "italic", -- change style of comments to be italic
keywords = "bold", -- change style of keywords to be bold -- keywords = "bold", -- change style of keywords to be bold
functions = "italic,bold" -- styles can be a comma separated list -- functions = "italic,bold" -- styles can be a comma separated list
}, -- },
inverse = { -- inverse = {
match_paren = true, -- inverse the highlighting of match_parens -- match_paren = true, -- inverse the highlighting of match_parens
}, -- },
colors = { -- colors = {
red = "#FF0000", -- Override the red color for MAX POWER -- red = "#FF0000", -- Override the red color for MAX POWER
--bg_alt = "#000000", -- --bg_alt = "#000000",
}, -- },
hlgroups = { -- hlgroups = {
TSPunctDelimiter = { fg = "${red}" }, -- Override a highlight group with the color red -- TSPunctDelimiter = { fg = "${red}" }, -- Override a highlight group with the color red
LspCodeLens = { bg = "#000000", style = "italic" }, -- LspCodeLens = { bg = "#000000", style = "italic" },
} -- }
}, -- },
-- }
return {
"catppuccin/nvim",
name = "catppuccin",
priority = 1000,
opts = {
color_overrides = {
all = {
text = "#ffffff",
strings = "#ffffff"
}
}
} }
}

View File

@@ -0,0 +1,15 @@
return {
"folke/todo-comments.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
opts = { },
config = function()
require('todo-comments').setup({})
vim.keymap.set('n', '<leader>tq', '<CMD>TodoQuickFix<CR>',
{ desc = "[T]odo [Q]uick fix list." }
)
vim.keymap.set('n', '<leader><leader>t', '<CMD>TodoTelescope<CR>',
{ desc = "[T]odo [Q]uick fix list." }
)
end,
}

0
nvim/m-housh/lua/user/plugin/toggleterm.lua Normal file → Executable file
View File

0
nvim/m-housh/lua/user/plugin/treesitter.lua Normal file → Executable file
View File

View File

@@ -0,0 +1,44 @@
return {
"folke/trouble.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
event = { "BufReadPre", "BufNewFile" },
keys = {
{ "<leader>tt", "<cmd>Trouble quickfix toggle<cr>", { desc = "Open a quickfix" } },
},
opts = {},
config = function()
require("trouble").setup({
auto_open = false,
auto_close = false,
auto_preview = true,
auto_jump = false,
mode = "quickfix",
severity = vim.diagnostic.severity.ERROR,
cycle_results = false,
})
vim.api.nvim_create_autocmd("User", {
pattern = { "XcodebuildBuildFinished", "XcodebuildTestsFinished" },
callback = function(event)
if event.data.cancelled then
return
end
if event.data.success then
require("trouble").close()
elseif not event.data.failedCount or event.data.failedCount > 0 then
if next(vim.fn.getqflist()) then
require("trouble").open("quickfix")
else
require("trouble").close()
end
require("trouble").refresh()
end
end,
})
-- Jump to diagnostic issues across the whole project.
vim.keymap.set("n", "<A-d>", "<cmd>silent cc | silent cn<cr>zz", { desc = "Jump to next issue" })
vim.keymap.set("n", "<A-s>", "<cmd>silent cc | silent cp<cr>zz", { desc = "Jump to previous issue" })
end,
}

0
nvim/m-housh/lua/user/plugin/which-key.lua Normal file → Executable file
View File

0
nvim/m-housh/lua/user/plugin/wrapping.lua Normal file → Executable file
View File

View File

@@ -0,0 +1,80 @@
local progress_handle
return {
"wojciech-kulik/xcodebuild.nvim",
--branch = "fix/issue-249",
dependencies = {
"nvim-telescope/telescope.nvim",
"MunifTanjim/nui.nvim",
},
config = function()
require("xcodebuild").setup({
show_build_progress_bar = false,
logs = {
auto_open_on_success_tests = false,
auto_open_on_failed_tests = false,
auto_open_on_success_build = false,
auto_open_on_failed_build = false,
auto_focus = false,
auto_close_on_app_launch = true,
only_summary = true,
notify = function(message, severity)
local fidget = require("fidget")
if progress_handle then
progress_handle.message = message
if not message:find("Loading") then
progress_handle:finish()
progress_handle = nil
if vim.trim(message) ~= "" then
fidget.notify(message, severity)
end
end
else
fidget.notify(message, severity)
end
end,
notify_progress = function(message)
local progress = require("fidget.progress")
if progress_handle then
progress_handle.title = ""
progress_handle.message = message
else
progress_handle = progress.handle.create({
message = message,
lsp_client = { name = "xcodebuild.nvim" },
})
end
end,
},
code_coverage = {
enabled = true,
},
})
-- stylua: ignore start
vim.keymap.set("n", "<leader>X", "<cmd>XcodebuildPicker<cr>", { desc = "Show Xcodebuild Actions" })
vim.keymap.set("n", "<leader>xf", "<cmd>XcodebuildProjectManager<cr>", { desc = "Show Project Manager Actions" })
vim.keymap.set("n", "<leader>xb", "<cmd>XcodebuildBuild<cr>", { desc = "Build Project" })
vim.keymap.set("n", "<leader>xB", "<cmd>XcodebuildBuildForTesting<cr>", { desc = "Build For Testing" })
vim.keymap.set("n", "<leader>xr", "<cmd>XcodebuildBuildRun<cr>", { desc = "Build & Run Project" })
vim.keymap.set("n", "<leader>xt", "<cmd>XcodebuildTest<cr>", { desc = "Run Tests" })
vim.keymap.set("v", "<leader>xt", "<cmd>XcodebuildTestSelected<cr>", { desc = "Run Selected Tests" })
vim.keymap.set("n", "<leader>xT", "<cmd>XcodebuildTestClass<cr>", { desc = "Run This Test Class" })
vim.keymap.set("n", "<leader>xl", "<cmd>XcodebuildToggleLogs<cr>", { desc = "Toggle Xcodebuild Logs" })
vim.keymap.set("n", "<leader>xc", "<cmd>XcodebuildToggleCodeCoverage<cr>", { desc = "Toggle Code Coverage" })
vim.keymap.set("n", "<leader>xC", "<cmd>XcodebuildShowCodeCoverageReport<cr>", { desc = "Show Code Coverage Report" })
vim.keymap.set("n", "<leader>xe", "<cmd>XcodebuildTestExplorerToggle<cr>", { desc = "Toggle Test Explorer" })
vim.keymap.set("n", "<leader>xs", "<cmd>XcodebuildFailingSnapshots<cr>", { desc = "Show Failing Snapshots" })
vim.keymap.set("n", "<leader>xd", "<cmd>XcodebuildSelectDevice<cr>", { desc = "Select Device" })
vim.keymap.set("n", "<leader>xp", "<cmd>XcodebuildSelectTestPlan<cr>", { desc = "Select Test Plan" })
vim.keymap.set("n", "<leader>xq", "<cmd>Telescope quickfix<cr>", { desc = "Show QuickFix List" })
vim.keymap.set("n", "<leader>xx", "<cmd>XcodebuildQuickfixLine<cr>", { desc = "Quickfix Line" })
vim.keymap.set("n", "<leader>xa", "<cmd>XcodebuildCodeActions<cr>", { desc = "Show Code Actions" })
end,
}

100
nvim/m-housh/lua/user/plugins.lua Normal file → Executable file
View File

@@ -1,62 +1,56 @@
-- Bootstrap Lazy. -- Bootstrap Lazy.
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then if not vim.loop.fs_stat(lazypath) then
vim.fn.system({ vim.fn.system({
"git", "git",
"clone", "clone",
"--filter=blob:none", "--filter=blob:none",
"https://github.com/folke/lazy.nvim.git", "https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release "--branch=stable", -- latest stable release
lazypath, lazypath,
}) })
end end
vim.opt.rtp:prepend(lazypath) vim.opt.rtp:prepend(lazypath)
require("lazy").setup({ require("lazy").setup({
dev = { dev = {
path = '~/LocalProjects/plugins', path = "~/LocalProjects/plugins",
fallback = true fallback = true,
}, },
-- Import all the plugin configs in the 'plugin' directory
{ import = "user.plugin" },
-- Plugins that don't have a configuration file.
{
"folke/zen-mode.nvim",
opts = {},
},
{
"christoomey/vim-tmux-navigator",
lazy = false,
},
-- {
-- "NMAC427/guess-indent.nvim",
-- opts = { }
-- },
{ "NoahTheDuke/vim-just", ft = { "just" } },
{
"chipsenkbeil/distant.nvim",
branch = "v0.3",
config = function()
require("distant"):setup()
end,
},
-- Theme -- -- LSP, formatting, etc. --
{ import = 'user.plugin.theme' }, { "folke/neodev.nvim", opts = {} },
}, {
-- Completions -- checker = {
{ import = 'user.plugin.cmp' }, enabled = true,
notify = false,
-- Git -- },
{ import = 'user.plugin.lazygit' }, change_detection = {
notify = false,
-- LSP, formatting, etc. -- },
{ 'folke/neodev.nvim', opts = {} },
{ import = 'user.plugin.lsp' },
{ import = 'user.plugin.lualine' },
{ import = 'user.plugin.treesitter' },
{ import = 'user.plugin.formatter' },
{ import = 'user.plugin.go' },
--{'fladson/vim-kitty', lazy=true, },
-- Navigation --
{ import = 'user.plugin.neo-tree' },
{ import = 'user.plugin.telescope' },
-- Utilities --
{ import = 'user.plugin.comment' },
{ import = 'user.plugin.noice' },
{ import = 'user.plugin.swift' },
{ import = 'user.plugin.toggleterm' },
{ import = 'user.plugin.which-key' },
{ import = 'user.plugin.wrapping' },
{
"folke/zen-mode.nvim",
opts = { }
},
{
"christoomey/vim-tmux-navigator",
lazy = false,
},
{
"NMAC427/guess-indent.nvim",
opts = { }
},
}) })
vim.keymap.set("n", "<leader>ll", "<CMD>Lazy<CR>", { desc = "Open [L]azy" })

1
nvim/m-housh/lua/user/settings.lua Normal file → Executable file
View File

@@ -62,3 +62,4 @@ o.wildignore = [[
*.swp,.lock,.DS_Store,._* *.swp,.lock,.DS_Store,._*
*/tmp/*,*.so,*.swp,*.zip,**/node_modules/**,**/target/**,**.terraform/**" */tmp/*,*.so,*.swp,*.zip,**/node_modules/**,**/target/**,**.terraform/**"
]] ]]
o.viminfo="" -- disable viminfo from copying information from current session, for security.

View File

@@ -1,4 +1,5 @@
local ls = require('luasnip') -- Setup snippets here.
local ls = require("luasnip")
local s = ls.snippet local s = ls.snippet
local sn = ls.snippet_node local sn = ls.snippet_node
local ms = ls.multi_snippet local ms = ls.multi_snippet
@@ -7,3 +8,10 @@ local f = ls.function_node
local c = ls.choice_node local c = ls.choice_node
local t = ls.text_node local t = ls.text_node
ls.add_snippets("lua", {
s("hello", {
t('print("hello '),
i(1),
t(' world")'),
}),
})

View File

@@ -0,0 +1,34 @@
-- Setup snippets here.
local ls = require("luasnip")
local s = ls.snippet
local sn = ls.snippet_node
local ms = ls.multi_snippet
local i = ls.insert_node
local f = ls.function_node
local c = ls.choice_node
local t = ls.text_node
ls.add_snippets("lua", {
-- Setup a new snippet file.
s("sf", {
t({
"-- Setup snippets.",
'local ls = require("luasnip")',
"local s = ls.snippet",
"local sn = ls.snippet_node",
"local ms = ls.multi_snippet",
"local i = ls.insert_node",
"local f = ls.function_node",
"local c = ls.choice_node",
"local t = ls.text_node",
"-- Add snippets",
}),
t('ls.add_snippets("'),
i(1, "<file-type>"),
t({
'", {',
"\t-- Define snippets here.",
"})",
}),
}),
})

View File

@@ -0,0 +1,131 @@
-- Setup snippets.
local ls = require("luasnip")
local s = ls.snippet
local sn = ls.snippet_node
local ms = ls.multi_snippet
local i = ls.insert_node
local f = ls.function_node
local c = ls.choice_node
local t = ls.text_node
local fmt = require("luasnip.extras.fmt").fmt
local rep = require("luasnip.extras").rep
-- Add snippets
ls.add_snippets("swift", {
-- Add a dependency snippet.
s({ trig = "@d", desc = "Add a dependency." }, fmt("@Dependency(\\.{}) var {}", { i(1), rep(1) })),
-- Add a dependency client.
s(
{
trig = "@dc",
desc = "Add a dependency client.",
},
fmt(
[[
public extension DependencyValues {{
var {}: {} {{
get {{ self[{}.self] }}
set {{ self[{}.self] = newValue }}
}}
}}
@DependencyClient
public struct {} {{
// Insert interface here.
{}
}}
extension {}: TestDependencyKey {{
public static let testValue: {} = Self()
}}
]],
{
i(1, "<name>"),
i(2, "<Dependency>"),
rep(2),
rep(2),
rep(2),
i(0),
rep(2),
rep(2),
}
)
),
s(
{ trig = "str", desc = "Add a struct" },
fmt(
[[
struct {}: {} {{
{}
}}
]],
{ i(1, "<Name>"), i(2, "<Protocols>"), i(0) }
)
),
-- Decorate a type or function with an @_spi(...)
s({ trig = "@_s", desc = "Add spi modifier." }, fmt("@_spi({})", { i(1, "name") })),
-- Add an @_spi(...) import ...
s(
{ trig = "@_si", desc = "Import with spi." },
fmt(
[[
@_spi({}) import {}
{}
]],
{ i(1, "name"), i(2, "module"), i(0) }
)
),
-- Document a function
-- TODO: add dynamic number of prameters.
s(
{ trig = "docf", desc = "Document a function." },
fmt(
[[
/// {}
///
/// - Parameters:
/// - {}: {}
]],
{ i(1, "A short description."), i(2, "<param>"), i(3, "Describe the parameter.") }
)
),
-- Add a parameter to a documentation string.
s(
{ trig = "param", desc = "Add a parameter to documentation" },
fmt(
[[
/// - {}: {}
]],
{ i(1, "<param>"), i(2, "<description>") }
)
),
-- Add a withDependencies
s(
{ trig = "wd", desc = "withDependencies" },
fmt(
[[
withDependencies {{
$0.{} = {}
}} operation: {{
@Dependency(\.{}) var {}
{}
}}
]],
{
i(1, "<dependency>"),
i(2, "<override>"),
rep(1),
rep(1),
i(0),
}
)
),
})

3
nvim/m-housh/lua/user/theme.lua Normal file → Executable file
View File

@@ -1,3 +1,4 @@
-- Nightfox -- Nightfox
require('nightfox').load('terrafox') --require('nightfox').load('terrafox')
vim.cmd.colorscheme "catppuccin"

0
nvim/m-housh/spell/en.utf-8.add Normal file → Executable file
View File

0
nvim/m-housh/spell/en.utf-8.add.spl Normal file → Executable file
View File

Binary file not shown.

View File

@@ -1,2 +0,0 @@
#!/bin/zsh

View File

@@ -1,2 +0,0 @@
#!/bin/zsh

View File

@@ -0,0 +1,48 @@
#!/bin/zsh -l
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title pass-attribute
# @raycast.mode compact
# Optional parameters:
# @raycast.icon 🗝️
# @raycast.argument1 { "type": "text", "placeholder": "Key" }
# @raycast.argument2 { "type": "text", "placeholder": "For" }
# @raycast.packageName Password
# Documentation:
# @raycast.description Get an attribute / key from the password store
# @raycast.author Michael Housh
# @raycast.authorURL https://github.com/m-housh
PREFIX="$HOME/.local/share/password-store"
PASS="$(command -v pass)"
#
# Begin program
#
[ -z "$PASS" ] && \
echo "Error: pass utility not found." && \
exit 1
key="$1"
file="$2"
selected=$(find "$PREFIX" -type f -name "$file.gpg")
# Check if we found a password file at the path.
[ -z "$selected" ] && \
echo "Path not found: $file" && \
exit 1
# Sanitize the path to work with the pass command.
selected="${selected//$PREFIX\//}"
selected="${selected//.gpg/}"
# Capture the result of searching for the key.
result=$("$PASS" get "$key" "$selected")
[ -z "$result" ] && echo "Key not found" && exit 1
echo "$result" | pbcopy
echo "$key: Copied to clipboard"

View File

@@ -0,0 +1,47 @@
#!/bin/zsh -l
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title pass-copy
# @raycast.mode compact
# Optional parameters:
# @raycast.icon 🔐
# @raycast.argument1 { "type": "text", "placeholder": "For" }
# @raycast.packageName Password
# Documentation:
# @raycast.description Copy password from password-store
# @raycast.author Michael Housh
# @raycast.authorURL https://github.com/m-housh
PREFIX="$HOME/.local/share/password-store"
LOG=/tmp/pass-copy.out
ISOSEC="$HOME/.local/share/scripts/isosec"
PASS="$(command -v pass)"
_log() {
echo "$($ISOSEC) $1" >> "$LOG"
}
#
# Begin program
#
[ -z "$PASS" ] && \
echo "Error: pass utility not found." && \
_log "Error: pass utility not found." && \
exit 1
selected=$(find "$PREFIX" -type f -name "$1".gpg)
[ -z "$selected" ] && \
_log "Error: Not Found" && \
_log "Input: $1" && \
exit 1
selected="${selected//$PREFIX\//}"
selected="${selected//.gpg/}"
_log "Running pass with selection: $selected"
"$PASS" --clip "$selected"

View File

@@ -0,0 +1,33 @@
#!/bin/zsh -l
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title pass-gen
# @raycast.mode compact
# Optional parameters:
# @raycast.icon 🔐
# @raycast.argument1 { "type": "text", "placeholder": "Path" }
# @raycast.packageName Password
# Documentation:
# @raycast.description Copy password from password-store
# @raycast.author Michael Housh
# @raycast.authorURL https://github.com/m-housh
PREFIX="$HOME/.local/share/password-store"
PASS="$(command -v pass)"
[ -z "$PASS" ] && \
echo "Error: pass utility not found." && \
exit 1
[ -z "$1" ] && \
echo "Error: must supply a name/path for the password" && \
exit 1
"$PASS" generate --clip "$1"
_log "Ending"

View File

@@ -0,0 +1,17 @@
#!/bin/bash
# Raycast Script Command Template
#
# Duplicate this file and remove ".template." from the filename to get started.
# See full documentation here: https://github.com/raycast/script-commands
#
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title My First Script
# @raycast.mode fullOutput
#
# Optional parameters:
# @raycast.icon 🤖
# @raycast.packageName Raycast Scripts
echo "Hello from My First Script"

View File

@@ -2,7 +2,7 @@
# Adapted from: https://github.com/ThePrimeagen/.dotfiles/blob/master/bin/.local/scripts/tmux-sessionizer # Adapted from: https://github.com/ThePrimeagen/.dotfiles/blob/master/bin/.local/scripts/tmux-sessionizer
DEBUG= debug="${DEBUG}"
#################### Options #################### #################### Options ####################
@@ -15,7 +15,7 @@ zparseopts -D -- \
#################### Helpers #################### #################### Helpers ####################
function debug_print { function debug_print {
if [ -n "$DEBUG" ]; then if [ -n "$debug" ]; then
echo "DEBUG: $1" echo "DEBUG: $1"
fi fi
} }
@@ -25,18 +25,18 @@ function path_prepend() {
declare arg declare arg
for arg in "$@"; do for arg in "$@"; do
debug_print "arg: $arg" debug_print "arg: $arg"
# Check that arg is a directory but not a symlink [ -d $arg ] && debug_print "arg is a directory" && paths=($arg $paths) \
# Bc on some of my machines ~/projects is a symlink to $REPOS || debug_print "arg is not a directory"
test -d $arg && ! test -L $arg || continue
paths=($arg $paths)
done done
} }
function setup_fuzzy_find_paths() { function setup_fuzzy_find_paths() {
path_prepend "$HOME" \ local path="$TMUX_SESSIONATOR_PATH"
"$HOME/projects" \ debug_print "path: $path"
"$REPOS/local" \ for arg in ${(s[:])path}; do
$(find $REPOS/github.com -mindepth 1 -maxdepth 1 -type d -print 2> /dev/null) path_prepend "$arg"
done
debug_print "paths: $paths"
} }
#################### MAIN #################### #################### MAIN ####################
@@ -54,14 +54,14 @@ elif [[ "$#" -eq 1 ]]; then
selected=$1 selected=$1
else else
setup_fuzzy_find_paths setup_fuzzy_find_paths
debug_print "fuzzy find paths: ${(@)paths}" debug_print "fuzzy find paths: ${paths}"
if [ -n "$DEBUG" ]; then if [ -n "$DEBUG" ]; then
debug_print "Exiting because in debug mode." debug_print "Exiting because in debug mode."
exit 0 exit 0
fi fi
selected=$(find ${(@)paths} -mindepth 1 -maxdepth 1 -type d | fzf) selected=$(find ${paths} -mindepth 1 -maxdepth 1 -type d | fzf)
fi fi
if [[ -z $selected ]]; then if [[ -z $selected ]]; then
@@ -78,7 +78,8 @@ fi
# Create a session if it doesn't exist. # Create a session if it doesn't exist.
if ! tmux has-session -t "$selected_name" 2> /dev/null; then if ! tmux has-session -t "$selected_name" 2> /dev/null; then
tmux new-session -ds "$selected_name" -c "$selected" tmux new-session -ds "$selected_name" -c "$selected" -n "editor" "${EDITOR} ."
tmux new-window -d -n "terminal" -c "$selected"
fi fi
[ -z $TMUX ] && tmux attach -t "$selected_name" \ [ -z $TMUX ] && tmux attach -t "$selected_name" \

66
ssh/config Normal file
View File

@@ -0,0 +1,66 @@
$ANSIBLE_VAULT;1.1;AES256
36386431326264346262396233353265336630626364653932343439343531663635366436656637
3633613465313232613061653031353332353763626233370a373034393230393733343231313734
34616431343331653763653362306631393036393165336363326463633338386230653133313061
3238393235386461390a376237663766323437353633303138626631656163353665656534363066
63303864393437343539346532373366353335303436643465393138363332366335636232663334
38333262613162663261663039653330643036343666636261626166346139346532346163633563
64653639343634343535323532646430636563623435363065386561643434333630356133636435
63343135393130356362643561626434636562313562386630363636653161343663343031343330
65636339356639383062356333323232633333636434643138663136366632313431366132373264
65373237623066643336386232616565366634643865643238383632653735616134303466346463
62663064666364636566643963653836663737393537326462343639303736643536313335653238
38306230363262323634353563616662333336636563636233393864633136363730393136636664
34653862633639353631323239343463303331656636623537356635316434323932373831346431
32333338393763383237373062383138366332363439336466663636386631636361356333353333
36656133343637336131396564343032373930353962373331333231616537326262313039643862
63343638656636373239393564333365636636346565376631303431616530343639653835653766
32656433376235646661393463383564626362373364306539373062383264653130323139386332
62373634633635653833653835613037663234313134616565666663303263623930306232313436
36646534306635626166333933636538383766633730626236363737333463643564616437386138
35663738326161643863383135643565326336653131636539303632393237336462383434303137
61653230643861333834376135323864323834323938343964653433336265353134396133653165
30646139626138643565356166316566306634663265386535623665633333653930643338336232
32383932363332396438653435636365343564366464613065326633393136393030323338633632
61636264383135363435383239653466633339313863626665326566356634313635643462396163
66383738306132656163643438613665663833353638326532346439336465353365613338313934
61386335313338383130376431323734383731623038616161386363373334333232626337333939
38363265383538633135643535373731346261343165306665333234613133343763623261653634
39643565376264373431323337363166393362336630323038626139343930383034376262613432
33643733333531363136363631323933616433666336653335373365343333333438333063633935
65643562303634386365336436653630636662343865376433393735323631616363383566616231
36333935316139653864323333333665326163356538363564633532393839346138646666353534
61626131313336643365323030343933613566303036373039373461323633313235386263383662
62333063343462383338656264663364323039356161366165306631663334373438653433373030
64353361653032626163376135313264323861636636656539363533626437383939383963383639
36653637663135313132323536633864633561626436393336333963376439363131363766613863
37373462366538363536623465346265663731663739613766623665376361316630663630366337
31316236373561643536646533373238623763633630343663643461373366623835356234643030
61356331383838316564636530656634353264663031393539386532623239336565656564346261
31646463383431666462643366653535393736313462323437376262326464323537616663663433
30323233613937353738666432356663326232383632333366646330323431616436393361323536
36663063386634383966363632656364323035613231303362383339646237396438633037366539
65383165333238633337313339663231623164656435623966336236666365653361393934353938
65353438386139346364336263316666343632353736356230663830363062316336396136393065
64306336643939343631386231343436353131393463636564636361323332666666613863323232
31356132363631373363656361326230666564366130393063333862616334653932373266306538
65616630373738333837623934653763336230323263616666616338373530663862313136613231
66363439376231336532373736613638333632306337346161623430656130636362656235613637
33376338663765396235653138626638663763303433623764363633323263623431386262663334
65393934316236343434336334373639396437656265653736636135306464663631373461326636
63316435623762623463383563363331396262383236396433666562336332633963663630616236
65303362346162373233663065646137353135643336313239643662613537346263653839666564
63623833346463313965636135373538323362356634363632366361393536363766653032633661
62656164393331623662646230343030633162613235666232613164643837616264656239383062
61336532383035363932363730623239353063373264386564656265323736363737396431346330
30376631636437303765623063303566313038653239343264313837383136303033343834306461
31366564333635386634653834663866643861396664303132313435333135623361396232643164
31663137656461623765313961313830373438363738306232313263386363616336623763663736
33646639343239353331616564653130303338373536663464363832376362366361663438366138
65633738363662373266326638616366326463313837333733346462333235356235306166663262
62333735323563613963336335613462646664663561393436643530356339323737343265323637
66663136393033356661613065363030653535393966326637626637316261356135353631653562
65626233316534646137333936346134303761323034303736366633613066353333656165326662
63363766613963346633613861333266353663333665373362643638326263633236396338373961
66636361363633623238663565376637373433363966616237393936336534656161333065666461
36333834653465636666316639333733656463363437646439376634386463643134

180
starship/starship.toml Normal file
View File

@@ -0,0 +1,180 @@
"$schema" = 'https://starship.rs/config-schema.json'
command_timeout = 1000
format = """
[](color_orange)\
$os\
$username\
$hostname\
[](bg:color_pink fg:color_orange)\
$directory\
[](fg:color_pink bg:color_lavender)\
$git_branch\
$git_status\
[](fg:color_lavender bg:color_blue)\
$c\
$rust\
$golang\
$nodejs\
$php\
$java\
$kotlin\
$haskell\
$python\
[](fg:color_blue bg:color_bg3)\
$docker_context\
$conda\
[](fg:color_bg3 bg:color_green)\
$time\
[ ](fg:color_green)\
$line_break$character"""
palette = 'catppuccin_mocha'
[palettes.catppuccin_mocha]
color_fg0 = '#cad3f5'
color_bg1 = '#1e2030'
color_bg3 = '#24273a'
color_blue = '#8aadf4'
color_aqua = '#94e2d5'
color_green = '#a6e3a1'
color_orange = '#f5a97f'
color_purple = '#c6a0f6'
color_lavender = '#b4befe'
color_red = '#ed8796'
color_yellow = '#eed49f'
color_grey = '#585b70'
color_maroon = '#eba0ac'
color_pink = '#f5c2e7'
[os]
disabled = false
style = "bold bg:color_orange fg:color_fg0"
[os.symbols]
Windows = "󰍲"
Ubuntu = "󰕈"
SUSE = ""
Raspbian = "󰐿"
Mint = "󰣭"
Macos = "󰀵"
Manjaro = ""
Linux = "󰌽"
Gentoo = "󰣨"
Fedora = "󰣛"
Alpine = ""
Amazon = ""
Android = ""
Arch = "󰣇"
Artix = "󰣇"
CentOS = ""
Debian = "󰣚"
Redhat = "󱄛"
RedHatEnterprise = "󱄛"
[username]
show_always = true
style_user = "bold bg:color_orange fg:color_grey"
style_root = "bold bg:color_orange fg:color_grey"
format = '[ $user ]($style)'
[hostname]
ssh_only = true
format = '[$ssh_symbol : $hostname](bold bg:color_orange fg:color_grey)'
disabled = false
[directory]
style = "bold fg:color_grey bg:color_pink"
format = "[ $path ]($style)"
truncation_length = 3
truncation_symbol = "…/"
truncate_to_repo = true
[directory.substitutions]
"Documents" = "󰈙 "
"Downloads" = " "
"Music" = "󰝚 "
"Pictures" = " "
"Developer" = "󰲋 "
[git_branch]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol $branch ](bold fg:color_grey bg:color_lavender)]($style)'
[git_status]
style = "bg:color_blue"
format = '[[($all_status$ahead_behind )](bold fg:color_grey bg:color_lavender)]($style)'
[nodejs]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[c]
symbol = " "
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[rust]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[golang]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[php]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[java]
symbol = " "
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[kotlin]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[haskell]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[python]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[docker_context]
symbol = ""
style = "bg:color_bg3"
format = '[[ $symbol( $context) ](fg:#83a598 bg:color_bg3)]($style)'
[conda]
style = "bg:color_bg3"
format = '[[ $symbol( $environment) ](fg:#83a598 bg:color_bg3)]($style)'
[time]
disabled = false
time_format = "%R"
style = "bg:color_green"
format = '[[  $time ](bold fg:color_grey bg:color_green)]($style)'
[line_break]
disabled = false
[character]
disabled = false
success_symbol = '[](bold fg:color_green)'
error_symbol = '[](bold fg:color_red)'
vimcmd_symbol = '[](bold fg:color_green)'
vimcmd_replace_one_symbol = '[](bold fg:color_purple)'
vimcmd_replace_symbol = '[](bold fg:color_purple)'
vimcmd_visual_symbol = '[](bold fg:color_yellow)'

77
tmux/tmux.conf Normal file → Executable file
View File

@@ -62,6 +62,8 @@ bind -n M-Left select-pane -L
bind -n M-Right select-pane -R bind -n M-Right select-pane -R
bind -n M-Up select-pane -U bind -n M-Up select-pane -U
bind -n M-Down select-pane -D bind -n M-Down select-pane -D
# Close a pane quickly
bind-key -r K kill-pane bind-key -r K kill-pane
# Use Shift-arrow keys to navigate windows. # Use Shift-arrow keys to navigate windows.
@@ -71,8 +73,8 @@ bind -n M-h previous-window
bind -n M-L next-window bind -n M-L next-window
bind C-l send-keys 'C-l' bind C-l send-keys 'C-l'
bind f run-shell "tmux display-popup -E -w 80% -h 80% ~/.local/scripts/tmux-sessionator" bind f run-shell "tmux display-popup -E -w 80% -h 80% ${SCRIPTS}/tmux-sessionator"
bind-key -r C run-shell -b "~/.local/scripts/tmux-sessionator ~/.dotfiles" bind-key -r C run-shell -b "${SCRIPTS}/tmux-sessionator ~/.dotfiles"
bind S run-shell -b "~/.config/tmux/plugins/tmux-fzf/scripts/session.sh switch" bind S run-shell -b "~/.config/tmux/plugins/tmux-fzf/scripts/session.sh switch"
# reload new changes # reload new changes
@@ -82,8 +84,73 @@ bind-key r source-file ~/.config/tmux/tmux.conf\; \display-message "source-file
set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'sainnhe/tmux-fzf' set -g @plugin 'sainnhe/tmux-fzf'
set -g @plugin 'erikw/tmux-powerline' set -g @plugin 'tmux-plugins/tmux-yank'
#set -g @plugin 'erikw/tmux-powerline'
set -g @plugin 'christoomey/vim-tmux-navigator' set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'catppuccin/tmux'
set -g @plugin 'tmux-plugins/tmux-online-status'
set -g @plugin 'tmux-plugins/tmux-battery'
# Needs to stay at the bottom. # Configure Catppuccin
run '~/.config/tmux/plugins/tpm/tpm' set -g @catppuccin_flavor "macchiato"
set -g @catppuccin_status_background "none"
set -g @catppuccin_window_status_style "none"
set -g @catppuccin_pane_status_enabled "off"
set -g @catppuccin_pane_border_status "off"
# Configure Online
set -g @online_icon "ok"
set -g @offline_icon "nok"
# status left look and feel
set -g status-left-length 100
set -g status-left ""
set -ga status-left "#{?client_prefix,#{#[bg=#{@thm_red},fg=#{@thm_bg},bold]  #S },#{#[bg=#{@thm_bg},fg=#{@thm_green}]  #S }}"
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_overlay_0},none]│"
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_maroon}]  #{pane_current_command} "
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_overlay_0},none]│"
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_blue}]  #{=/-32/...:#{s|$USER|~|:#{b:pane_current_path}}} "
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_overlay_0},none]#{?window_zoomed_flag,│,}"
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_yellow}]#{?window_zoomed_flag,  zoom ,}"
# status right look and feel
set -g status-right-length 100
set -g status-right ""
set -ga status-right "#{?#{e|>=:10,#{battery_percentage}},#{#[bg=#{@thm_red},fg=#{@thm_bg}]},#{#[bg=#{@thm_bg},fg=#{@thm_pink}]}} #{battery_icon} #{battery_percentage} "
set -ga status-right "#[bg=#{@thm_bg},fg=#{@thm_overlay_0}, none]│"
set -ga status-right "#[bg=#{@thm_bg}]#{?#{==:#{online_status},ok},#[fg=#{@thm_mauve}] 󰖩 on ,#[fg=#{@thm_red},bold]#[reverse] 󰖪 off }"
set -ga status-right "#[bg=#{@thm_bg},fg=#{@thm_overlay_0}, none]│"
set -ga status-right "#[bg=#{@thm_bg},fg=#{@thm_blue}] 󰭦 %Y-%m-%d 󰅐 %H:%M "
# bootstrap tpm
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
# Configure Tmux
set -g status-position top
set -g status-style "bg=#{@thm_bg}"
set -g status-justify "absolute-centre"
# pane border look and feel
setw -g pane-border-status top
setw -g pane-border-format ""
setw -g pane-active-border-style "bg=#{@thm_bg},fg=#{@thm_overlay_0}"
setw -g pane-border-style "bg=#{@thm_bg},fg=#{@thm_surface_0}"
setw -g pane-border-lines single
# window look and feel
set -wg automatic-rename on
set -g automatic-rename-format "Window"
set -g window-status-format " #I#{?#{!=:#{window_name},Window},: #W,} "
set -g window-status-style "bg=#{@thm_bg},fg=#{@thm_rosewater}"
set -g window-status-last-style "bg=#{@thm_bg},fg=#{@thm_peach}"
set -g window-status-activity-style "bg=#{@thm_red},fg=#{@thm_bg}"
set -g window-status-bell-style "bg=#{@thm_red},fg=#{@thm_bg},bold"
set -gF window-status-separator "#[bg=#{@thm_bg},fg=#{@thm_overlay_0}]│"
set -g window-status-current-format " #I#{?#{!=:#{window_name},Window},: #W,} "
set -g window-status-current-style "bg=#{@thm_peach},fg=#{@thm_bg},bold"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'

View File

@@ -6,10 +6,14 @@ if wezterm.config_builder then
end end
--config.color_scheme = 'rose-pine' --config.color_scheme = 'rose-pine'
config.color_scheme = 'terafox'
config.colors = { --config.color_scheme = 'terafox'
background = "#131111" -- config.colors = {
} -- background = "#131111"
-- }
config.color_scheme = 'Catppuccin Mocha'
-- Font -- Font
config.font = wezterm.font_with_fallback { config.font = wezterm.font_with_fallback {
@@ -21,9 +25,11 @@ config.font_size = 16.0
-- Window -- Window
config.adjust_window_size_when_changing_font_size = false config.adjust_window_size_when_changing_font_size = false
config.enable_scroll_bar = false config.enable_scroll_bar = false
config.initial_cols = 150
config.initial_rows= 80
config.window_padding = { config.window_padding = {
left = 0, left = 5,
right = 0, right = 5,
top = 0, top = 0,
bottom = 0 bottom = 0
} }

4
zsh/.zshenv Normal file → Executable file
View File

@@ -1,4 +1,8 @@
# This needs placed in the ~/.zshenv # This needs placed in the ~/.zshenv
#
# This sources general default environment variables from `ZDOTDIR`, local overrides may be stored
# in `$XDG_DATA_HOME/zsh/env.zsh`. The `ZDOTDIR/.zshrc-local` is a legacy file location that I used,
# but should be removed when all my machines are updated to use the local overrides file.
export ZDOTDIR="$HOME/.config/zsh" export ZDOTDIR="$HOME/.config/zsh"
[ -f "$ZDOTDIR/.zshenv" ] && source "$ZDOTDIR/.zshenv" [ -f "$ZDOTDIR/.zshenv" ] && source "$ZDOTDIR/.zshenv"

63
zsh/config/.zshenv Normal file → Executable file
View File

@@ -1,15 +1,18 @@
# This should be placed in "$XDG_CONFIG_HOME/zsh/.zshenv" # This should be placed in "$XDG_CONFIG_HOME/zsh/.zshenv"
#
# This includes general default environment variables, local overrides may be stored
# in `$XDG_DATA_HOME/zsh/env.zsh`.
# XDG # XDG Directories
export XDG_CONFIG_HOME="$HOME/.config" export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local" export XDG_DATA_HOME="$HOME/.local/share"
export XDG_STATE_HOME="$HOME/.local/state" export XDG_STATE_HOME="$HOME/.local/state"
export XDG_CACHE_HOME="$HOME/.cache" export XDG_CACHE_HOME="$HOME/.cache"
# Config # Config
export ZDOTDIR="$HOME/.config/zsh" export ZDOTDIR="$HOME/.config/zsh"
export ZFUNCDIR="$ZDOTDIR/functions" export ZFUNCDIR="$ZDOTDIR/functions"
export SHELL="$(which zsh)" export SHELL="$(command -v zsh)"
export TERM=xterm-256color export TERM=xterm-256color
export EDITOR=nvim export EDITOR=nvim
export VISUAL=nvim export VISUAL=nvim
@@ -23,31 +26,31 @@ export GITUSER="m-housh"
export GIT_DISCOVERY_ACROSS_FILESYSTEM=1 export GIT_DISCOVERY_ACROSS_FILESYSTEM=1
# Directories # Directories
export ANSIBLE_GEN_DIR="$GHREPOS/ansible/ansible-gen-playbook"
export ANSIBLE_LOCAL="$GHREPOS/ansible"
export ANSIBLE_MACOS_PLAYBOOK_DIR="$HOME/ansible-macos-playbook"
export ARCHIVE="/Volumes/Archive" export ARCHIVE="/Volumes/Archive"
export BUCKET="/Volumes/Bucket" export BUCKET="/Volumes/Bucket"
export REPOS="$BUCKET/Repos" export DOTFILES="$HOME/.dotfiles"
export GHREPOS="$REPOS/github.com/$GITUSER"
export HHEREPOS="$BUCKET/Repos/github.com/hhe-dev"
export LOCAL_REPOS="$REPOS/local"
export HCP_NOTES="$HHEREPOS/hcp-notes"
export HXZET="$BUCKET/Repos/github.com/hvac-hx/hx-zets"
export HAAS="$BUCKET/Repos/github.com/haas"
export HAASZET="$HAAS/zets"
export DOCUMENTS="$HOME/Documents" export DOCUMENTS="$HOME/Documents"
export DOWNLOADS="$HOME/Downloads" export DOWNLOADS="$HOME/Downloads"
export PDFS="$HOME/Library/Mobile Documents/com~apple~Preview/Documents" export GHREPOS="$REPOS/github.com"
export PROPOSALS="$HOME/Library/Mobile Documents/com~apple~CloudDocs/Work/Proposals" export LOCAL_REPOS="$REPOS/local"
export SCREENSHOTS="$BUCKET/Pictures/Screenshots" export LOCAL_ENV="$XDG_DATA_HOME/zsh/env.zsh"
export DOTFILES="$HOME/.dotfiles"
export SCRIPTS="$HOME/.local/scripts"
export WORK="$HOME/Library/Mobile Documents/com~apple~CloudDocs/Work"
export ZETDIR="$GHREPOS/zets"
export MYZSHRC="$ZDOTDIR/.zshrc" export MYZSHRC="$ZDOTDIR/.zshrc"
export NAP_CONFIG="$HOME/.config/nap/config.yaml" export NAP_CONFIG="$HOME/.config/nap/config.yaml"
export PDFS="$HOME/Library/Mobile Documents/com~apple~Preview/Documents"
export PROPOSALS="$HOME/Library/Mobile Documents/com~apple~CloudDocs/Work/Proposals"
export REPOS="/Volumes/Bucket/Repos"
export SCREENSHOTS="$BUCKET/Pictures/Screenshots"
export SCRIPTS="$XDG_DATA_HOME/scripts"
export SITES="$GHREPOS/sites"
export SKELETONDIR="$DOTFILES/skeleton" export SKELETONDIR="$DOTFILES/skeleton"
export WORK="$HOME/Library/Mobile Documents/com~apple~CloudDocs/Work"
export ZETDIR="$GHREPOS/zets"
# NPM # NPM
export NPM_CONFIG_CACHE="$HOME/.local/npm" export NPM_CONFIG_CACHE="$XDG_DATA_HOME/npm"
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc" export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc"
# Go # Go
@@ -72,3 +75,25 @@ export PSQL_HISTORY="$XDG_DATA_HOME/psql_history"
# Hashicorp/Vault # Hashicorp/Vault
export VAULT_ADDR="https://vault.housh.dev" export VAULT_ADDR="https://vault.housh.dev"
# Ansible
export ANSIBLE_HOME="$XDG_CONFIG_HOME/ansible"
export ANSIBLE_VAULT_PASSWORD_FILE="$XDG_DATA_HOME/ansible/.vaultpwd"
export DEFAULT_VAULT_PASSWORD_FILE="$XDG_DATA_HOME/ansible/.vaultpwd"
# Tmux-Sessionator path.
export TMUX_SESSIONATOR_PATH="$HOME:$SCRIPTS:$LOCAL_REPOS:$REPOS:$ANSIBLE_LOCAL:$GHREPOS:$HVACIOTREPOS"
# Password-store
export PASSWORD_STORE_DIR="$XDG_DATA_HOME/password-store"
export PASSWORD_STORE_GENERATED_LENGTH=40
export PASSWORD_STORE_ENABLE_EXTENSIONS=true
# GPG-TUI
export GPG_TUI_CONFIG="$XDG_CONFIG_HOME/gpg-tui/gpg-tui.toml"
export GPG_TTY=$(tty)
# Starship Prompt
export STARSHIP_CONFIG="$XDG_CONFIG_HOME/starship/starship.toml"
[ -f "$LOCAL_ENV" ] && source "$LOCAL_ENV"

111
zsh/config/.zshrc Normal file → Executable file
View File

@@ -32,6 +32,7 @@ export LESSHISTFILE="-"
#------------------------------ path ------------------------------ #------------------------------ path ------------------------------
# Helper function to prepend to the $PATH
path_prepend() { path_prepend() {
declare arg declare arg
for arg in "$@"; do for arg in "$@"; do
@@ -43,6 +44,7 @@ path_prepend() {
done done
} && export path_prepend } && export path_prepend
# Helper function to prepend to the $FPATH
fpath_prepend() { fpath_prepend() {
declare arg declare arg
for arg in "$@"; do for arg in "$@"; do
@@ -54,16 +56,19 @@ fpath_prepend() {
done done
} && export fpath_prepend } && export fpath_prepend
# last arg will be first in path # last arg will be first in $PATH
path_prepend \ path_prepend \
"/usr/local/bin" \ "/usr/local/bin" \
"/opt/homebrew/bin" \ "/opt/homebrew/bin" \
"/opt/homebrew/sbin" \ "/opt/homebrew/sbin" \
"$HOME/.local/share/gem/bin" \
"$GOROOT/bin" \ "$GOROOT/bin" \
"$GOPATH/bin" \ "$GOPATH/bin" \
"$XDG_DATA_HOME/bin" \
"$HOME/.local/bin" \ "$HOME/.local/bin" \
"$SCRIPTS" "$SCRIPTS"
# last arg will be first in $FPATH
fpath_prepend \ fpath_prepend \
"$(brew --prefix)/share/zsh/site-functions" \ "$(brew --prefix)/share/zsh/site-functions" \
"$(brew --prefix)/share/zsh-completions" \ "$(brew --prefix)/share/zsh-completions" \
@@ -91,7 +96,9 @@ export HISTFILE=$ZDOTDIR/history
#------------------------------ cdpath ------------------------------ #------------------------------ cdpath ------------------------------
setopt autocd setopt autocd
export CDPATH=".:$GHREPOS:$REPOS/github.com:$DOTFILES:$LOCAL_REPOS:$HOME"
# NOTE: This may be overriden in local env overrides (typically located in $XDG_DATA_HOME/zsh/env.zsh
export CDPATH=".:$REPOS:$REPOS/ansible:$DOTFILES:$LOCAL_REPOS:$BUCKET:$HOME"
#------------------------------ options ------------------------------ #------------------------------ options ------------------------------
# (see `man zshoptions`) # (see `man zshoptions`)
@@ -115,56 +122,90 @@ _source_if "${ZDOTDIR}/zsh-functions"
# Plugins # Plugins
zsh_add_plugin "zsh-users/zsh-autosuggestions" zsh_add_plugin "zsh-users/zsh-autosuggestions"
zsh_add_plugin "zsh-users/zsh-syntax-highlighting" zsh_add_plugin "zsh-users/zsh-syntax-highlighting"
zsh_add_plugin "Aloxaf/fzf-tab"
# Use fzf in history / search contexts.
eval "$(fzf --zsh)"
#------------------------------ completions ------------------------------ #------------------------------ completions ------------------------------
# case insensitive path-completion # case insensitive path-completion
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*'
# partial completion suggestions # partial completion suggestions
zstyle ':completion:*' list-suffixeszstyle ':completion:*' expand prefix suffix zstyle ':completion:*' list-suffixes
#zstyle ':completion:*' expand prefix suffix
zstyle ':completion:*' menu no
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls --color $realpath'
zstyle ':completion:*' menu select
autoload -Uz compinit; compinit # zstyle(s) should be added before this. autoload -Uz compinit; compinit # zstyle(s) should be added before this.
zmodload zsh/complist zmodload zsh/complist
_comp_options+=(globdots) # Include hidden files. _comp_options+=(globdots) # Include hidden files.
autoload bashcompinit && bashcompinit
[[ -r "$PASSWORD_STORE_DIR/.extensions/completions/extensions.bash.completion" ]] && \
source "$PASSWORD_STORE_DIR/.extensions/completions/extensions.bash.completion"
_source_if "$ZDOTDIR/plugins/fzf-tab/fzf-tab.plugin.zsh"
#------------------------------ prompt ------------------------------ #------------------------------ prompt ------------------------------
# Prompt / managed by brew. (`brew install pure`) # Prompt / managed by brew. (`brew install starship`)
autoload -Uz promptinit; promptinit autoload -Uz promptinit; promptinit
prompt pure eval "$(starship init zsh)"
#prompt pure
#------------------------------ aliases ------------------------------ #------------------------------ aliases ------------------------------
alias bk='cd "${OLDPWD}"' alias bk='cd "${OLDPWD}"' # change to last directory
alias cl='printf "\e[H\e[2J"' alias cda='cd "$ANSIBLE_LOCAL"' # change into local ansible directory.
alias clear='printf "\e[H\e[2J"' alias cl='printf "\e[H\e[2J"' # clear the terminal
alias czets='cd "${ZETDIR}"' alias clear='printf "\e[H\e[2J"' # clear the terminal
alias dv='dirs -v' alias czets='cd "${ZETDIR}"' # move into zettlekasten notes
alias g='git' alias d='docker' # run docker commands quickly
alias ga='git add' alias dc='docker compose' # run docker-compose commands quickly
alias gcb='git checkout -b' alias dv='dirs -v' # list directory info
alias gco='git checkout' alias essh='edit-ssh-config' # edit ssh config quickly
alias gcm='git commit -a -m' alias g='git' # access git commands quickly
alias gp='git push' alias ga='git add' # add files to git quickly
alias gs='git status' alias gcb='git checkout -b' # checkout a new git branch, creating if needed.
alias hn='hugo new' alias gco='git checkout' # checkout an already existing git branch
alias hnc='hugo new content' alias gcm='git commit -a -m' # commit files to git quickly
alias l='ls -lah --color=auto' alias gen='just --justfile "$ANSIBLE_GEN_DIR/justfile"' # generate template files / directories
alias reload='exec zsh -l' alias gp='git push' # push repo to git
alias t='tmux' alias gs='git status' # git status quickly
alias ts='~/.local/scripts/tmux-sessionator' alias hn='hugo new' # generate a hugo site
alias tss='~/.local/scripts/tmux-sessionator --choose' alias hnc='hugo new content' # generate new hugo site content quickly
alias tls='tmux list-sessions' alias j='just' # run justfile's quickly.
alias temp='cd $(mktemp -d)' alias l='ls -lahH --color=auto' # better ls command.
alias vi='nvim' alias lfs='ls -lahH --color=auto "$ZDOTDIR/functions"' # List functions.
alias newxf='~/.local/scripts/newx --function' alias ls='ls --color'
alias nvim='unset VIMINIT && unset MYVIMRC && nvim' alias pass='gopass'
alias nvim-mhoush='NVIM_APPNAME=m-housh && nvim' alias p='gopass' # run the pass command quickly.
alias nvim-kickstart='NVIM_APPNAME=kickstart nvim' alias pf='pass fzf' # fuzzy find a password quickly and copy selection to clipboard.
alias nvim-lazy='NVIM_APPNAME=lazy nvim' alias pg='gopass show' # get an attribute of a password file quickly.
alias wget="wget --hsts-file=$XDG_DATA_HOME/wget-hsts" alias pgc='gopass show --clip' # get an attribute of a password file and copy to the clipboard.
alias reload='exec zsh -l' # reload the shell, useful when making changes.
alias t='tmux' # access tmux quickly
alias tka='tmux kill-server' # kill tmux server and all sessions.
alias ts='$SCRIPTS/tmux-sessionator' # create new tmux session, fuzzy finding common locations.
alias tss='$SCRIPTS/tmux-sessionator --choose' # attach to an existing tmux session.
alias tls='tmux list-sessions' # list tmux sessions
alias temp='cd $(mktemp -d)' # create a temporary directory and move into it.
alias vi='nvim' # set vi to open neovim
alias newf='"$SCRIPTS"/newx --function' # generate a new shell function
alias nlnv='nvim "$LOCAL_ENV"' # open local environment overrides file in neovime
alias nvim='unset VIMINIT && unset MYVIMRC && nvim' # alias nvim to unset vimrc, useful when using both vim & neovim
alias nvim-mhoush='NVIM_APPNAME=m-housh && nvim' # set neovim to use my config.
alias nvim-kickstart='NVIM_APPNAME=kickstart nvim' # set neovim to use kickstart config.
alias nvim-lazy='NVIM_APPNAME=lazy nvim' # set neovim to use lazy config.
alias wget="wget --hsts-file=$XDG_DATA_HOME/wget-hsts" # set wget history location.
#------------------------------ local configs ------------------------------ #------------------------------ local configs ------------------------------
_source_if "$ZDOTDIR/.zshrc-local"
# TODO: The .zshrc-local is a legacy location and should be removed once my machines are
# use the new location in XDG_DATA_HOME.
# HACK: These need to stay here, otherwise environment overrides do not work properly
# I tried sourcing them in the the `.zshenv` files, but did not work.
_source_if "$ZDOTDIR/.zshrc-local"
_source_if "$LOCAL_ENV"

View File

@@ -0,0 +1,5 @@
#!/bin/zsh
function edit-ssh-config() {
ansible-vault edit "$DOTFILES/ssh/config"
}

45
zsh/config/functions/tns Executable file
View File

@@ -0,0 +1,45 @@
#!/usr/bin/env zsh
# Create a tmux session.
#
# This accepts a path argument that is used to create the tmux session
# in, using it's basename for the session name.
#
# If an argument is not supplied, then we will create a tmux session in
# the current working directory.
function tns() {
local session_name=
local tmux_dir=
# parse the session, if based on the directory of the argument passed in.
# otherwise use the current directory.
[ -n "$1" ] && \
session_name=$(basename "$1" | tr . _) && \
tmux_dir="$1"
[ -z "$session_name" ] \
&& session_name=$(basename "$PWD" | tr . _) && \
tmux_dir="$PWD"
tmux_running=$(pgrep tmux)
# check if tmux is not running / attached to a session.
# if not, then create a new session.
if [ -z $TMUX ] && [ -z $tmux_running ]; then
tmux new-session -s "$session_name" -c "$tmux_dir" && return 0
fi
# create a session if it doesn't exist, in the background, so
# that we can switch sessions.
if ! tmux has-session -t "$session_name" 2> /dev/null; then
tmux new-session -ds "$session_name" -c "$tmux_dir" -n "editor" "$EDITOR ."
tmux new-window -d -n "terminal" -c "$tmux_dir"
fi
# attach to the session or switch if it already exists.
[ -z $TMUX ] && \
tmux attach -t "$session_name" \
|| tmux switch-client -t "$session_name"
}

View File

@@ -0,0 +1,6 @@
#!/bin/zsh
function update-dots() {
find "$ANSIBLE_MACOS_PLAYBOOK_DIR" -type f -maxdepth 1 -mindepth 1 -name justfile \
| xargs -I {} just --justfile {} run-playbook --tags dotfiles "$@"
}

0
zsh/config/zsh-functions Normal file → Executable file
View File