mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 14:12:41 +00:00
Compare commits
149 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3bc89df708 | ||
|
|
27d6d596dc | ||
|
|
7ebdbf3d7f | ||
| 34da568c87 | |||
|
|
6410d07c70 | ||
| 9e7b0675cb | |||
| 06a236e8fa | |||
| 5ae3559d23 | |||
| 13b0316b09 | |||
| b6ad0cae4b | |||
| 643b10e466 | |||
| 6d2129504a | |||
| 21670bd2e2 | |||
| 4a01415542 | |||
| 48cffcb315 | |||
| d6e400ce67 | |||
| 07d45dde36 | |||
| 969dd4dfe4 | |||
| b0c807728a | |||
| 1b28706a54 | |||
| 8cc13e5aa6 | |||
| 116837b23e | |||
| 9f7613e190 | |||
| 23f99e71bb | |||
| 15fe3f52a9 | |||
| 80a28fded6 | |||
| 31f7251095 | |||
| 2e63b3bba9 | |||
| 4528c89adf | |||
| fedae4bbe8 | |||
| 45b9e65d9c | |||
| c5531d2460 | |||
| 064fb8591d | |||
| e6f827f481 | |||
| 5e27d455a8 | |||
| ab0a40c3c1 | |||
| 550b67e68b | |||
| ab49116f7a | |||
| 28502e425b | |||
| c9f7c105b5 | |||
| 9d9816f43f | |||
| 2d73822810 | |||
| 726975d739 | |||
| 6be754d45d | |||
| 8524efb765 | |||
| 5b8b912844 | |||
| 45d1db84c1 | |||
| cd8c6a7c04 | |||
| d88697f1a7 | |||
| 47e239d7b2 | |||
| 44f59251a6 | |||
| b6cc5df5e3 | |||
| f90b8f6913 | |||
| 6da046a8e5 | |||
| 5a44ebff88 | |||
| be4629662d | |||
| 84ce050539 | |||
| 9966d8cc98 | |||
| 9cfe3e33a1 | |||
| ed0fad722c | |||
| 2d12e3f09a | |||
| 957ee2d2fa | |||
| 689d0ba29e | |||
| bc8ce6aa60 | |||
| 8329e2b32f | |||
| acf7afd16c | |||
| e2362b22f0 | |||
| 7463a77093 | |||
| 6b822772a5 | |||
| 68043e29b6 | |||
| 672d50ddb1 | |||
| bd56bfa676 | |||
| b0c8901b05 | |||
| a4ae5600d6 | |||
| 55db0132a7 | |||
| 2b5726166b | |||
| eeddf4454d | |||
| e6c7e49226 | |||
| 31652a3fae | |||
| 41cf9345e5 | |||
| ac03198f70 | |||
| 500c648c5b | |||
| 1c18e500f4 | |||
| e5dae43c66 | |||
| 8f4dbca52d | |||
| f0268388f8 | |||
| 91de940171 | |||
| d85d10f1eb | |||
| 1cf65faff0 | |||
| 59e96d3e57 | |||
| 90223c55ee | |||
| 8eee972eeb | |||
| 3892af26ff | |||
| 8b6aef9aee | |||
| 5fc94f0cb8 | |||
| 051ea52172 | |||
| a26ba5610c | |||
| 95d919811f | |||
| da08e4eabe | |||
| df56ba2e4d | |||
| 4b4fd93cc7 | |||
|
|
dfe1338084 | ||
|
|
45c4310798 | ||
|
|
d6ab348a40 | ||
| a720f97df9 | |||
| 19d649da39 | |||
| 9b10825aa0 | |||
| 8841d92e87 | |||
| 79e085e9bf | |||
| b380cb1190 | |||
| 670554b369 | |||
| 1deab50401 | |||
| 5ba356655a | |||
| 242ee6055e | |||
| 3b8e7e024a | |||
| 0f07b4610a | |||
| 7471d09afb | |||
| 6404ce4bb8 | |||
| 0623aad631 | |||
| 86098a7116 | |||
| 71bb23e54c | |||
| 28c02229b8 | |||
| f9892ee952 | |||
| 226e07f501 | |||
| 0ee37b0a66 | |||
| c33cb65caf | |||
| 2e012d8930 | |||
| 083920aa09 | |||
| cf5521aee2 | |||
| afb17d1f4e | |||
| 2d36d7326d | |||
| 1cbf56c925 | |||
| 489c9462cf | |||
| 375fb12359 | |||
| 1e2329e3d8 | |||
| f22005c87c | |||
| af4eeab9c4 | |||
| fe394ac122 | |||
| 4186430c4e | |||
| 3e6c7e8281 | |||
| 42bb38715a | |||
| 763607dc6a | |||
| 955f28957d | |||
| 98fe795dd0 | |||
| d93226021d | |||
| abf1103f62 | |||
| 1399fcbe26 | |||
| 0d141f94f9 | |||
| 306fbd4fee |
6
.gitignore
vendored
6
.gitignore
vendored
@@ -5,6 +5,10 @@
|
||||
**/.zcompdump*
|
||||
**/.zcompdump
|
||||
**/.zcompcache
|
||||
zsh/.config/zsh/history
|
||||
**/history
|
||||
**/.zsh_history
|
||||
**/.zsh_sessions
|
||||
**/completions/*
|
||||
**/.netrwhist
|
||||
**/.zshrc-local
|
||||
nvim/lazy-lock.json
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
^/Brewfile*
|
||||
^/README.*
|
||||
^/LICENSE.*
|
||||
^/LaunchAgents*
|
||||
|
||||
\.git
|
||||
\.gitignore
|
||||
\setup*
|
||||
|
||||
/scripts/install-espanso-packages
|
||||
|
||||
36
DOC
Normal file
36
DOC
Normal file
@@ -0,0 +1,36 @@
|
||||
Developer Certificate of Origin
|
||||
Version 1.1
|
||||
|
||||
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
|
||||
1 Letterman Drive
|
||||
Suite D4700
|
||||
San Francisco, CA, 94129
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this
|
||||
license document, but changing it is not allowed.
|
||||
|
||||
Developer's Certificate of Origin 1.1
|
||||
|
||||
By making a contribution to this project, I certify that:
|
||||
|
||||
(a) The contribution was created in whole or in part by me and I
|
||||
have the right to submit it under the open source license
|
||||
indicated in the file; or
|
||||
|
||||
(b) The contribution is based upon previous work that, to the best
|
||||
of my knowledge, is covered under an appropriate open source
|
||||
license and I have the right under that license to submit that
|
||||
work with modifications, whether created in whole or in part
|
||||
by me, under the same open source license (unless I am
|
||||
permitted to submit under a different license), as indicated
|
||||
in the file; or
|
||||
|
||||
(c) The contribution was provided directly to me by some other
|
||||
person who certified (a), (b) or (c) and I have not modified
|
||||
it.
|
||||
|
||||
(d) I understand and agree that this project and the contribution
|
||||
are public and that a record of the contribution (including all
|
||||
personal information I submit with it, including my sign-off) is
|
||||
maintained indefinitely and may be redistributed consistent with
|
||||
this project or the open source license(s) involved.
|
||||
201
LICENSE
Normal file
201
LICENSE
Normal file
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2021 Michael Housh
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
67
Makefile
67
Makefile
@@ -1,44 +1,35 @@
|
||||
BREWPATH ?= /opt/homebrew/bin
|
||||
BREW = $(BREWPATH)/brew
|
||||
DOTS = $(BREWPATH)/dots
|
||||
APPDIR ?= /Applications
|
||||
|
||||
# This does not work inside of a make command.
|
||||
bootstrap-homebrew:
|
||||
xcode-select --install | true
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
chmod -R go-w $(brew --prefix)
|
||||
xcode-select --install || true
|
||||
source "$(PWD)/scripts/install-brew.sh"
|
||||
|
||||
bootstrap-brews:
|
||||
@brew bundle \
|
||||
--no-lock \
|
||||
--cleanup \
|
||||
--debug \
|
||||
--file "$(PWD)/macOS/.config/macOS/Brewfile"
|
||||
# Install the dots application manager.
|
||||
install-dots:
|
||||
"$(BREW)" tap m-housh/formula
|
||||
"$(BREW)" install dots
|
||||
|
||||
bootstrap-casks:
|
||||
@brew bundle \
|
||||
--no-lock \
|
||||
--cleanup \
|
||||
--debug \
|
||||
--file "$(PWD)/macOS/.config/macOS/Casks.Brewfile"
|
||||
bootstrap-minimal: bootstrap-homebrew install-dots
|
||||
"$(DOTS)" install --minimal "$(APPDIR)"
|
||||
|
||||
bootstrap-logitech:
|
||||
@curl \
|
||||
--output ~/Downloads/logi-options.zip \
|
||||
https://download01.logi.com/web/ftp/pub/techsupport/options/options_installer.zip
|
||||
bootstrap: bootstrap-homebrew install-dots
|
||||
"$(DOTS)" install --full "$(APPDIR)"
|
||||
|
||||
bootstrap-amazon-workdocs:
|
||||
@curl \
|
||||
--output ~/Downloads/AmazonWorkDocsDrive.pkg \
|
||||
https://d3f2hupz96ggz3.cloudfront.net/mac/AmazonWorkDocsDrive.pkg
|
||||
# make a local zsh configuration file, to extend
|
||||
# the normal .zshrc for configuration that is only
|
||||
# relevant on the local machine.
|
||||
zshrc-local:
|
||||
# check if a file already exists or not and create it if not.
|
||||
test -f "$(PWD)/zsh/config/.zshrc-local" \
|
||||
|| echo "#!/usr/bin/env zsh" > "$(PWD)/zsh/config/.zshrc-local"
|
||||
# add symlink to appropriate location if doesn't exist.
|
||||
test -L "$(HOME)/.config/zsh/.zshrc-local" \
|
||||
|| ln -sfv "$(PWD)/zsh/config/.zshrc-local" "$(HOME)/.config/zsh/"
|
||||
# open the file to edit.
|
||||
vim "$(PWD)/zsh/config/.zshrc-local"
|
||||
|
||||
bootstrap-app-store:
|
||||
@brew bundle \
|
||||
--no-lock \
|
||||
--cleanup \
|
||||
--debug \
|
||||
--file "$(PWD)/macOS/.config/macOS/AppStore.Brewfile"
|
||||
|
||||
bootstrap-non-brews: bootstrap-logitech bootstrap-amazon-workdocs
|
||||
|
||||
stow:
|
||||
@stow --stow --verbose --target ~ */
|
||||
|
||||
# Order matters, need to install home-brew first then formula
|
||||
bootstrap: bootstrap-homebrew bootstrap-brews bootstrap-casks stow bootstrap-non-brews bootstrap-app-store
|
||||
open ~/Downloads
|
||||
default: bootstrap
|
||||
|
||||
109
README.md
109
README.md
@@ -1,18 +1,36 @@
|
||||
# My Dotfiles
|
||||
|
||||
This is my repository for learning dotfiles.
|
||||
This is a repository for my dotfiles. Be warned that these may often change and
|
||||
that the installation documentation may not always be correct as things
|
||||
progress. In general the setup process is something that is only done when
|
||||
a new machine is purchased or I feel like testing in a virtual machine (which
|
||||
does not happen often). It is helpful to have an understanding of what these
|
||||
commands do on your own.
|
||||
|
||||
In general no pull-requests or changes will be accepted, however you can
|
||||
generate an issue if you find a problem.
|
||||
|
||||
It currently will install homebrew and the following homebrew formula.
|
||||
|
||||
Most of the functionality is contained in the
|
||||
[dots](https://github.com/m-housh/dots) project, that is a companion to manage
|
||||
the dotfiles, which expects the dotfiles directory to be at `~/.dotfiles`.
|
||||
|
||||
```
|
||||
fd
|
||||
figlet
|
||||
gh
|
||||
git
|
||||
httpie
|
||||
jq
|
||||
mas
|
||||
neovim
|
||||
pure
|
||||
node
|
||||
ripgrep
|
||||
stow
|
||||
swift-format
|
||||
swift-zet
|
||||
tmux
|
||||
vim
|
||||
zsh
|
||||
zsh-completions
|
||||
```
|
||||
@@ -21,12 +39,12 @@ It will also install the following homebrew casks in the `~/Applications` direct
|
||||
|
||||
```
|
||||
docker
|
||||
espanso
|
||||
google-chrome
|
||||
iterm2
|
||||
microsoft-teams
|
||||
obs
|
||||
paw
|
||||
sketchup-pro
|
||||
onyx
|
||||
rapid-api
|
||||
rectangle
|
||||
```
|
||||
|
||||
And the following fonts.
|
||||
@@ -39,17 +57,12 @@ font-inconsolata-nerd-font
|
||||
The following applications will be installed from the macOS app store.
|
||||
|
||||
```
|
||||
Developer
|
||||
Home Assistant
|
||||
pwSafe
|
||||
Xcode
|
||||
```
|
||||
|
||||
The following non-app-store applications will be downloaded for later installation / setup. These will be placed in `~/Downloads`
|
||||
|
||||
```
|
||||
Logi Options # logitech mouse / keyboard settings
|
||||
AmazonWorkDocsDrive
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
Clone the repository.
|
||||
@@ -59,8 +72,6 @@ git clone https://m-housh/dotfiles.git ~/.dotfiles && \
|
||||
cd ~/.dotfiles
|
||||
```
|
||||
|
||||
The Makefile includes commands to install dependencies andlink the configuration using `gnu-stow`.
|
||||
|
||||
On a fresh system run the following command from the dotfiles root.
|
||||
|
||||
```
|
||||
@@ -72,53 +83,45 @@ This start by installing homebrew, then install the required homebrew formulas a
|
||||
applications from the `App Store`. When the bootstrap command is done it will open up the `~/Downloads` folder
|
||||
for the few applications that get downloaded from the internet, so that you can finish the installation of those applications.
|
||||
|
||||
### Minimal Setup
|
||||
|
||||
If you would like to just setup minimal stuff, link dotfiles, and install brews.
|
||||
Then you can run the following command.
|
||||
|
||||
```bash
|
||||
make bootstrap-minimal
|
||||
```
|
||||
|
||||
## To set macOS settings
|
||||
|
||||
```bash
|
||||
source scripts/setup_defaults
|
||||
```
|
||||
|
||||
## Post Installation
|
||||
|
||||
After everything has finished up, you will be able to open `iTerm2` and load the profile which should now be symlinked
|
||||
to `~/.config/macOS/iterm/profile.json`
|
||||
|
||||
You will also want to open `neovim` and run `:PackerSync` or `:PackerInstall` to download all the `neovim` plugins.
|
||||
After everything has finished up, you will be able to open `iTerm2` and load
|
||||
the profile which should now be symlinked to `~/.config/macOS/iterm/profile.json`
|
||||
|
||||
## Make commands
|
||||
|
||||
It is also possible to not do the full bootstrapping. If you would only like to install homebrew (without any formula or casks) then you can run the following command.
|
||||
It is also possible to not do the full bootstrapping. If you would only like
|
||||
to install homebrew (without any formula or casks) then you can run the following
|
||||
command.
|
||||
|
||||
```
|
||||
make bootstrap-homebrew
|
||||
```
|
||||
|
||||
Once homebrew is installed, if you'd like to install the homebrew formula (located in `macOS/.config/macOS/Brewfile`) then you can run the following command.
|
||||
## Other Make Commands
|
||||
|
||||
```
|
||||
make bootstrap-brews
|
||||
If you would like to setup any specific `zsh` configuration that is only for
|
||||
the local machine then you can run the following command.
|
||||
|
||||
```bash
|
||||
make zshrc-local
|
||||
```
|
||||
|
||||
To install homebrew casks (located in `macOS/.config/macOS/Casks.Brewfile`) then you can run the following command.
|
||||
|
||||
```
|
||||
make bootstrap-casks
|
||||
```
|
||||
|
||||
To symlink the configuration files only then you can run.
|
||||
|
||||
```
|
||||
make stow
|
||||
```
|
||||
|
||||
To download the logitech options application and place in your `~/Downloads` folder, you can run.
|
||||
|
||||
```
|
||||
make bootstrap-logitech
|
||||
```
|
||||
|
||||
To download the amazon workdocs drive installer and place in your `~/Downloads` folder, you can run.
|
||||
|
||||
```
|
||||
make bootstrap-amazon-workdocs
|
||||
```
|
||||
|
||||
And finally to download the app store applications run.
|
||||
|
||||
```
|
||||
make bootstrap-app-store
|
||||
```
|
||||
This will generate and symlink a file that you can use to extend the default
|
||||
`zshrc` configuration. In general, I use this to set custom location for
|
||||
homebrew casks to be installed on certain machines.
|
||||
|
||||
4
TODO.md
Normal file
4
TODO.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# TODO
|
||||
|
||||
- Remove brewfiles and use the `dots` app instead.
|
||||
- Add helix to `dots` app.
|
||||
40
espanso/espanso/config/default.yml
Normal file
40
espanso/espanso/config/default.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
# espanso configuration file
|
||||
|
||||
# For a complete introduction, visit the official docs at: https://espanso.org/docs/
|
||||
|
||||
# You can use this file to define the global configuration options for espanso.
|
||||
# These are the parameters that will be used by default on every application,
|
||||
# but you can also override them on a per-application basis.
|
||||
|
||||
# To make customization easier, this file contains some of the commonly used
|
||||
# parameters. Feel free to uncomment and tune them to fit your needs!
|
||||
|
||||
# --- Toggle key
|
||||
|
||||
# Customize the key used to disable and enable espanso (when double tapped)
|
||||
# Available options: CTRL, SHIFT, ALT, CMD, OFF
|
||||
# You can also specify the key variant, such as LEFT_CTRL, RIGHT_SHIFT, etc...
|
||||
# toggle_key: ALT
|
||||
# You can also disable the toggle key completely with
|
||||
# toggle_key: OFF
|
||||
|
||||
# --- Injection Backend
|
||||
|
||||
# Espanso supports multiple ways of injecting text into applications. Each of
|
||||
# them has its quirks, therefore you may want to change it if you are having problems.
|
||||
# By default, espanso uses the "Auto" backend which should work well in most cases,
|
||||
# but you may want to try the "Clipboard" or "Inject" backend in case of issues.
|
||||
# backend: Clipboard
|
||||
|
||||
# --- Auto-restart
|
||||
|
||||
# Enable/disable the config auto-reload after a file change is detected.
|
||||
# auto_restart: false
|
||||
|
||||
# --- Clipboard threshold
|
||||
|
||||
# Because injecting long texts char-by-char is a slow operation, espanso automatically
|
||||
# uses the clipboard if the text is longer than 'clipboard_threshold' characters.
|
||||
# clipboard_threshold: 100
|
||||
|
||||
# For a list of all the available options, visit the official docs at: https://espanso.org/docs/
|
||||
5
espanso/espanso/config/xcode.yml
Normal file
5
espanso/espanso/config/xcode.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
# Xcode specific configuration.
|
||||
|
||||
filter_exec: "Xcode"
|
||||
extra_includes:
|
||||
- "../match/_xcode_snippets.yml"
|
||||
13
espanso/espanso/match/_xcode_snippets.yml
Normal file
13
espanso/espanso/match/_xcode_snippets.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
# These are Xcode specific matches.
|
||||
matches:
|
||||
- trigger: ":struct"
|
||||
replace: |
|
||||
struct $|$ {
|
||||
|
||||
}
|
||||
|
||||
- trigger: ":pstruct"
|
||||
replace: |
|
||||
public struct $|$ {
|
||||
|
||||
}
|
||||
16
espanso/espanso/match/base.yml
Normal file
16
espanso/espanso/match/base.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
# espanso match file
|
||||
|
||||
# For a complete introduction, visit the official docs at: https://espanso.org/docs/
|
||||
# You can use this file to define the base matches (aka snippets)
|
||||
# that will be available in every application when using espanso.
|
||||
|
||||
# Matches are substitution rules: when you type the "trigger" string
|
||||
# it gets replaced by the "replace" string.
|
||||
|
||||
imports:
|
||||
- "./date.yml"
|
||||
- "./email.yml"
|
||||
- "./housecallpro.yml"
|
||||
- "./links.yml"
|
||||
|
||||
|
||||
19
espanso/espanso/match/date.yml
Normal file
19
espanso/espanso/match/date.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
matches:
|
||||
# Print the current date
|
||||
- trigger: ":date"
|
||||
replace: "{{mydate}}"
|
||||
vars:
|
||||
- name: mydate
|
||||
type: date
|
||||
params:
|
||||
format: "%m/%d/%Y"
|
||||
|
||||
# Iso-seconds
|
||||
- trigger: ":isosec"
|
||||
replace: "{{output}}"
|
||||
vars:
|
||||
- name: output
|
||||
type: shell
|
||||
params:
|
||||
cmd: "isosec"
|
||||
|
||||
11
espanso/espanso/match/email.yml
Normal file
11
espanso/espanso/match/email.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
# Email configuration.
|
||||
|
||||
matches:
|
||||
# Email Addresses
|
||||
- trigger: ":@hhe"
|
||||
replace: "mhoush@houshhomeenergy.com"
|
||||
- trigger: ":@service"
|
||||
replace: "service@houshhomeenergy.com"
|
||||
- trigger: ":@me"
|
||||
replace: "michael@mhoush.com"
|
||||
|
||||
4
espanso/espanso/match/git.yml
Normal file
4
espanso/espanso/match/git.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
matches:
|
||||
- trigger: ":gcl"
|
||||
replace: "git clone"
|
||||
|
||||
12
espanso/espanso/match/housecallpro.yml
Normal file
12
espanso/espanso/match/housecallpro.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
# Commonly used in house call pro.
|
||||
matches:
|
||||
# House Call Pro
|
||||
- trigger: ":cc"
|
||||
replace: "Client Concern"
|
||||
- trigger: ":diag"
|
||||
replace: "Diagnostic"
|
||||
- trigger: ":wd"
|
||||
replace: "Work Description"
|
||||
- trigger: ":wp" # I often mistype for this.
|
||||
replace: "Work Description"
|
||||
|
||||
31
espanso/espanso/match/links.yml
Normal file
31
espanso/espanso/match/links.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
# This file includes common url's / links.
|
||||
matches:
|
||||
# Github
|
||||
- trigger: ":gh"
|
||||
replace: "https://github.com"
|
||||
|
||||
# Personal Github
|
||||
- trigger: ":git"
|
||||
replace: "https://github.com/m-housh"
|
||||
|
||||
- trigger: ":pf"
|
||||
replace: "https://pointfree.co"
|
||||
|
||||
- trigger: ":gpf"
|
||||
replace: "https://github.com/pointfreeco"
|
||||
|
||||
- trigger: ":tca"
|
||||
replace: "https://github.com/pointfreeco/swift-composable-architecture"
|
||||
|
||||
# Youtube
|
||||
- trigger: ":yt"
|
||||
replace: "https://www.youtube.com/channel/UCb58SeURd5bObfTiL0KoliA"
|
||||
|
||||
# Discord
|
||||
- trigger: ":discord"
|
||||
replace: "https://discord.gg/W3p5GJfjry"
|
||||
|
||||
# TruTechTools
|
||||
- trigger: ":ttt"
|
||||
replace: "https://trutechtools.com"
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
[core]
|
||||
excludesfile = ~/.config/git/gitignore
|
||||
|
||||
[user]
|
||||
name = Michael Housh
|
||||
email = mhoush@houshhomeenergy.com
|
||||
14
git/git/config
Normal file
14
git/git/config
Normal file
@@ -0,0 +1,14 @@
|
||||
[core]
|
||||
excludesfile = ~/.config/git/gitignore
|
||||
[init]
|
||||
defaultBranch = main
|
||||
[user]
|
||||
name = Michael Housh
|
||||
email = mhoush@houshhomeenergy.com
|
||||
[color]
|
||||
ui = true
|
||||
[filter "lfs"]
|
||||
clean = git-lfs clean -- %f
|
||||
smudge = git-lfs smudge -- %f
|
||||
process = git-lfs filter-process
|
||||
required = true
|
||||
15
helix/config.toml
Normal file
15
helix/config.toml
Normal file
@@ -0,0 +1,15 @@
|
||||
theme = "nightfox"
|
||||
|
||||
[editor]
|
||||
line-number = "relative"
|
||||
cursorline = true
|
||||
color-modes = true
|
||||
shell = ["zsh", "-c"]
|
||||
|
||||
[editor.cursor-shape]
|
||||
insert = "bar"
|
||||
normal = "block"
|
||||
select = "underline"
|
||||
|
||||
[editor.file-picker]
|
||||
hidden = false
|
||||
718
macOS/.config/iterm/com.googlecode.iterm2.plist
Normal file
718
macOS/.config/iterm/com.googlecode.iterm2.plist
Normal file
@@ -0,0 +1,718 @@
|
||||
<?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>AllowClipboardAccess</key>
|
||||
<true/>
|
||||
<key>Default Bookmark Guid</key>
|
||||
<string>A30A702C-1CC2-4C2A-A29F-505BC017C0A6</string>
|
||||
<key>DoubleClickPerformsSmartSelection</key>
|
||||
<true/>
|
||||
<key>EnableProxyIcon</key>
|
||||
<false/>
|
||||
<key>HapticFeedbackForEsc</key>
|
||||
<false/>
|
||||
<key>HotkeyMigratedFromSingleToMulti</key>
|
||||
<true/>
|
||||
<key>IRMemory</key>
|
||||
<integer>4</integer>
|
||||
<key>New Bookmarks</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>ASCII Anti Aliased</key>
|
||||
<true/>
|
||||
<key>Ambiguous Double Width</key>
|
||||
<false/>
|
||||
<key>Ansi 0 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<string>0</string>
|
||||
<key>Green Component</key>
|
||||
<string>0</string>
|
||||
<key>Red Component</key>
|
||||
<string>0</string>
|
||||
</dict>
|
||||
<key>Ansi 1 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<string>0</string>
|
||||
<key>Green Component</key>
|
||||
<string>0</string>
|
||||
<key>Red Component</key>
|
||||
<string>0.8</string>
|
||||
</dict>
|
||||
<key>Ansi 10 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<string>0.2039216</string>
|
||||
<key>Green Component</key>
|
||||
<string>0.8862745</string>
|
||||
<key>Red Component</key>
|
||||
<string>0.5411764999999999</string>
|
||||
</dict>
|
||||
<key>Ansi 11 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<string>0.3098039</string>
|
||||
<key>Green Component</key>
|
||||
<string>0.9137255</string>
|
||||
<key>Red Component</key>
|
||||
<string>0.9882353</string>
|
||||
</dict>
|
||||
<key>Ansi 12 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<string>0.8117647</string>
|
||||
<key>Green Component</key>
|
||||
<string>0.6235294</string>
|
||||
<key>Red Component</key>
|
||||
<string>0.4470588</string>
|
||||
</dict>
|
||||
<key>Ansi 13 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<string>0.6588235</string>
|
||||
<key>Green Component</key>
|
||||
<string>0.4980392</string>
|
||||
<key>Red Component</key>
|
||||
<string>0.6784314</string>
|
||||
</dict>
|
||||
<key>Ansi 14 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<string>0.8862745</string>
|
||||
<key>Green Component</key>
|
||||
<string>0.8862745</string>
|
||||
<key>Red Component</key>
|
||||
<string>0.2039216</string>
|
||||
</dict>
|
||||
<key>Ansi 15 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<string>0.9254902</string>
|
||||
<key>Green Component</key>
|
||||
<string>0.9333333</string>
|
||||
<key>Red Component</key>
|
||||
<string>0.9333333</string>
|
||||
</dict>
|
||||
<key>Ansi 2 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<string>0.02352941</string>
|
||||
<key>Green Component</key>
|
||||
<string>0.6039215999999999</string>
|
||||
<key>Red Component</key>
|
||||
<string>0.3058824</string>
|
||||
</dict>
|
||||
<key>Ansi 3 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<string>0</string>
|
||||
<key>Green Component</key>
|
||||
<string>0.627451</string>
|
||||
<key>Red Component</key>
|
||||
<string>0.7686275</string>
|
||||
</dict>
|
||||
<key>Ansi 4 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<string>0.6431373</string>
|
||||
<key>Green Component</key>
|
||||
<string>0.3960784</string>
|
||||
<key>Red Component</key>
|
||||
<string>0.2039216</string>
|
||||
</dict>
|
||||
<key>Ansi 5 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<string>0.4823529</string>
|
||||
<key>Green Component</key>
|
||||
<string>0.3137255</string>
|
||||
<key>Red Component</key>
|
||||
<string>0.4588235</string>
|
||||
</dict>
|
||||
<key>Ansi 6 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<string>0.6039215999999999</string>
|
||||
<key>Green Component</key>
|
||||
<string>0.5960785</string>
|
||||
<key>Red Component</key>
|
||||
<string>0.02352941</string>
|
||||
</dict>
|
||||
<key>Ansi 7 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<string>0.8117647</string>
|
||||
<key>Green Component</key>
|
||||
<string>0.8431373</string>
|
||||
<key>Red Component</key>
|
||||
<string>0.827451</string>
|
||||
</dict>
|
||||
<key>Ansi 8 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<string>0.3254902</string>
|
||||
<key>Green Component</key>
|
||||
<string>0.3411765</string>
|
||||
<key>Red Component</key>
|
||||
<string>0.3333333</string>
|
||||
</dict>
|
||||
<key>Ansi 9 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<string>0.1607843</string>
|
||||
<key>Green Component</key>
|
||||
<string>0.1607843</string>
|
||||
<key>Red Component</key>
|
||||
<string>0.9372549</string>
|
||||
</dict>
|
||||
<key>BM Growl</key>
|
||||
<true/>
|
||||
<key>Background Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.10000000000000001</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.10000000000000001</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.10000000000000001</real>
|
||||
</dict>
|
||||
<key>Background Image Location</key>
|
||||
<string></string>
|
||||
<key>Badge Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>0.5</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.0</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.14910030364990234</real>
|
||||
<key>Red Component</key>
|
||||
<real>1</real>
|
||||
</dict>
|
||||
<key>Blinking Cursor</key>
|
||||
<false/>
|
||||
<key>Blur</key>
|
||||
<false/>
|
||||
<key>Bold Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<string>1</string>
|
||||
<key>Green Component</key>
|
||||
<string>1</string>
|
||||
<key>Red Component</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
<key>Bound Hosts</key>
|
||||
<array/>
|
||||
<key>Character Encoding</key>
|
||||
<integer>4</integer>
|
||||
<key>Close Sessions On End</key>
|
||||
<true/>
|
||||
<key>Columns</key>
|
||||
<integer>180</integer>
|
||||
<key>Command</key>
|
||||
<string></string>
|
||||
<key>Cursor Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<string>1</string>
|
||||
<key>Green Component</key>
|
||||
<string>1</string>
|
||||
<key>Red Component</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
<key>Cursor Guide Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>0.25</real>
|
||||
<key>Blue Component</key>
|
||||
<real>1</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.92681378126144409</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.70214027166366577</real>
|
||||
</dict>
|
||||
<key>Cursor Text Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<string>0</string>
|
||||
<key>Green Component</key>
|
||||
<string>0</string>
|
||||
<key>Red Component</key>
|
||||
<string>0</string>
|
||||
</dict>
|
||||
<key>Custom Command</key>
|
||||
<string>No</string>
|
||||
<key>Custom Directory</key>
|
||||
<string>No</string>
|
||||
<key>Default Bookmark</key>
|
||||
<string>No</string>
|
||||
<key>Description</key>
|
||||
<string>Default</string>
|
||||
<key>Disable Window Resizing</key>
|
||||
<true/>
|
||||
<key>Flashing Bell</key>
|
||||
<false/>
|
||||
<key>Foreground Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<string>1</string>
|
||||
<key>Green Component</key>
|
||||
<string>1</string>
|
||||
<key>Red Component</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
<key>Guid</key>
|
||||
<string>A30A702C-1CC2-4C2A-A29F-505BC017C0A6</string>
|
||||
<key>Horizontal Spacing</key>
|
||||
<real>1</real>
|
||||
<key>Idle Code</key>
|
||||
<integer>0</integer>
|
||||
<key>Jobs to Ignore</key>
|
||||
<array>
|
||||
<string>rlogin</string>
|
||||
<string>ssh</string>
|
||||
<string>slogin</string>
|
||||
<string>telnet</string>
|
||||
</array>
|
||||
<key>Keyboard Map</key>
|
||||
<dict>
|
||||
<key>0x2d-0x40000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>11</integer>
|
||||
<key>Text</key>
|
||||
<string>0x1f</string>
|
||||
</dict>
|
||||
<key>0x32-0x40000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>11</integer>
|
||||
<key>Text</key>
|
||||
<string>0x00</string>
|
||||
</dict>
|
||||
<key>0x33-0x40000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>11</integer>
|
||||
<key>Text</key>
|
||||
<string>0x1b</string>
|
||||
</dict>
|
||||
<key>0x34-0x40000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>11</integer>
|
||||
<key>Text</key>
|
||||
<string>0x1c</string>
|
||||
</dict>
|
||||
<key>0x35-0x40000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>11</integer>
|
||||
<key>Text</key>
|
||||
<string>0x1d</string>
|
||||
</dict>
|
||||
<key>0x36-0x40000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>11</integer>
|
||||
<key>Text</key>
|
||||
<string>0x1e</string>
|
||||
</dict>
|
||||
<key>0x37-0x40000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>11</integer>
|
||||
<key>Text</key>
|
||||
<string>0x1f</string>
|
||||
</dict>
|
||||
<key>0x38-0x40000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>11</integer>
|
||||
<key>Text</key>
|
||||
<string>0x7f</string>
|
||||
</dict>
|
||||
<key>0xf700-0x220000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[1;2A</string>
|
||||
</dict>
|
||||
<key>0xf700-0x240000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[1;5A</string>
|
||||
</dict>
|
||||
<key>0xf700-0x260000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[1;6A</string>
|
||||
</dict>
|
||||
<key>0xf700-0x280000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>11</integer>
|
||||
<key>Text</key>
|
||||
<string>0x1b 0x1b 0x5b 0x41</string>
|
||||
</dict>
|
||||
<key>0xf701-0x220000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[1;2B</string>
|
||||
</dict>
|
||||
<key>0xf701-0x240000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[1;5B</string>
|
||||
</dict>
|
||||
<key>0xf701-0x260000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[1;6B</string>
|
||||
</dict>
|
||||
<key>0xf701-0x280000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>11</integer>
|
||||
<key>Text</key>
|
||||
<string>0x1b 0x1b 0x5b 0x42</string>
|
||||
</dict>
|
||||
<key>0xf702-0x220000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[1;2D</string>
|
||||
</dict>
|
||||
<key>0xf702-0x240000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[1;5D</string>
|
||||
</dict>
|
||||
<key>0xf702-0x260000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[1;6D</string>
|
||||
</dict>
|
||||
<key>0xf702-0x280000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>11</integer>
|
||||
<key>Text</key>
|
||||
<string>0x1b 0x1b 0x5b 0x44</string>
|
||||
</dict>
|
||||
<key>0xf703-0x220000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[1;2C</string>
|
||||
</dict>
|
||||
<key>0xf703-0x240000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[1;5C</string>
|
||||
</dict>
|
||||
<key>0xf703-0x260000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[1;6C</string>
|
||||
</dict>
|
||||
<key>0xf703-0x280000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>11</integer>
|
||||
<key>Text</key>
|
||||
<string>0x1b 0x1b 0x5b 0x43</string>
|
||||
</dict>
|
||||
<key>0xf704-0x20000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[1;2P</string>
|
||||
</dict>
|
||||
<key>0xf705-0x20000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[1;2Q</string>
|
||||
</dict>
|
||||
<key>0xf706-0x20000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[1;2R</string>
|
||||
</dict>
|
||||
<key>0xf707-0x20000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[1;2S</string>
|
||||
</dict>
|
||||
<key>0xf708-0x20000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[15;2~</string>
|
||||
</dict>
|
||||
<key>0xf709-0x20000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[17;2~</string>
|
||||
</dict>
|
||||
<key>0xf70a-0x20000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[18;2~</string>
|
||||
</dict>
|
||||
<key>0xf70b-0x20000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[19;2~</string>
|
||||
</dict>
|
||||
<key>0xf70c-0x20000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[20;2~</string>
|
||||
</dict>
|
||||
<key>0xf70d-0x20000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[21;2~</string>
|
||||
</dict>
|
||||
<key>0xf70e-0x20000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[23;2~</string>
|
||||
</dict>
|
||||
<key>0xf70f-0x20000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[24;2~</string>
|
||||
</dict>
|
||||
<key>0xf729-0x20000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[1;2H</string>
|
||||
</dict>
|
||||
<key>0xf729-0x40000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[1;5H</string>
|
||||
</dict>
|
||||
<key>0xf72b-0x20000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[1;2F</string>
|
||||
</dict>
|
||||
<key>0xf72b-0x40000</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<integer>10</integer>
|
||||
<key>Text</key>
|
||||
<string>[1;5F</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>Link Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.73422706127166748</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.35915294289588928</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.0</real>
|
||||
</dict>
|
||||
<key>Mouse Reporting</key>
|
||||
<true/>
|
||||
<key>Name</key>
|
||||
<string>mhoush</string>
|
||||
<key>Non Ascii Font</key>
|
||||
<string>icomoon 12</string>
|
||||
<key>Non-ASCII Anti Aliased</key>
|
||||
<true/>
|
||||
<key>Normal Font</key>
|
||||
<string>InconsolataNerdFontCompleteM-Regular 20</string>
|
||||
<key>Option Key Sends</key>
|
||||
<integer>0</integer>
|
||||
<key>Prompt Before Closing 2</key>
|
||||
<false/>
|
||||
<key>Right Option Key Sends</key>
|
||||
<integer>0</integer>
|
||||
<key>Rows</key>
|
||||
<integer>60</integer>
|
||||
<key>Screen</key>
|
||||
<integer>-1</integer>
|
||||
<key>Scrollback Lines</key>
|
||||
<integer>1000</integer>
|
||||
<key>Selected Text Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<string>0</string>
|
||||
<key>Green Component</key>
|
||||
<string>0</string>
|
||||
<key>Red Component</key>
|
||||
<string>0</string>
|
||||
</dict>
|
||||
<key>Selection Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<string>1</string>
|
||||
<key>Green Component</key>
|
||||
<string>0.8353</string>
|
||||
<key>Red Component</key>
|
||||
<string>0.7098</string>
|
||||
</dict>
|
||||
<key>Send Code When Idle</key>
|
||||
<false/>
|
||||
<key>Shortcut</key>
|
||||
<string></string>
|
||||
<key>Show Status Bar</key>
|
||||
<false/>
|
||||
<key>Silence Bell</key>
|
||||
<false/>
|
||||
<key>Sync Title</key>
|
||||
<false/>
|
||||
<key>Tags</key>
|
||||
<array/>
|
||||
<key>Terminal Type</key>
|
||||
<string>xterm-256color</string>
|
||||
<key>Transparency</key>
|
||||
<real>0.0</real>
|
||||
<key>Unlimited Scrollback</key>
|
||||
<false/>
|
||||
<key>Use Bold Font</key>
|
||||
<true/>
|
||||
<key>Use Bright Bold</key>
|
||||
<true/>
|
||||
<key>Use Italic Font</key>
|
||||
<true/>
|
||||
<key>Use Non-ASCII Font</key>
|
||||
<false/>
|
||||
<key>Vertical Spacing</key>
|
||||
<real>1</real>
|
||||
<key>Visual Bell</key>
|
||||
<true/>
|
||||
<key>Window Type</key>
|
||||
<integer>0</integer>
|
||||
<key>Working Directory</key>
|
||||
<string>/Users/michael</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>OnlyWhenMoreTabs</key>
|
||||
<false/>
|
||||
<key>OpenArrangementAtStartup</key>
|
||||
<false/>
|
||||
<key>OpenNoWindowsAtStartup</key>
|
||||
<false/>
|
||||
<key>PointerActions</key>
|
||||
<dict>
|
||||
<key>Button,1,1,,</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<string>kContextMenuPointerAction</string>
|
||||
</dict>
|
||||
<key>Button,2,1,,</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<string>kPasteFromClipboardPointerAction</string>
|
||||
</dict>
|
||||
<key>Gesture,ThreeFingerSwipeDown,,</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<string>kPrevWindowPointerAction</string>
|
||||
</dict>
|
||||
<key>Gesture,ThreeFingerSwipeLeft,,</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<string>kPrevTabPointerAction</string>
|
||||
</dict>
|
||||
<key>Gesture,ThreeFingerSwipeRight,,</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<string>kNextTabPointerAction</string>
|
||||
</dict>
|
||||
<key>Gesture,ThreeFingerSwipeUp,,</key>
|
||||
<dict>
|
||||
<key>Action</key>
|
||||
<string>kNextWindowPointerAction</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>Print In Black And White</key>
|
||||
<true/>
|
||||
<key>PromptOnQuit</key>
|
||||
<false/>
|
||||
<key>QuitWhenAllWindowsClosed</key>
|
||||
<true/>
|
||||
<key>SoundForEsc</key>
|
||||
<false/>
|
||||
<key>SwitchPaneModifier</key>
|
||||
<integer>1</integer>
|
||||
<key>TabStyleWithAutomaticOption</key>
|
||||
<integer>5</integer>
|
||||
<key>VisualIndicatorForEsc</key>
|
||||
<false/>
|
||||
<key>kCPKSelectionViewPreferredModeKey</key>
|
||||
<integer>5</integer>
|
||||
<key>kCPKSelectionViewShowHSBTextFieldsKey</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,8 +1,10 @@
|
||||
{
|
||||
"Ansi 6 Color" : {
|
||||
"Green Component" : "0.5960785",
|
||||
"Blue Component" : "0.6039215999999999",
|
||||
"Red Component" : "0.02352941"
|
||||
"Link Color" : {
|
||||
"Red Component" : 0,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.73422706127166748,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.35915294289588928
|
||||
},
|
||||
"Tags" : [
|
||||
|
||||
@@ -32,13 +34,9 @@
|
||||
"Blue Component" : "0.1607843",
|
||||
"Red Component" : "0.9372549"
|
||||
},
|
||||
"Ansi 5 Color" : {
|
||||
"Green Component" : "0.3137255",
|
||||
"Blue Component" : "0.4823529",
|
||||
"Red Component" : "0.4588235"
|
||||
},
|
||||
"Use Non-ASCII Font" : false,
|
||||
"Rows" : 40,
|
||||
"Horizontal Spacing" : 1,
|
||||
"Right Option Key Sends" : 0,
|
||||
"Rows" : 60,
|
||||
"Default Bookmark" : "No",
|
||||
"Cursor Guide Color" : {
|
||||
"Red Component" : 0.70214027166366577,
|
||||
@@ -61,6 +59,7 @@
|
||||
"slogin",
|
||||
"telnet"
|
||||
],
|
||||
"Show Status Bar" : false,
|
||||
"Ansi 15 Color" : {
|
||||
"Green Component" : "0.9333333",
|
||||
"Blue Component" : "0.9254902",
|
||||
@@ -89,7 +88,7 @@
|
||||
"Blue Component" : "1",
|
||||
"Red Component" : "0.7098"
|
||||
},
|
||||
"Columns" : 120,
|
||||
"Columns" : 180,
|
||||
"Idle Code" : 0,
|
||||
"Ansi 13 Color" : {
|
||||
"Green Component" : "0.4980392",
|
||||
@@ -108,9 +107,11 @@
|
||||
"Red Component" : "0"
|
||||
},
|
||||
"Background Color" : {
|
||||
"Green Component" : "0",
|
||||
"Blue Component" : "0",
|
||||
"Red Component" : "0"
|
||||
"Red Component" : 0.10000000000000001,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.10000000000000001,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.10000000000000001
|
||||
},
|
||||
"Character Encoding" : 4,
|
||||
"Ansi 11 Color" : {
|
||||
@@ -290,7 +291,7 @@
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0,
|
||||
"Alpha Component" : 0.5,
|
||||
"Green Component" : 0.14910027384757996
|
||||
"Green Component" : 0.14910030364990234
|
||||
},
|
||||
"Scrollback Lines" : 1000,
|
||||
"Send Code When Idle" : false,
|
||||
@@ -316,42 +317,44 @@
|
||||
"Blue Component" : "1",
|
||||
"Red Component" : "1"
|
||||
},
|
||||
"Transparency" : 0.14805401741190161,
|
||||
"Transparency" : 0,
|
||||
"Ansi 1 Color" : {
|
||||
"Green Component" : "0",
|
||||
"Blue Component" : "0",
|
||||
"Red Component" : "0.8"
|
||||
},
|
||||
"Horizontal Spacing" : 1,
|
||||
"Custom Directory" : "No",
|
||||
"Ansi 4 Color" : {
|
||||
"Green Component" : "0.3960784",
|
||||
"Blue Component" : "0.6431373",
|
||||
"Red Component" : "0.2039216"
|
||||
},
|
||||
"Link Color" : {
|
||||
"Red Component" : 0,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.73422712087631226,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.35915297269821167
|
||||
},
|
||||
"Ansi 0 Color" : {
|
||||
"Green Component" : "0",
|
||||
"Blue Component" : "0",
|
||||
"Red Component" : "0"
|
||||
},
|
||||
"Guid" : "3B878A03-0EF2-4A8C-B1FD-7DEF4A0ABF6F",
|
||||
"Normal Font" : "InconsolataNerdFontCompleteM-Regular 16",
|
||||
"Ansi 3 Color" : {
|
||||
"Green Component" : "0.627451",
|
||||
"Blue Component" : "0",
|
||||
"Red Component" : "0.7686275"
|
||||
},
|
||||
"Ansi 2 Color" : {
|
||||
"Green Component" : "0.6039215999999999",
|
||||
"Blue Component" : "0.02352941",
|
||||
"Red Component" : "0.3058824"
|
||||
},
|
||||
"Right Option Key Sends" : 0
|
||||
"Ansi 3 Color" : {
|
||||
"Green Component" : "0.627451",
|
||||
"Blue Component" : "0",
|
||||
"Red Component" : "0.7686275"
|
||||
},
|
||||
"Ansi 4 Color" : {
|
||||
"Green Component" : "0.3960784",
|
||||
"Blue Component" : "0.6431373",
|
||||
"Red Component" : "0.2039216"
|
||||
},
|
||||
"Ansi 5 Color" : {
|
||||
"Green Component" : "0.3137255",
|
||||
"Blue Component" : "0.4823529",
|
||||
"Red Component" : "0.4588235"
|
||||
},
|
||||
"Use Non-ASCII Font" : false,
|
||||
"Ansi 6 Color" : {
|
||||
"Green Component" : "0.5960785",
|
||||
"Blue Component" : "0.6039215999999999",
|
||||
"Red Component" : "0.02352941"
|
||||
},
|
||||
"Normal Font" : "InconsolataNerdFontCompleteM-Regular 20",
|
||||
"Custom Directory" : "No",
|
||||
"Ansi 0 Color" : {
|
||||
"Green Component" : "0",
|
||||
"Blue Component" : "0",
|
||||
"Red Component" : "0"
|
||||
},
|
||||
"Guid" : "A30A702C-1CC2-4C2A-A29F-505BC017C0A6"
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
mas "pwSafe", id: "520993579"
|
||||
mas "Xcode", id: "497799835"
|
||||
@@ -1,21 +0,0 @@
|
||||
tap "homebrew/cask"
|
||||
tap "homebrew/cask-fonts"
|
||||
|
||||
# TODO: Make the application directory a global variable ??
|
||||
# set arguments for all 'brew install --cask' commands
|
||||
cask_args appdir: "~/Applications", require_sha: true
|
||||
|
||||
# formula
|
||||
brew "fd" # required for some neovim plugins
|
||||
brew "git"
|
||||
brew "mas"
|
||||
brew "neovim"
|
||||
brew "node" # required for some LSP servers in neovim
|
||||
brew "ripgrep"
|
||||
brew "stow"
|
||||
brew "swift-format"
|
||||
brew "zsh"
|
||||
brew "zsh-completions"
|
||||
|
||||
# fonts
|
||||
cask "font-inconsolata-nerd-font"
|
||||
@@ -1,12 +0,0 @@
|
||||
tap "homebrew/cask"
|
||||
|
||||
# casks
|
||||
cask "docker"
|
||||
cask "google-chrome"
|
||||
cask "iterm2"
|
||||
cask "microsoft-teams"
|
||||
cask "obs"
|
||||
cask "paw"
|
||||
cask "rectangle"
|
||||
cask "sketchup-pro"
|
||||
|
||||
33
macOS/LaunchAgents/com.michael.clear-screenshots.plist
Normal file
33
macOS/LaunchAgents/com.michael.clear-screenshots.plist
Normal file
@@ -0,0 +1,33 @@
|
||||
<?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.clear-screenshots</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>sh</string>
|
||||
<string>-c</string>
|
||||
<string>/Users/michael/.local/scripts/clear_screenshots</string>
|
||||
</array>
|
||||
<key>StartCalendarInterval</key>
|
||||
<dict>
|
||||
<key>Day</key>
|
||||
<integer>1</integer>
|
||||
<key>Hour</key>
|
||||
<integer>0</integer>
|
||||
<key>Minute</key>
|
||||
<integer>0</integer>
|
||||
<key>Weekday</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>UserName</key>
|
||||
<string>michael</string>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
<key>StandardOutPath</key>
|
||||
<string>/var/log/com.michael.clear-screenshots.out.log</string>
|
||||
<key>StandardErrorPath</key>
|
||||
<string>/var/log/com.michael.clear-screenshots.error.log</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,106 +0,0 @@
|
||||
-- Plugins
|
||||
|
||||
local execute = vim.api.nvim_command
|
||||
local fn = vim.fn
|
||||
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
|
||||
|
||||
|
||||
-- returns the require for use in `config` parameter of packer's use
|
||||
-- expects the name of the config file
|
||||
function get_config(name)
|
||||
return string.format("require(\"config/%s\")", name)
|
||||
end
|
||||
|
||||
-- Install packer if not available
|
||||
if fn.empty(fn.glob(install_path)) > 0 then
|
||||
fn.system({
|
||||
"git", "clone", "https://github.com/wbthomason/packer.nvim",
|
||||
install_path
|
||||
})
|
||||
execute "packadd packer.nvim"
|
||||
end
|
||||
|
||||
-- Initialize and configure packer
|
||||
local packer = require("packer")
|
||||
packer.init {
|
||||
enable = true, -- enable profiling via :PackerCompile profile=true
|
||||
threshold = 0 -- the amount in ms that a plugins load time must be over for it to be included in the profile
|
||||
}
|
||||
local use = packer.use
|
||||
packer.reset()
|
||||
|
||||
-- actual plugins list
|
||||
use "wbthomason/packer.nvim"
|
||||
|
||||
use {"kyazdani42/nvim-tree.lua", config = get_config("nvim-tree")}
|
||||
|
||||
use {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
config = get_config("lualine"),
|
||||
requires = {"kyazdani42/nvim-web-devicons", opt = true}
|
||||
}
|
||||
|
||||
use {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
config = get_config("telescope"),
|
||||
requires = { {'nvim-lua/plenary.nvim'} }
|
||||
}
|
||||
|
||||
use {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
config = get_config("treesitter"),
|
||||
run = ":TSUpdate"
|
||||
}
|
||||
|
||||
use "nvim-treesitter/nvim-treesitter-textobjects"
|
||||
|
||||
use {
|
||||
"hrsh7th/nvim-cmp",
|
||||
requires = {
|
||||
{"hrsh7th/cmp-nvim-lsp"}, {"hrsh7th/cmp-buffer"}, {"hrsh7th/cmp-path"},
|
||||
{"hrsh7th/cmp-cmdline"}, {"hrsh7th/cmp-vsnip"},
|
||||
{"f3fora/cmp-spell", {"hrsh7th/cmp-calc"}, {"hrsh7th/cmp-emoji"}}
|
||||
},
|
||||
config = get_config("cmp")
|
||||
}
|
||||
|
||||
use {"onsails/lspkind-nvim", requires = {{"famiu/bufdelete.nvim"}}}
|
||||
|
||||
-- LSP
|
||||
use {"ray-x/lsp_signature.nvim", requires = {{"neovim/nvim-lspconfig"}}}
|
||||
|
||||
use {
|
||||
"neovim/nvim-lspconfig",
|
||||
config = get_config("lsp")
|
||||
}
|
||||
use {
|
||||
"williamboman/nvim-lsp-installer",
|
||||
config = get_config("lsp-installer")
|
||||
}
|
||||
|
||||
use {"folke/which-key.nvim", event = "VimEnter", config = get_config("which")}
|
||||
|
||||
-- requirement for Neogit
|
||||
use {
|
||||
"sindrets/diffview.nvim",
|
||||
cmd = {
|
||||
"DiffviewOpen", "DiffviewClose", "DiffviewToggleFiles",
|
||||
"DiffviewFocusFiles"
|
||||
},
|
||||
config = get_config("diffview")
|
||||
}
|
||||
|
||||
use {
|
||||
"TimUntersberger/neogit",
|
||||
requires = {"nvim-lua/plenary.nvim"},
|
||||
cmd = "Neogit",
|
||||
config = get_config("neogit")
|
||||
}
|
||||
|
||||
use {"hrsh7th/vim-vsnip", config = get_config("vsnip")}
|
||||
|
||||
-- Theme
|
||||
use {
|
||||
'EdenEast/nightfox.nvim',
|
||||
config = get_config("nightfox")
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
-- Nightfox
|
||||
require('nightfox').load('nordfox')
|
||||
|
||||
11
nvim/ftplugin/swift.lua
Normal file
11
nvim/ftplugin/swift.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
local o = vim.opt
|
||||
local keymap = vim.api.nvim_set_keymap
|
||||
local default_options = {noremap = true, silent = true}
|
||||
|
||||
o.tabstop = 2
|
||||
o.softtabstop = 2
|
||||
o.shiftwidth = 2
|
||||
|
||||
keymap('n', '<C-b>', '<cmd>!swift build<CR>', default_options)
|
||||
keymap('n', '<C-T>', '<cmd>!swift test<CR>', default_options)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- Plugins
|
||||
|
||||
require('plugins')
|
||||
|
||||
-- Key maps
|
||||
@@ -13,3 +13,4 @@ vim.api.nvim_exec([[
|
||||
au FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
|
||||
augroup END
|
||||
]], false)
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
local keymap = vim.api.nvim_set_keymap
|
||||
default_options = {noremap = true, silent = true}
|
||||
expr_options = {noremap = true, expr = true, silent = true}
|
||||
|
||||
-- map the leader key
|
||||
keymap('n', '<Space>', '<NOP>', default_options)
|
||||
vim.g.mapleader = " "
|
||||
local default_options = {noremap = true, silent = true}
|
||||
-- local expr_options = {noremap = true, expr = true, silent = true}
|
||||
|
||||
-- easier escape key mapping
|
||||
keymap('i', 'jk', '<ESC>', default_options)
|
||||
@@ -16,7 +12,6 @@ keymap('i', '<c-s>', '<ESC>:w<CR>a', default_options)
|
||||
keymap("v", "p", "\"_dP", default_options)
|
||||
|
||||
-- buffer focus
|
||||
local opts = { noremap = true }
|
||||
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)
|
||||
@@ -31,3 +26,7 @@ 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 nvim-tree open or closed
|
||||
keymap("n", "<c-n>", "<CMD>:Neotree toggle<CR>", default_options)
|
||||
|
||||
134
nvim/lua/plugin-config/cmp.lua
Normal file
134
nvim/lua/plugin-config/cmp.lua
Normal file
@@ -0,0 +1,134 @@
|
||||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
enabled = true,
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"hrsh7th/cmp-vsnip",
|
||||
"f3fora/cmp-spell",
|
||||
"hrsh7th/cmp-calc",
|
||||
"hrsh7th/cmp-emoji"
|
||||
},
|
||||
config = function()
|
||||
-- Setup nvim-cmp.
|
||||
local cmp = require "cmp"
|
||||
local lspkind = require("lspkind")
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
local has_words_before = function()
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
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)
|
||||
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true),
|
||||
mode, true)
|
||||
end
|
||||
|
||||
|
||||
require('lspconfig').sourcekit.setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
|
||||
lspkind.init({
|
||||
symbol_map = {
|
||||
Text = "",
|
||||
Method = "",
|
||||
Function = "",
|
||||
Constructor = "",
|
||||
Field = "ﰠ",
|
||||
Variable = "",
|
||||
Class = "ﴯ",
|
||||
Interface = "",
|
||||
Module = "",
|
||||
Property = "ﰠ",
|
||||
Unit = "塞",
|
||||
Value = "",
|
||||
Enum = "",
|
||||
Keyword = "",
|
||||
Snippet = "",
|
||||
Color = "",
|
||||
File = "",
|
||||
Reference = "",
|
||||
Folder = "",
|
||||
EnumMember = "",
|
||||
Constant = "",
|
||||
Struct = "פּ",
|
||||
Event = "",
|
||||
Operator = "",
|
||||
TypeParameter = ""
|
||||
}
|
||||
})
|
||||
|
||||
cmp.setup({
|
||||
formatting = {
|
||||
format = lspkind.cmp_format {
|
||||
with_text = false,
|
||||
maxwidth = 50,
|
||||
menu = {
|
||||
buffer = "BUF",
|
||||
nvim_lsp = "LSP",
|
||||
path = "PATH",
|
||||
vsnip = "SNIP",
|
||||
calc = "CALC",
|
||||
spell = "SPELL",
|
||||
emoji = "EMOJI"
|
||||
}
|
||||
}
|
||||
},
|
||||
experimental = {native_menu = false, ghost_text = false},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
|
||||
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.close(),
|
||||
["<CR>"] = cmp.mapping.confirm {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = false
|
||||
},
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif vim.fn["vsnip#available"](1) == 1 then
|
||||
feedkey("<Plug>(vsnip-expand-or-jump)", "")
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback() -- The fallback function sends a already mapped key. In this case, it's probably `<Tab>`.
|
||||
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 = "vsnip"}, {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
|
||||
}
|
||||
48
nvim/lua/plugin-config/diffview.lua
Normal file
48
nvim/lua/plugin-config/diffview.lua
Normal file
@@ -0,0 +1,48 @@
|
||||
return {
|
||||
"sindrets/diffview.nvim",
|
||||
cmd = {
|
||||
"DiffviewOpen",
|
||||
"DiffviewClose",
|
||||
"DiffviewToggleFiles",
|
||||
"DiffviewFocusFiles"
|
||||
},
|
||||
config = function()
|
||||
local cb = require('diffview.config').diffview_callback
|
||||
|
||||
require('diffview').setup {
|
||||
diff_binaries = false, -- Show diffs for binaries
|
||||
use_icons = true, -- Requires nvim-web-devicons
|
||||
file_panel = {
|
||||
width = 35,
|
||||
},
|
||||
key_bindings = {
|
||||
disable_defaults = false, -- Disable the default key bindings
|
||||
-- The `view` bindings are active in the diff buffers, only when the current
|
||||
-- tabpage is a Diffview.
|
||||
view = {
|
||||
["<tab>"] = cb("select_next_entry"), -- Open the diff for the next file
|
||||
["<s-tab>"] = cb("select_prev_entry"), -- Open the diff for the previous file
|
||||
["<leader>e"] = cb("focus_files"), -- Bring focus to the files panel
|
||||
["<leader>b"] = cb("toggle_files"), -- Toggle the files panel.
|
||||
},
|
||||
file_panel = {
|
||||
["j"] = cb("next_entry"), -- Bring the cursor to the next file entry
|
||||
["<down>"] = cb("next_entry"),
|
||||
["k"] = cb("prev_entry"), -- Bring the cursor to the previous file entry.
|
||||
["<up>"] = cb("prev_entry"),
|
||||
["<cr>"] = cb("select_entry"), -- Open the diff for the selected entry.
|
||||
["o"] = cb("select_entry"),
|
||||
["<2-LeftMouse>"] = cb("select_entry"),
|
||||
["-"] = cb("toggle_stage_entry"), -- Stage / unstage the selected entry.
|
||||
["S"] = cb("stage_all"), -- Stage all entries.
|
||||
["U"] = cb("unstage_all"), -- Unstage all entries.
|
||||
["R"] = cb("refresh_files"), -- Update stats and entries in the file list.
|
||||
["<tab>"] = cb("select_next_entry"),
|
||||
["<s-tab>"] = cb("select_prev_entry"),
|
||||
["<leader>e"] = cb("focus_files"),
|
||||
["<leader>b"] = cb("toggle_files"),
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
9
nvim/lua/plugin-config/init.lua
Normal file
9
nvim/lua/plugin-config/init.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
-- This file contains plugin's that don't require much configuration.
|
||||
return {
|
||||
{
|
||||
"hrsh7th/vim-vsnip",
|
||||
config = function()
|
||||
vim.g.vsnip_snippet_dir = os.getenv('HOME') .. '/.config/nvim/snippets/'
|
||||
end
|
||||
},
|
||||
}
|
||||
6
nvim/lua/plugin-config/lsp-installer.lua
Normal file
6
nvim/lua/plugin-config/lsp-installer.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
"williamboman/nvim-lsp-installer",
|
||||
config = function()
|
||||
require("nvim-lsp-installer").setup()
|
||||
end
|
||||
}
|
||||
158
nvim/lua/plugin-config/lspconfig.lua
Normal file
158
nvim/lua/plugin-config/lspconfig.lua
Normal file
@@ -0,0 +1,158 @@
|
||||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
},
|
||||
config = function()
|
||||
require("mason").setup()
|
||||
require("mason-lspconfig").setup()
|
||||
local nvim_lsp = require("lspconfig")
|
||||
|
||||
-- Use an on_attach function to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
local on_attach = function(bufnr)
|
||||
local function buf_set_keymap(...)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, ...)
|
||||
end
|
||||
|
||||
-- Mappings.
|
||||
local opts = {noremap = true, silent = true}
|
||||
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
buf_set_keymap("n", "gD", "<Cmd>lua vim.lsp.buf.declaration()<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)
|
||||
buf_set_keymap("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", 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)
|
||||
buf_set_keymap("n", "<space>wa",
|
||||
"<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>", opts)
|
||||
buf_set_keymap("n", "<space>wr",
|
||||
"<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>", opts)
|
||||
buf_set_keymap("n", "<space>wl",
|
||||
"<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>",
|
||||
opts)
|
||||
buf_set_keymap("n", "<space>D",
|
||||
"<cmd>lua vim.lsp.buf.type_definition()<CR>", opts)
|
||||
buf_set_keymap("n", "<space>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", opts)
|
||||
buf_set_keymap("n", "<space>ca", "<cmd>lua vim.lsp.buf.code_action()<CR>",
|
||||
opts)
|
||||
buf_set_keymap("n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
|
||||
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)
|
||||
|
||||
buf_set_keymap("n", "]d", "<cmd>lua vim.lsp.diagnostic.goto_next()<CR>", opts)
|
||||
buf_set_keymap("n", "<space>q", "<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>", opts)
|
||||
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
|
||||
|
||||
end
|
||||
|
||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||
-- map buffer local keybindings when the language server attaches
|
||||
--local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
local servers = {
|
||||
"gopls", "bashls", "jedi_language_server", "dockerls", "terraformls",
|
||||
"tsserver", "texlab", "yamlls", "jsonls", "clangd", "sourcekit"
|
||||
}
|
||||
for _, lsp in ipairs(servers) do
|
||||
nvim_lsp[lsp].setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
gopls = {analyses = {unusedparams = false}, staticcheck = true},
|
||||
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
|
||||
}
|
||||
119
nvim/lua/plugin-config/lualine.lua
Normal file
119
nvim/lua/plugin-config/lualine.lua
Normal file
@@ -0,0 +1,119 @@
|
||||
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
|
||||
|
||||
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 = {},
|
||||
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
|
||||
}
|
||||
25
nvim/lua/plugin-config/mason.lua
Normal file
25
nvim/lua/plugin-config/mason.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
return {
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
"onsails/lspkind-nvim",
|
||||
"famiu/bufdelete.nvim",
|
||||
"ray-x/lsp_signature.nvim",
|
||||
"neovim/nvim-lspconfig"
|
||||
},
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"bashls",
|
||||
"clangd",
|
||||
"dockerls",
|
||||
"gopls",
|
||||
"jsonls",
|
||||
"jedi_language_server",
|
||||
"lua_ls",
|
||||
"terraformls",
|
||||
"tsserver",
|
||||
"texlab",
|
||||
"yamlls",
|
||||
}
|
||||
}
|
||||
}
|
||||
16
nvim/lua/plugin-config/neo-tree.lua
Normal file
16
nvim/lua/plugin-config/neo-tree.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
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",
|
||||
},
|
||||
config = function()
|
||||
require("neo-tree").setup({
|
||||
close_if_last_window = false,
|
||||
enable_git_status = true,
|
||||
enable_diagnostics = true
|
||||
})
|
||||
end
|
||||
}
|
||||
38
nvim/lua/plugin-config/neogit.lua
Normal file
38
nvim/lua/plugin-config/neogit.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
return {
|
||||
"TimUntersberger/neogit",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-telescope/telescope.nvim", -- optional
|
||||
"sindrets/diffview.nvim", -- optional
|
||||
},
|
||||
opts = {
|
||||
disable_signs = false,
|
||||
disable_context_highlighting = false,
|
||||
disable_commit_confirmation = true,
|
||||
-- customize displayed signs
|
||||
signs = {
|
||||
-- { CLOSED, OPENED }
|
||||
section = { ">", "v" },
|
||||
item = { ">", "v" },
|
||||
hunk = { "", "" },
|
||||
},
|
||||
integrations = {
|
||||
diffview = true
|
||||
},
|
||||
-- override/add mappings
|
||||
mappings = {
|
||||
-- modify status buffer mappings
|
||||
status = {
|
||||
-- Adds a mapping with "B" as key that does the "BranchPopup" command
|
||||
["B"] = "BranchPopup",
|
||||
["C"] = "CommitPopup",
|
||||
-- ["P"] = "PullPopup",
|
||||
["S"] = "Stage",
|
||||
-- ["D"] = "Discard",
|
||||
-- Removes the default mapping of "s"
|
||||
-- ["s"] = "",
|
||||
}
|
||||
}
|
||||
},
|
||||
cmd = "Neogit",
|
||||
}
|
||||
29
nvim/lua/plugin-config/nightfox.lua
Normal file
29
nvim/lua/plugin-config/nightfox.lua
Normal file
@@ -0,0 +1,29 @@
|
||||
return {
|
||||
'EdenEast/nightfox.nvim',
|
||||
lazy = false, -- make sure we load this during startup
|
||||
priority = 1000, -- make sure to load this before all other plugins.
|
||||
opts = {
|
||||
fox = "terafox", -- change the colorscheme to use terafox
|
||||
styles = {
|
||||
comments = "italic", -- change style of comments to be italic
|
||||
keywords = "bold", -- change style of keywords to be bold
|
||||
functions = "italic,bold" -- styles can be a comma separated list
|
||||
},
|
||||
inverse = {
|
||||
match_paren = true, -- inverse the highlighting of match_parens
|
||||
},
|
||||
colors = {
|
||||
red = "#FF000", -- Override the red color for MAX POWER
|
||||
--bg_alt = "#000000",
|
||||
},
|
||||
hlgroups = {
|
||||
TSPunctDelimiter = { fg = "${red}" }, -- Override a highlight group with the color red
|
||||
LspCodeLens = { bg = "#000000", style = "italic" },
|
||||
}
|
||||
|
||||
},
|
||||
config = function()
|
||||
require('nightfox').load()
|
||||
vim.cmd("colorscheme terafox")
|
||||
end
|
||||
}
|
||||
78
nvim/lua/plugin-config/telescope.lua
Normal file
78
nvim/lua/plugin-config/telescope.lua
Normal file
@@ -0,0 +1,78 @@
|
||||
return {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
branch = '0.1.x',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim'
|
||||
},
|
||||
config = function()
|
||||
local actions = require('telescope.actions')
|
||||
|
||||
require('telescope').setup({
|
||||
defaults = {
|
||||
file_ignore_patterns = {"node_modules", "%.jpg", "%.png"},
|
||||
vimgrep_arguments = {
|
||||
'rg',
|
||||
'--follow',
|
||||
'--color=never',
|
||||
'--no-heading',
|
||||
'--with-filename',
|
||||
'--line-number',
|
||||
'--column',
|
||||
'--smart-case'
|
||||
},
|
||||
mappings = {
|
||||
i = {
|
||||
-- Close on first esc instead of gonig to normal mode
|
||||
["<esc>"] = actions.close,
|
||||
["<A-q>"] = actions.send_selected_to_qflist,
|
||||
["<C-q>"] = actions.send_to_qflist,
|
||||
["<s-tab>"] = actions.toggle_selection + actions.move_selection_next,
|
||||
["<tab>"] = actions.toggle_selection + actions.move_selection_previous,
|
||||
},
|
||||
n = {
|
||||
["<s-tab>"] = actions.toggle_selection + actions.move_selection_next,
|
||||
["<tab>"] = actions.toggle_selection + actions.move_selection_previous,
|
||||
["<A-q>"] = actions.send_selected_to_qflist,
|
||||
["<C-q>"] = actions.send_to_qflist,
|
||||
},
|
||||
},
|
||||
prompt_prefix = " ",
|
||||
selection_caret = " ",
|
||||
entry_prefix = " ",
|
||||
initial_mode = "insert",
|
||||
selection_strategy = "reset",
|
||||
sorting_strategy = "descending",
|
||||
layout_strategy = "flex",
|
||||
layout_config = {
|
||||
width = 0.75,
|
||||
prompt_position = "bottom",
|
||||
preview_cutoff = 120,
|
||||
horizontal = { mirror = false },
|
||||
vertical = { mirror = true },
|
||||
},
|
||||
file_sorter = require'telescope.sorters'.get_fuzzy_file,
|
||||
generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter,
|
||||
-- path_display = true, -- strange behaviour not showing the files in result window
|
||||
winblend = 0,
|
||||
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
|
||||
buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker
|
||||
}
|
||||
})
|
||||
|
||||
local builtin = require('telescope.builtin')
|
||||
-- Telescope keymaps
|
||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
|
||||
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
|
||||
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
|
||||
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
|
||||
end
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
-- Setup nvim-cmp.
|
||||
local cmp = require "cmp"
|
||||
local lspkind = require("lspkind")
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
local has_words_before = function()
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
@@ -14,6 +15,11 @@ local feedkey = function(key, mode)
|
||||
mode, true)
|
||||
end
|
||||
|
||||
|
||||
require'lspconfig'.sourcekit.setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
|
||||
lspkind.init({
|
||||
symbol_map = {
|
||||
Text = "",
|
||||
@@ -1,3 +1,5 @@
|
||||
require("mason").setup()
|
||||
require("mason-lspconfig").setup()
|
||||
local nvim_lsp = require("lspconfig")
|
||||
|
||||
-- Use an on_attach function to only map the following keys
|
||||
@@ -15,6 +17,7 @@ local on_attach = function(bufnr)
|
||||
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)
|
||||
buf_set_keymap("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", 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)
|
||||
buf_set_keymap("n", "<space>wa",
|
||||
"<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>", opts)
|
||||
@@ -29,28 +32,23 @@ local on_attach = function(bufnr)
|
||||
buf_set_keymap("n", "<space>ca", "<cmd>lua vim.lsp.buf.code_action()<CR>",
|
||||
opts)
|
||||
buf_set_keymap("n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
|
||||
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)
|
||||
buf_set_keymap("n", "]d", "<cmd>lua vim.lsp.diagnostic.goto_next()<CR>",
|
||||
opts)
|
||||
buf_set_keymap("n", "<space>q",
|
||||
"<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>", opts)
|
||||
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.formatting()<CR>",
|
||||
opts)
|
||||
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)
|
||||
|
||||
buf_set_keymap("n", "]d", "<cmd>lua vim.lsp.diagnostic.goto_next()<CR>", opts)
|
||||
buf_set_keymap("n", "<space>q", "<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>", opts)
|
||||
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
|
||||
|
||||
end
|
||||
|
||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||
-- map buffer local keybindings when the language server attaches
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require("cmp_nvim_lsp").update_capabilities(capabilities)
|
||||
--local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
local servers = {
|
||||
"gopls", "bashls", "jedi_language_server", "dockerls", "terraformls",
|
||||
"tsserver", "texlab", "yamlls", "jsonls"
|
||||
"tsserver", "texlab", "yamlls", "jsonls", "clangd", "sourcekit"
|
||||
}
|
||||
for _, lsp in ipairs(servers) do
|
||||
nvim_lsp[lsp].setup {
|
||||
@@ -147,52 +145,6 @@ for _, lsp in ipairs(servers) do
|
||||
})
|
||||
end
|
||||
|
||||
local sumneko_root_path = os.getenv("HOME") .. ".cache/lua-language-server"
|
||||
local sumneko_binary = "/usr/bin/lua-language-server"
|
||||
require"lspconfig".sumneko_lua.setup {
|
||||
cmd = {sumneko_binary, "-E", sumneko_root_path .. "/main.lua"},
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {version = "LuaJIT", path = vim.split(package.path, ";")},
|
||||
completion = {enable = true, callSnippet = "Both"},
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
globals = {"vim", "describe"},
|
||||
disable = {"lowercase-global"}
|
||||
},
|
||||
workspace = {
|
||||
library = {
|
||||
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
|
||||
[vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true,
|
||||
[vim.fn.expand("/usr/share/awesome/lib")] = true
|
||||
},
|
||||
-- adjust these two values if your performance is not optimal
|
||||
maxPreload = 2000,
|
||||
preloadFileSize = 1000
|
||||
},
|
||||
telemetry = {enable = false}
|
||||
}
|
||||
}
|
||||
}
|
||||
-- alternative to formatter but yamlfix is not working and I need this for respecting yamllint config
|
||||
-- but yamlfix is messing up ansible files ... 😠
|
||||
-- require('lspconfig')['efm'].setup{
|
||||
-- filetypes = { 'json', 'yaml','lua' },
|
||||
-- init_options = {documentFormatting = true, codeAction = false},
|
||||
-- settings = {
|
||||
-- rootMarkers = {".git/"},
|
||||
-- languages = {
|
||||
-- lua = {
|
||||
-- {formatCommand = "lua-format -i", formatStdin = true}
|
||||
-- },
|
||||
-- yaml = {
|
||||
-- {formatCommand = "yamlfix -", formatStdin = true}
|
||||
-- },
|
||||
-- json = {
|
||||
-- {formatCommand = "prettier", formatStdin = true}
|
||||
-- }
|
||||
-- }
|
||||
-- }
|
||||
-- }
|
||||
-- Test source-kit
|
||||
require'lspconfig'.sourcekit.setup{}
|
||||
|
||||
@@ -3,7 +3,7 @@ local nightfox = require('nightfox')
|
||||
-- This function set the configuration of nightfox. If a value is not passed in the setup function
|
||||
-- it will be taken from the default configuration above
|
||||
nightfox.setup({
|
||||
fox = "nordfox", -- change the colorscheme to use nordfox
|
||||
fox = "terafox", -- change the colorscheme to use terafox
|
||||
styles = {
|
||||
comments = "italic", -- change style of comments to be italic
|
||||
keywords = "bold", -- change style of keywords to be bold
|
||||
@@ -14,7 +14,7 @@ nightfox.setup({
|
||||
},
|
||||
colors = {
|
||||
red = "#FF000", -- Override the red color for MAX POWER
|
||||
bg_alt = "#000000",
|
||||
--bg_alt = "#000000",
|
||||
},
|
||||
hlgroups = {
|
||||
TSPunctDelimiter = { fg = "${red}" }, -- Override a highlight group with the color red
|
||||
@@ -24,3 +24,4 @@ nightfox.setup({
|
||||
|
||||
-- Load the configuration set above and apply the colorscheme
|
||||
nightfox.load()
|
||||
vim.cmd("colorscheme terafox")
|
||||
@@ -32,18 +32,86 @@ g.nvim_tree_icons = {
|
||||
symlink = ""
|
||||
}
|
||||
}
|
||||
local tree_cb = require"nvim-tree.config".nvim_tree_callback
|
||||
g.loaded_netrw = 1
|
||||
g.loaded_netrwPlugin = 1
|
||||
local tree_cb = require("nvim-tree.config").nvim_tree_callback
|
||||
|
||||
-- This function has been generated from your
|
||||
-- view.mappings.list
|
||||
-- view.mappings.custom_only
|
||||
-- remove_keymaps
|
||||
--
|
||||
-- You should add this function to your configuration and set on_attach = on_attach in the nvim-tree setup call.
|
||||
--
|
||||
-- Although care was taken to ensure correctness and completeness, your review is required.
|
||||
--
|
||||
-- Please check for the following issues in auto generated content:
|
||||
-- "Mappings removed" is as you expect
|
||||
-- "Mappings migrated" are correct
|
||||
--
|
||||
-- Please see https://github.com/nvim-tree/nvim-tree.lua/wiki/Migrating-To-on_attach for assistance in migrating.
|
||||
--
|
||||
|
||||
local function on_attach(bufnr)
|
||||
local api = require('nvim-tree.api')
|
||||
|
||||
local function opts(desc)
|
||||
return { desc = 'nvim-tree: ' .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
|
||||
end
|
||||
|
||||
|
||||
-- Default mappings not inserted as:
|
||||
-- remove_keymaps = true
|
||||
-- OR
|
||||
-- view.mappings.custom_only = true
|
||||
|
||||
|
||||
-- Mappings migrated from view.mappings.list
|
||||
--
|
||||
-- You will need to insert "your code goes here" for any mappings with a custom action_cb
|
||||
vim.keymap.set('n', '<CR>', api.node.open.edit, opts('Open'))
|
||||
vim.keymap.set('n', 'o', api.node.open.edit, opts('Open'))
|
||||
vim.keymap.set('n', '<2-LeftMouse>', api.node.open.edit, opts('Open'))
|
||||
vim.keymap.set('n', '<2-RightMouse>', api.tree.change_root_to_node, opts('CD'))
|
||||
vim.keymap.set('n', '<C-]>', api.tree.change_root_to_node, opts('CD'))
|
||||
vim.keymap.set('n', '<C-v>', api.node.open.vertical, opts('Open: Vertical Split'))
|
||||
vim.keymap.set('n', '<C-s>', api.node.open.horizontal, opts('Open: Horizontal Split'))
|
||||
vim.keymap.set('n', '<C-t>', api.node.open.tab, opts('Open: New Tab'))
|
||||
vim.keymap.set('n', '<', api.node.navigate.sibling.prev, opts('Previous Sibling'))
|
||||
vim.keymap.set('n', '>', api.node.navigate.sibling.next, opts('Next Sibling'))
|
||||
vim.keymap.set('n', 'P', api.node.navigate.parent, opts('Parent Directory'))
|
||||
vim.keymap.set('n', '<BS>', api.node.navigate.parent_close, opts('Close Directory'))
|
||||
vim.keymap.set('n', '<S-CR>', api.node.navigate.parent_close, opts('Close Directory'))
|
||||
vim.keymap.set('n', '<Tab>', api.node.open.preview, opts('Open Preview'))
|
||||
vim.keymap.set('n', 'K', api.node.navigate.sibling.first, opts('First Sibling'))
|
||||
vim.keymap.set('n', 'J', api.node.navigate.sibling.last, opts('Last Sibling'))
|
||||
vim.keymap.set('n', 'H', api.tree.toggle_hidden_filter, opts('Toggle Dotfiles'))
|
||||
vim.keymap.set('n', 'R', api.tree.reload, opts('Refresh'))
|
||||
vim.keymap.set('n', 'a', api.fs.create, opts('Create'))
|
||||
vim.keymap.set('n', 'd', api.fs.remove, opts('Delete'))
|
||||
vim.keymap.set('n', 'r', api.fs.rename, opts('Rename'))
|
||||
vim.keymap.set('n', '<C-r>', api.fs.rename_sub, opts('Rename: Omit Filename'))
|
||||
vim.keymap.set('n', 'x', api.fs.cut, opts('Cut'))
|
||||
vim.keymap.set('n', 'c', api.fs.copy.node, opts('Copy'))
|
||||
vim.keymap.set('n', 'p', api.fs.paste, opts('Paste'))
|
||||
vim.keymap.set('n', 'y', api.fs.copy.filename, opts('Copy Name'))
|
||||
vim.keymap.set('n', 'Y', api.fs.copy.relative_path, opts('Copy Relative Path'))
|
||||
vim.keymap.set('n', 'gy', api.fs.copy.absolute_path, opts('Copy Absolute Path'))
|
||||
vim.keymap.set('n', '[c', api.node.navigate.git.prev, opts('Prev Git'))
|
||||
vim.keymap.set('n', ']c', api.node.navigate.git.next, opts('Next Git'))
|
||||
vim.keymap.set('n', '-', api.tree.change_root_to_parent, opts('Up'))
|
||||
vim.keymap.set('n', 's', api.node.run.system, opts('Run System'))
|
||||
vim.keymap.set('n', 'q', api.tree.close, opts('Close'))
|
||||
vim.keymap.set('n', 'g?', api.tree.toggle_help, opts('Help'))
|
||||
end
|
||||
|
||||
require("nvim-tree").setup {
|
||||
-- disables netrw completely
|
||||
disable_netrw = true,
|
||||
-- hijack netrw window on startup
|
||||
hijack_netrw = true,
|
||||
-- open the tree when running this setup function
|
||||
open_on_setup = false,
|
||||
-- will not open on setup if the filetype is in this list
|
||||
ignore_ft_on_setup = {},
|
||||
-- closes neovim automatically when the tree is the last **WINDOW** in the view
|
||||
auto_close = true,
|
||||
--auto_close = true,
|
||||
-- opens the tree when changing/opening a new tab if the tree wasn't previously opened
|
||||
open_on_tab = true,
|
||||
-- hijack the cursor in the tree to put it at the start of the filename
|
||||
@@ -51,11 +119,11 @@ require("nvim-tree").setup {
|
||||
-- updates the root directory of the tree on `DirChanged` (when your run `:cd` usually)
|
||||
update_cwd = true,
|
||||
-- this option hides files and folders starting with a dot `.`
|
||||
hide_dotfiles = true,
|
||||
--hide_dotfiles = true,
|
||||
-- show lsp diagnostics in the signcolumn
|
||||
diagnostics = {
|
||||
enabled = true,
|
||||
icon = {hint = "", info = "", warning = "", error = ""}
|
||||
enable = true,
|
||||
icons = {hint = "", info = "", warning = "", error = ""}
|
||||
},
|
||||
git = {ignore = true},
|
||||
-- update the focused file on `BufEnter`, un-collapses the folders recursively until it finds the file
|
||||
@@ -88,46 +156,7 @@ require("nvim-tree").setup {
|
||||
-- side of the tree, can be one of 'left' | 'right' | 'top' | 'bottom'
|
||||
side = "left",
|
||||
-- if true the tree will resize itself after opening a file
|
||||
auto_resize = true,
|
||||
mappings = {
|
||||
-- custom only false will merge the list with the default mappings
|
||||
-- if true, it will only use your list to set the mappings
|
||||
custom_only = true,
|
||||
-- list of mappings to set on the tree manually
|
||||
list = {
|
||||
{key = {"<CR>", "o", "<2-LeftMouse>"}, cb = tree_cb("edit")},
|
||||
{key = {"<2-RightMouse>", "<C-]>"}, cb = tree_cb("cd")},
|
||||
{key = "<C-v>", cb = tree_cb("vsplit")},
|
||||
{key = "<C-x>", cb = tree_cb("split")},
|
||||
{key = "<C-t>", cb = tree_cb("tabnew")},
|
||||
{key = "<", cb = tree_cb("prev_sibling")},
|
||||
{key = ">", cb = tree_cb("next_sibling")},
|
||||
{key = "P", cb = tree_cb("parent_node")},
|
||||
{key = "<BS>", cb = tree_cb("close_node")},
|
||||
{key = "<S-CR>", cb = tree_cb("close_node")},
|
||||
{key = "<Tab>", cb = tree_cb("preview")},
|
||||
{key = "K", cb = tree_cb("first_sibling")},
|
||||
{key = "J", cb = tree_cb("last_sibling")},
|
||||
{key = "I", cb = tree_cb("toggle_ignored")},
|
||||
{key = "H", cb = tree_cb("toggle_dotfiles")},
|
||||
{key = "R", cb = tree_cb("refresh")},
|
||||
{key = "a", cb = tree_cb("create")},
|
||||
{key = "d", cb = tree_cb("remove")},
|
||||
{key = "r", cb = tree_cb("rename")},
|
||||
{key = "<C-r>", cb = tree_cb("full_rename")},
|
||||
{key = "x", cb = tree_cb("cut")},
|
||||
{key = "c", cb = tree_cb("copy")},
|
||||
{key = "p", cb = tree_cb("paste")},
|
||||
{key = "y", cb = tree_cb("copy_name")},
|
||||
{key = "Y", cb = tree_cb("copy_path")},
|
||||
{key = "gy", cb = tree_cb("copy_absolute_path")},
|
||||
{key = "[c", cb = tree_cb("prev_git_item")},
|
||||
{key = "]c", cb = tree_cb("next_git_item")},
|
||||
{key = "-", cb = tree_cb("dir_up")},
|
||||
{key = "s", cb = tree_cb("system_open")},
|
||||
{key = "q", cb = tree_cb("close")},
|
||||
{key = "g?", cb = tree_cb("toggle_help")}
|
||||
}
|
||||
}
|
||||
}
|
||||
--auto_resize = true,
|
||||
},
|
||||
on_attach = on_attach
|
||||
}
|
||||
@@ -2,6 +2,7 @@ local actions = require('telescope.actions')
|
||||
local telescope = require('telescope')
|
||||
|
||||
--telescope.load_extension('projects')
|
||||
telescope.load_extension('fzf')
|
||||
|
||||
telescope.setup{
|
||||
defaults = {
|
||||
@@ -93,7 +93,8 @@ wk.register({
|
||||
g = {
|
||||
name = "Git",
|
||||
c = { "<cmd>Neogit Commit<cr>", "Git Commit" },
|
||||
g = { "<cmd>Neogit<cr>", "Open NeoGit" }
|
||||
g = { "<cmd>Neogit<cr>", "Open NeoGit" },
|
||||
p = { "<cmd> Neogit Push<cr>" }
|
||||
},
|
||||
f = {
|
||||
name = "File",
|
||||
69
nvim/lua/plugin-config/treesitter.lua
Normal file
69
nvim/lua/plugin-config/treesitter.lua
Normal file
@@ -0,0 +1,69 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
dependencies = {
|
||||
'nvim-telescope/telescope-fzf-native.nvim',
|
||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||
},
|
||||
config = function()
|
||||
require('nvim-treesitter.configs').setup {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"cmake",
|
||||
"dockerfile",
|
||||
"go",
|
||||
"hcl",
|
||||
"html",
|
||||
"java",
|
||||
"javascript",
|
||||
"json",
|
||||
"latex",
|
||||
"ledger",
|
||||
"lua",
|
||||
"python",
|
||||
"toml",
|
||||
"yaml"
|
||||
}, -- one of "all", "maintained" (parsers with maintainers), or a list of languages
|
||||
ignore_install = {}, -- List of parsers to ignore installing
|
||||
highlight = {
|
||||
enable = true, -- false will disable the whole extension
|
||||
disable = {} -- list of language that will be disabled
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<CR>",
|
||||
scope_incremental = "<CR>",
|
||||
node_incremental = "<TAB>",
|
||||
node_decremental = "<S-TAB>"
|
||||
}
|
||||
},
|
||||
indent = {enable = true},
|
||||
autopairs = {{enable = true}},
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
-- Automatically jump forward to textobj, similar to targets.vim
|
||||
lookahead = true,
|
||||
keymaps = {
|
||||
-- You can use the capture groups defined in textobjects.scm
|
||||
["af"] = "@function.outer",
|
||||
["if"] = "@function.inner",
|
||||
["ac"] = "@class.outer",
|
||||
["ic"] = "@class.inner",
|
||||
["al"] = "@loop.outer",
|
||||
["il"] = "@loop.inner",
|
||||
["ib"] = "@block.inner",
|
||||
["ab"] = "@block.outer",
|
||||
["ir"] = "@parameter.inner",
|
||||
["ar"] = "@parameter.outer"
|
||||
}
|
||||
}
|
||||
},
|
||||
rainbow = {
|
||||
enable = true,
|
||||
extended_mode = true, -- Highlight also non-parentheses delimiters, boolean or table: lang -> boolean
|
||||
max_file_lines = 2000 -- Do not enable for files with more than specified lines
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
8
nvim/lua/plugin-config/which-key.lua
Normal file
8
nvim/lua/plugin-config/which-key.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
init = function()
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 300
|
||||
end,
|
||||
}
|
||||
18
nvim/lua/plugins.lua
Normal file
18
nvim/lua/plugins.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
-- Plugins
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
|
||||
require("lazy").setup('plugin-config')
|
||||
@@ -2,16 +2,14 @@ local o = vim.opt
|
||||
local wo = vim.wo
|
||||
local fn = vim.fn
|
||||
|
||||
vim.cmd "filetype indent plugin on"
|
||||
vim.cmd "set inccommand=split"
|
||||
-- o.guicursor = "n-v-c:block,i-ci-ve:ver25,r-cr:hor20,o:hor50" -- block in normal and beam cursor in insert mode
|
||||
vim.cmd.set('inccommand=split')
|
||||
o.updatetime = 300 -- faster completion
|
||||
o.timeoutlen = 400 -- time to wait for a mapped sequence to complete (in milliseconds)
|
||||
o.ttimeoutlen = 0 -- Time in milliseconds to wait for a key code sequence to complete
|
||||
o.backup = false -- creates a backup file
|
||||
o.swapfile = true -- enable/disable swap file creation
|
||||
o.swapfile = false -- enable/disable swap file creation
|
||||
o.dir = fn.stdpath("data") .. "/swp" -- swap file directory
|
||||
o.undofile = true -- enable/disable undo file creation
|
||||
o.undofile = false -- enable/disable undo file creation
|
||||
o.undodir = fn.stdpath("data") .. "/undodir" -- set undo directory
|
||||
o.history = 500 -- Use the 'history' option to set the number of lines from command mode that are remembered.
|
||||
o.hidden = true -- required to keep multiple buffers and open multiple buffers
|
||||
@@ -28,16 +26,18 @@ o.smartcase = true -- smart case
|
||||
o.smartindent = true -- make indenting smarter again
|
||||
o.splitbelow = true -- force all horizontal splits to go below current window
|
||||
o.splitright = true -- force all vertical splits to go to the right of current window
|
||||
o.autoindent = true -- turn on auto indent.
|
||||
o.expandtab = true -- convert tabs to spaces
|
||||
o.smarttab = true -- turn on smart tab
|
||||
o.shiftwidth = 2 -- the number of spaces inserted for each indentation
|
||||
o.tabstop = 2 -- how many columns a tab counts for
|
||||
o.termguicolors = true -- set term gui colors (most terminals support this)
|
||||
o.cursorline = true -- highlight the current line
|
||||
o.scrolloff = 3 -- Minimal number of screen lines to keep above and below the cursor
|
||||
o.scrolloff = 8 -- Minimal number of screen lines to keep above and below the cursor
|
||||
o.sidescrolloff = 5 -- The minimal number of columns to scroll horizontally
|
||||
o.hlsearch = true -- highlight all matches on previous search pattern
|
||||
o.ignorecase = true -- ignore case in search patterns
|
||||
o.foldenable = true -- disable folding; enable with zi
|
||||
o.foldenable = false -- disable folding; enable with zi
|
||||
o.foldmethod = "expr"
|
||||
o.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
-- o.listchars = "eol:¬,tab:>·,trail:~,extends:>,precedes:<"
|
||||
5
nvim/lua/theme.lua
Normal file
5
nvim/lua/theme.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
-- Nightfox
|
||||
require('nightfox').load('terafox')
|
||||
--require('nightfox').load('terafox')
|
||||
--vim.cmd("colorscheme nightfox")
|
||||
|
||||
4
scripts/install-brew.sh
Executable file
4
scripts/install-brew.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#/bin/bash
|
||||
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
chmod -R go-w "$(/opt/homebrew/bin/brew --prefix)"
|
||||
22
scripts/install_launch_agents
Executable file
22
scripts/install_launch_agents
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# Installs launchd agents.
|
||||
|
||||
agent_dir="${HOME}/Library/LaunchAgents"
|
||||
uid="$(id -u "$(whoami)")"
|
||||
|
||||
mkdir -p "$agent_dir"
|
||||
|
||||
for file in "${DOTFILES}"/macOS/LaunchAgents/*.plist; do
|
||||
# get just the base file name, similar to using `basename` but w/o a subshell
|
||||
filename="${file##*/}"
|
||||
path="${agent_dir}/${filename}"
|
||||
echo "$filename"
|
||||
if ! test -e "${path}"; then
|
||||
echo "Installing Agent: ${filename}"
|
||||
cp "${file}" "${path}"
|
||||
launchctl enable "user/${uid}/${filename}"
|
||||
fi
|
||||
done
|
||||
12
scripts/scripts/allfigl
Executable file
12
scripts/scripts/allfigl
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
font_dir="$(brew --prefix)/share/figlet/fonts"
|
||||
|
||||
for font in "${font_dir}"/*.flf; do
|
||||
clear
|
||||
echo "FONT: $font"
|
||||
figlet -f "${font}" hello
|
||||
read -r line
|
||||
done
|
||||
8
scripts/scripts/banner
Executable file
8
scripts/scripts/banner
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
message="${1:-m-housh}"
|
||||
font="${2:-puffy}"
|
||||
|
||||
echo "${message}" | figlet -c -f "${font}"
|
||||
4
scripts/scripts/chmox
Executable file
4
scripts/scripts/chmox
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
# makes files executable
|
||||
test -f "$1" && chmod +x "$1"
|
||||
9
scripts/scripts/clean-derived-data
Executable file
9
scripts/scripts/clean-derived-data
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$(uname -n)" = "Michaels-Mac-mini.local" ]; then
|
||||
echo "Removing derived data folders"
|
||||
rm -r /Volumes/Bucket/Library/Developer/Xcode/DerivedData
|
||||
else
|
||||
echo "Removing derived data folders"
|
||||
rm -r ~/Library/Developer/Xcode/DerivedData/*
|
||||
fi
|
||||
5
scripts/scripts/clean_screenshots
Executable file
5
scripts/scripts/clean_screenshots
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
for file in "$SCREENSHOTS"/*; do
|
||||
rm "$file"
|
||||
done
|
||||
8
scripts/scripts/cmt
Executable file
8
scripts/scripts/cmt
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# adapted from...
|
||||
# https://github.com/rwxrob/dot/blob/main/scripts/cmt
|
||||
|
||||
while IFS= read -r line; do
|
||||
echo "${1:-#} $line"
|
||||
done
|
||||
17
scripts/scripts/dmg
Executable file
17
scripts/scripts/dmg
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Creates an encrypted disk image from a folder
|
||||
|
||||
set -e
|
||||
|
||||
from="$1"
|
||||
to="$2"
|
||||
|
||||
if [ -z "$1" ] || [ -z "$2" ]; then
|
||||
echo "Usage: dmg <fromdir> <todir>"
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
name="$(isosec).dmg"
|
||||
hdiutil create -encryption AES-256 -srcfolder "$from" "$to/$name"
|
||||
5
scripts/scripts/duck
Executable file
5
scripts/scripts/duck
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
url="https://lite.duckduckgo.com/lite?kd=1&kp=1&q=$(urlencode "$*")"
|
||||
|
||||
exec lynx -vikeys "$url"
|
||||
16
scripts/scripts/figl
Executable file
16
scripts/scripts/figl
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Create a new figlet (ascii art) from the input.
|
||||
|
||||
figl() {
|
||||
font=${FIGL_FONT:-puffy}
|
||||
declare -a buf
|
||||
while IFS= read -r line; do
|
||||
buf+=("$line")
|
||||
done
|
||||
for line in "${buf[@]}"; do
|
||||
figlet -f "$font" -c "${line}" | head -6
|
||||
done
|
||||
}
|
||||
|
||||
figl "$*"
|
||||
11
scripts/scripts/haasd
Executable file
11
scripts/scripts/haasd
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Creates a new `zet` inside the $HAAS/documents repository
|
||||
|
||||
_main() {
|
||||
(ZETDIR="$HAAS/documents" eval zet "$@")
|
||||
}
|
||||
|
||||
_main "$@"
|
||||
11
scripts/scripts/haasp
Executable file
11
scripts/scripts/haasp
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Creates a new `zet` inside the House Call Pro `Zettlekasten`
|
||||
|
||||
_main() {
|
||||
(ZETDIR="$HAAS/processes" eval zet "$@")
|
||||
}
|
||||
|
||||
_main "$@"
|
||||
12
scripts/scripts/haasz
Executable file
12
scripts/scripts/haasz
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# Uses the `zet` command setting the directory to the
|
||||
# Housh As A System zet repository.
|
||||
|
||||
main() {
|
||||
(ZETDIR="$HAASZET" eval zet "$@")
|
||||
}
|
||||
|
||||
main "$@"
|
||||
11
scripts/scripts/hcpn
Executable file
11
scripts/scripts/hcpn
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Creates a new `zet` inside the House Call Pro `Zettlekasten`
|
||||
|
||||
_main() {
|
||||
(ZETDIR="$HCP_NOTES" eval zet "$@")
|
||||
}
|
||||
|
||||
_main "$@"
|
||||
11
scripts/scripts/hxzet
Executable file
11
scripts/scripts/hxzet
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Creates a new `zet` inside the House Call Pro `Zettlekasten`
|
||||
|
||||
_main() {
|
||||
(ZETDIR="$HXZET" eval zet "$@")
|
||||
}
|
||||
|
||||
_main "$@"
|
||||
9
scripts/scripts/isosec
Executable file
9
scripts/scripts/isosec
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
isosec() {
|
||||
echo "$(date -u '+%Y%m%d%H%M%S')"
|
||||
}
|
||||
|
||||
isosec
|
||||
5
scripts/scripts/l
Executable file
5
scripts/scripts/l
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Lists files and directories, including hidden files.
|
||||
|
||||
ls -lah --color "$@"
|
||||
58
scripts/scripts/link_apps
Executable file
58
scripts/scripts/link_apps
Executable file
@@ -0,0 +1,58 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Creates symlinks from external application directory
|
||||
# to another directory so applications are seen in
|
||||
# spotlight searches and launchpad.
|
||||
|
||||
set -e
|
||||
|
||||
app_dir=""
|
||||
destination_dir=""
|
||||
|
||||
# Parses the input arguments. If 2 arguments are passed in, then
|
||||
# the first is where we search for applications (source) and the second
|
||||
# argument is the destination directory for the symlinks to be placed in
|
||||
#
|
||||
# If one argument is passed in, then it is used as the destination directory
|
||||
# and we use the default source directory.
|
||||
_parse_args() {
|
||||
arg_count="$#"
|
||||
app_dir="/Volumes/M1 Mac-Mini External Drive/Applications"
|
||||
destination_dir="${HOME}/Application"
|
||||
if test "$arg_count" -eq 1; then
|
||||
destination_dir="$1"
|
||||
elif test "$arg_count" -eq 2; then
|
||||
app_dir="$1"
|
||||
destination_dir="$2"
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if the `app_dir` exists.
|
||||
_is_mounted() {
|
||||
if ! test -d "$app_dir"; then
|
||||
echo "Application directory does not exist or is not mounted" >&2
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# ---------------- main -------------------
|
||||
|
||||
main() {
|
||||
|
||||
_parse_args "$@"
|
||||
test -d "${destination_dir}" || echo "Destination does not exist" >&2
|
||||
|
||||
if test _is_mounted; then
|
||||
for app in "${app_dir}"/*.app; do
|
||||
destination="${destination_dir}/$(basename "${app}")"
|
||||
if test -e "${destination}"; then
|
||||
echo "Destination already exists: ${destination}. Skipping!" >&2
|
||||
continue
|
||||
fi
|
||||
# remove echo to do real work.
|
||||
echo ln -sv "${app}" "${destination}" >&2
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
main "$@"
|
||||
12
scripts/scripts/mkcd
Executable file
12
scripts/scripts/mkcd
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Creates a directory then `cd`'s into the directory
|
||||
|
||||
set -e
|
||||
|
||||
dir="$1"
|
||||
|
||||
test -n "${dir}" || echo "usage: mkcd <dir>" && exit 1
|
||||
|
||||
mkdir "${dir}"
|
||||
cd "${dir}"
|
||||
11
scripts/scripts/ncis
Executable file
11
scripts/scripts/ncis
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Creates a new `zet` inside the House Call Pro `Zettlekasten`
|
||||
|
||||
_main() {
|
||||
(ZETDIR="$HOME/Documents/NCISummit" eval zet "$@")
|
||||
}
|
||||
|
||||
_main "$@"
|
||||
26
scripts/scripts/newx
Executable file
26
scripts/scripts/newx
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Creates a new executable file in the $SCRIPTS directory.
|
||||
|
||||
# check if the scripts path / environment variable is set
|
||||
test ! -n "${SCRIPTS}" && echo "SCRIPTS not set" && exit 1;
|
||||
|
||||
# fallback to check if the name arg ${1} exists, if not show usage text.
|
||||
test ! -n "${1}" && \
|
||||
echo "usage: newscript <name> <optional: shell>" && \
|
||||
echo "shell defaults to sh if not supplied" && \
|
||||
exit 1;
|
||||
|
||||
path="${SCRIPTS}/${1}"
|
||||
shell="${2:-sh}"
|
||||
|
||||
if [ -e "${path}" ]; then
|
||||
echo "Already exists try:"
|
||||
echo "vi ${path}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printf "#!/bin/%s\n\n" "${shell}" > "${path}"
|
||||
chmod +x "${path}"
|
||||
exec vim +2 "${path}"
|
||||
|
||||
2
scripts/scripts/path
Executable file
2
scripts/scripts/path
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/zsh
|
||||
echo -e ${PATH//:/\\n}
|
||||
4
scripts/scripts/proposals
Executable file
4
scripts/scripts/proposals
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/zsh
|
||||
|
||||
# Move into the proposals directory
|
||||
cd "$HOME/Library/Mobile Documents/com~apple~CloudDocs/Work/Proposals"
|
||||
11
scripts/scripts/pzet
Executable file
11
scripts/scripts/pzet
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Creates a new `zet` inside the House Call Pro `Zettlekasten`
|
||||
|
||||
_main() {
|
||||
(ZETDIR="$GHREPOS/private-zets" eval zet "$@")
|
||||
}
|
||||
|
||||
_main "$@"
|
||||
57
scripts/scripts/termcolors
Executable file
57
scripts/scripts/termcolors
Executable file
@@ -0,0 +1,57 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Prints the terminal theme regular colors (and some other escapes). For
|
||||
# "bright/bold" variation add 1; in front of the number. Useful for
|
||||
# sampling and remembering the escapes when hardcoding them into scripts
|
||||
# for portability. Keep in mind that the color names are those given for
|
||||
# the original color terminal and obviously can vary widely. For color
|
||||
# intensive output consider shortening the names to their first letter
|
||||
# instead and don't forget to wrap them within ${}. Omits (and overrides
|
||||
# any inherited) colors when not interactive/piped.
|
||||
|
||||
black=""
|
||||
red=""
|
||||
green=""
|
||||
yellow=""
|
||||
blue=""
|
||||
magenta=""
|
||||
cyan=""
|
||||
white=""
|
||||
blink=""
|
||||
reset=""
|
||||
|
||||
if test -t 1; then
|
||||
black="\e[30m"
|
||||
red="\e[31m"
|
||||
green="\e[32m"
|
||||
yellow="\e[33m"
|
||||
blue="\e[34m"
|
||||
magenta="\e[35m"
|
||||
cyan="\e[36m"
|
||||
white="\e[37m"
|
||||
blink="\e[5m"
|
||||
reset="\e[0m"
|
||||
fi
|
||||
echo POSIX
|
||||
printf "${black}black=\"\\\e[30m\"
|
||||
${red}red=\"\\\e[31m\"
|
||||
${green}green=\"\\\e[32m\"
|
||||
${yellow}yellow=\"\\\e[33m\"
|
||||
${blue}blue=\"\\\e[34m\"
|
||||
${magenta}magenta=\"\\\e[35m\"
|
||||
${cyan}cyan=\"\\\e[36m\"
|
||||
${white}white=\"\\\e[37m\"
|
||||
reset=\"\\\e[0m\"
|
||||
"
|
||||
echo
|
||||
echo BASH:
|
||||
printf "${black}black=$'\\\e[30m'
|
||||
${red}red=$'\\\e[31m'
|
||||
${green}green=$'\\\e[32m'
|
||||
${yellow}yellow=$'\\\e[33m'
|
||||
${blue}blue=$'\\\e[34m'
|
||||
${magenta}magenta=$'\\\e[35m'
|
||||
${cyan}cyan=$'\\\e[36m'
|
||||
${white}white=$'\\\e[37m'
|
||||
reset=$'\\\e[0m'
|
||||
"
|
||||
8
scripts/scripts/uncmt
Executable file
8
scripts/scripts/uncmt
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# adapted from...
|
||||
# https://github.com/rwxrob/dot/blob/main/scripts/ucmt
|
||||
|
||||
while IFS= read -r line; do
|
||||
echo "${line#* }"
|
||||
done
|
||||
34
scripts/scripts/urlencode
Executable file
34
scripts/scripts/urlencode
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
# yeah, i totally stole this from stack exchange, no shame
|
||||
|
||||
rawurlencode() {
|
||||
local string="${1}"
|
||||
local strlen=${#string}
|
||||
local encoded=""
|
||||
local pos c o
|
||||
|
||||
for ((pos = 0; pos < strlen; pos++)); do
|
||||
c=${string:$pos:1}
|
||||
case "$c" in
|
||||
[-_.~a-zA-Z0-9]) o="${c}" ;;
|
||||
*) printf -v o '%%%02x' "'$c'" ;;
|
||||
esac
|
||||
encoded+="${o}"
|
||||
done
|
||||
echo "${encoded}" # You can either set a return variable (FASTER)
|
||||
REPLY="${encoded}" #+or echo the result (EASIER)... or both... :p
|
||||
}
|
||||
|
||||
if test -n "$1"; then
|
||||
rawurlencode "$*"
|
||||
exit
|
||||
fi
|
||||
|
||||
IFS=
|
||||
while read -r line; do
|
||||
rawurlencode "$line"
|
||||
done
|
||||
5
scripts/scripts/vic
Executable file
5
scripts/scripts/vic
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
# opens a shell command in vi
|
||||
cmd=$(command -v $1)
|
||||
test -n "$cmd" && vi "$cmd"
|
||||
103
scripts/setup_defaults
Executable file
103
scripts/setup_defaults
Executable file
@@ -0,0 +1,103 @@
|
||||
#!/bin/bash
|
||||
|
||||
# sets default settings for macOS
|
||||
|
||||
# change screen capture / screenshot location
|
||||
defaults write com.apple.screencapture location -string "$SCREENSHOTS"
|
||||
|
||||
# save screenshots in png format
|
||||
defaults write com.apple.screencapture type -string "png"
|
||||
|
||||
# Disable shadow in screenshots
|
||||
defaults write com.apple.screencapture disable-shadow -bool true
|
||||
|
||||
# Expand save panel by default
|
||||
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
|
||||
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
|
||||
|
||||
# Expand print panel by default
|
||||
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
|
||||
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true
|
||||
|
||||
# Disable the “Are you sure you want to open this application?” dialog
|
||||
defaults write com.apple.LaunchServices LSQuarantine -bool false
|
||||
|
||||
# Enable full keyboard access for all controls
|
||||
# (e.g. enable Tab in modal dialogs)
|
||||
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
|
||||
|
||||
# Set a blazingly fast keyboard repeat rate
|
||||
defaults write NSGlobalDomain KeyRepeat -int 1
|
||||
defaults write NSGlobalDomain InitialKeyRepeat -int 10
|
||||
|
||||
# Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons
|
||||
defaults write com.apple.finder QuitMenuItem -bool true
|
||||
|
||||
# Set Home as the default location for new Finder windows
|
||||
defaults write com.apple.finder NewWindowTarget -string "PfHm"
|
||||
defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/"
|
||||
|
||||
# Show icons for hard drives, servers, and removable media on the desktop
|
||||
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true
|
||||
defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true
|
||||
defaults write com.apple.finder ShowMountedServersOnDesktop -bool true
|
||||
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true
|
||||
|
||||
# Finder: show all filename extensions
|
||||
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
|
||||
|
||||
# Finder: show status bar
|
||||
defaults write com.apple.finder ShowStatusBar -bool true
|
||||
|
||||
# Finder: show path bar
|
||||
defaults write com.apple.finder ShowPathbar -bool true
|
||||
|
||||
# Display full POSIX path as Finder window title
|
||||
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
|
||||
|
||||
# Keep folders on top when sorting by name
|
||||
defaults write com.apple.finder _FXSortFoldersFirst -bool true
|
||||
|
||||
# When performing a search, search the current folder by default
|
||||
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
|
||||
|
||||
# Avoid creating .DS_Store files on network or USB volumes
|
||||
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
|
||||
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
|
||||
|
||||
# Use column view in all Finder windows by default
|
||||
# Four-letter codes for the other view modes: `icnv`, `Nlsv`, `glyv`
|
||||
defaults write com.apple.finder FXPreferredViewStyle -string "clmv"
|
||||
|
||||
# Disable the warning before emptying the Trash
|
||||
defaults write com.apple.finder WarnOnEmptyTrash -bool false
|
||||
|
||||
# Show the ~/Library folder
|
||||
#chflags nohidden ~/Library && xattr -d com.apple.FinderInfo ~/Library
|
||||
|
||||
# Copy email addresses as `foo@example.com` instead of `Foo Bar <foo@example.com>` in Mail.app
|
||||
defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false
|
||||
|
||||
# Only use UTF-8 in Terminal.app
|
||||
defaults write com.apple.terminal StringEncodings -array 4
|
||||
|
||||
# Enable Secure Keyboard Entry in Terminal.app
|
||||
# See: https://security.stackexchange.com/a/47786/8918
|
||||
defaults write com.apple.terminal SecureKeyboardEntry -bool true
|
||||
|
||||
# Prevent Time Machine from prompting to use new hard drives as backup volume
|
||||
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
|
||||
|
||||
# Disable local Time Machine backups
|
||||
# hash tmutil &> /dev/null && sudo tmutil disablelocal
|
||||
|
||||
# kill affected apps
|
||||
for app in "Main" \
|
||||
"Photos" \
|
||||
"Finder" \
|
||||
"SystemUIServer"; do
|
||||
killall "${app}" &> /dev/null
|
||||
done
|
||||
|
||||
echo "Done. Some changes require a restart to take effect."
|
||||
|
||||
83
tmux/.tmux.conf
Normal file
83
tmux/.tmux.conf
Normal file
@@ -0,0 +1,83 @@
|
||||
# Some tweaks to the status line
|
||||
set -g status-right "%H:%M"
|
||||
set -g window-status-current-style "underscore"
|
||||
|
||||
# If running inside tmux ($TMUX is set), then change the status line to red
|
||||
%if #{TMUX}
|
||||
set -g status-bg red
|
||||
%endif
|
||||
|
||||
# Enable RGB colour if running in xterm(1)
|
||||
set-option -sa terminal-overrides ",xterm*:Tc"
|
||||
|
||||
# Change the default $TERM to tmux-256color
|
||||
set -g default-terminal "xterm-256color"
|
||||
|
||||
# Change windows to start with an index of 1 instead of 0
|
||||
set -g base-index 1
|
||||
|
||||
# Change panes to start with an index of 1 instead of 0
|
||||
setw -g pane-base-index 1
|
||||
|
||||
# No bells at all
|
||||
set -g bell-action none
|
||||
|
||||
# Keep windows around after they exit
|
||||
set -g remain-on-exit on
|
||||
|
||||
# Set indexes to start at 1, instead of 0.
|
||||
set -g base-index 1
|
||||
|
||||
# Change the prefix key to C-a
|
||||
set -g prefix C-a
|
||||
unbind C-b
|
||||
bind C-a send-prefix
|
||||
|
||||
# Turn the mouse on, but without copy mode dragging
|
||||
set -g mouse on
|
||||
unbind -n MouseDrag1Pane
|
||||
unbind -Tcopy-mode MouseDrag1Pane
|
||||
|
||||
# A key to toggle between smallest and largest sizes if a window is visible in
|
||||
# multiple places
|
||||
bind F set -w window-size
|
||||
|
||||
# Keys to toggle monitoring activity in a window and the synchronize-panes option
|
||||
bind m set monitor-activity
|
||||
bind y set synchronize-panes\; display 'synchronize-panes #{?synchronize-panes,on,off}'
|
||||
|
||||
# Better split pane
|
||||
bind | splitw -h
|
||||
bind - splitw -v
|
||||
|
||||
# Use Alt-arrow keys to navigate panes
|
||||
bind -n M-Left select-pane -L
|
||||
bind -n M-Right select-pane -R
|
||||
bind -n M-Up select-pane -U
|
||||
bind -n M-Down select-pane -D
|
||||
bind -T prefix j select-pane -D
|
||||
bind -T prefix k select-pane -U
|
||||
bind -T prefix h select-pane -L
|
||||
bind -T prefix l select-pane -R
|
||||
|
||||
# Use Shift-arrow keys to navigate windows.
|
||||
bind -n S-Left previous-window
|
||||
bind -n S-Right next-window
|
||||
|
||||
|
||||
# reload new changes
|
||||
bind-key R source-file ~/.tmux.conf\; \display-message "source-file done"
|
||||
|
||||
|
||||
# Create a single default session - because a session is created here, tmux
|
||||
# should be started with "tmux attach" rather than "tmux new"
|
||||
#new -d -s0 -nirssi 'exec irssi'
|
||||
#set -t0:0 monitor-activity on
|
||||
#set -t0:0 aggressive-resize on
|
||||
#neww -d -ntodo 'exec emacs ~/TODO'
|
||||
#setw -t0:1 aggressive-resize on
|
||||
#neww -d -nmutt 'exec mutt'
|
||||
#setw -t0:2 aggressive-resize on
|
||||
#neww -d
|
||||
#neww -d
|
||||
#neww -d
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,43 +0,0 @@
|
||||
|
||||
" Settings:
|
||||
set tabstop=4 softtabstop=4
|
||||
set shiftwidth=4
|
||||
set expandtab
|
||||
set smartindent
|
||||
set exrc
|
||||
set relativenumber
|
||||
set nohlsearch
|
||||
set hidden
|
||||
set nu
|
||||
set nowrap
|
||||
set noswapfile
|
||||
set nobackup
|
||||
set undodir=~/.vim/undodir
|
||||
set undofile
|
||||
set incsearch
|
||||
set termguicolors
|
||||
set scrolloff=8
|
||||
set noshowmode
|
||||
set signcolumn=yes
|
||||
set colorcolumn=80
|
||||
set noerrorbells
|
||||
set number
|
||||
syntax enable
|
||||
set background=dark
|
||||
|
||||
let mapleader = " "
|
||||
|
||||
|
||||
fun! TrimWhiteSpace()
|
||||
let l:save = winsaveview()
|
||||
keeppatterns %s/\s\+$//e
|
||||
call winrestview(l:save)
|
||||
endfun
|
||||
|
||||
augroup MICHAEL
|
||||
autocmd!
|
||||
autocmd BufWritePre * :call TrimWhiteSpace()
|
||||
autocmd Filetype yaml setlocal ts=2 sts=2 sw=2 expandtab
|
||||
augroup END
|
||||
|
||||
|
||||
60
vim/.vimrc
60
vim/.vimrc
@@ -1,60 +0,0 @@
|
||||
|
||||
" Settings:
|
||||
set tabstop=4 softtabstop=4
|
||||
set shiftwidth=4
|
||||
set expandtab
|
||||
set smartindent
|
||||
set exrc
|
||||
set relativenumber
|
||||
set nohlsearch
|
||||
set hidden
|
||||
set nu
|
||||
set nowrap
|
||||
set noswapfile
|
||||
set nobackup
|
||||
set undodir=~/.vim/undodir
|
||||
set undofile
|
||||
set incsearch
|
||||
set termguicolors
|
||||
set scrolloff=8
|
||||
set noshowmode
|
||||
set signcolumn=yes
|
||||
set colorcolumn=80
|
||||
set noerrorbells
|
||||
set number
|
||||
syntax enable
|
||||
set background=dark
|
||||
|
||||
let mapleader = " "
|
||||
|
||||
" Install vim-plug if not found
|
||||
if empty(glob('~/.vim/autoload/plug.vim'))
|
||||
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
|
||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
endif
|
||||
|
||||
" Run PlugInstall if there are missing plugins
|
||||
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
|
||||
\| PlugInstall --sync | source $MYVIMRC
|
||||
\| endif
|
||||
|
||||
call plug#begin('~/.vim/plugged')
|
||||
" Plug 'morhetz/gruvbox'
|
||||
call plug#end()
|
||||
|
||||
|
||||
highlight Normal guibg=none
|
||||
|
||||
fun! TrimWhiteSpace()
|
||||
let l:save = winsaveview()
|
||||
keeppatterns %s/\s\+$//e
|
||||
call winrestview(l:save)
|
||||
endfun
|
||||
|
||||
augroup MICHAEL
|
||||
autocmd!
|
||||
autocmd BufWritePre * :call TrimWhiteSpace()
|
||||
autocmd Filetype yaml setlocal ts=2 sts=2 sw=2 expandtab
|
||||
augroup END
|
||||
|
||||
|
||||
99
vim/vimrc
Normal file
99
vim/vimrc
Normal file
@@ -0,0 +1,99 @@
|
||||
|
||||
" ----------------------- settings ----------------------------------
|
||||
set autoindent
|
||||
set autowrite " automatically write files when changing
|
||||
set background=dark
|
||||
set backspace=indent,eol,start
|
||||
set belloff=all
|
||||
set colorcolumn=80
|
||||
set expandtab " replace tabs with spaces automatically
|
||||
set exrc
|
||||
set foldmethod=manual
|
||||
set hidden
|
||||
set history=100 " command history
|
||||
set icon
|
||||
set incsearch
|
||||
set nobackup
|
||||
set nocompatible
|
||||
set nofixendofline
|
||||
set nohlsearch
|
||||
set noswapfile
|
||||
"set nowrap
|
||||
set number
|
||||
set relativenumber
|
||||
set ruler " turns on col and row in lower right
|
||||
" used with `set ruler`
|
||||
set ruf=%30(%=%#LineNr#%.50F\ [%{strlen(&ft)?&ft:'none'}]\ %l:%c\ %p%%%)
|
||||
set scrolloff=8
|
||||
set shiftwidth=2
|
||||
set showmode " show command and insert mode
|
||||
set signcolumn=no
|
||||
set smartindent
|
||||
set smarttab
|
||||
set softtabstop=2
|
||||
set tabstop=2
|
||||
set termguicolors
|
||||
set textwidth=72 " Used with line wrapping
|
||||
set ttyfast " faster scrolling
|
||||
set undodir=~/.vim/undodir
|
||||
set undofile
|
||||
set viminfo='20,<1000,s1000 " prevents truncated yanks, deletes, etc.
|
||||
set wildmenu
|
||||
set wrap
|
||||
|
||||
syntax enable
|
||||
filetype plugin on " sense the filesystem
|
||||
let mapleader = " "
|
||||
|
||||
" ----------------------- plugins ----------------------------------
|
||||
|
||||
" Install vim-plug if not found
|
||||
if empty(glob('~/.vim/autoload/plug.vim'))
|
||||
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
|
||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
endif
|
||||
|
||||
" Run PlugInstall if there are missing plugins
|
||||
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
|
||||
\| PlugInstall --sync | source $MYVIMRC
|
||||
\| endif
|
||||
|
||||
call plug#begin('~/.vim/plugged')
|
||||
Plug 'junegunn/fzf'
|
||||
Plug 'vim-pandoc/vim-pandoc'
|
||||
Plug 'rwxrob/vim-pandoc-syntax-simple'
|
||||
Plug 'morhetz/gruvbox'
|
||||
call plug#end()
|
||||
|
||||
colorscheme gruvbox
|
||||
" highlight Normal guibg=none
|
||||
|
||||
" ----------------------- utilities ----------------------------------
|
||||
|
||||
" fuzzy finder
|
||||
let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } }
|
||||
|
||||
" opens fuzzy finder under the current directory
|
||||
nmap <leader>ff :call fzf#run(fzf#wrap({ 'source': 'find "$PWD" -type f' }))<CR>
|
||||
" opens fuzzy finder for files under a git version control
|
||||
nmap <leader>fg :call fzf#run(fzf#wrap({ 'source': 'git ls-files' }))<CR>
|
||||
|
||||
|
||||
fun! TrimWhiteSpace()
|
||||
let l:save = winsaveview()
|
||||
keeppatterns %s/\s\+$//e
|
||||
call winrestview(l:save)
|
||||
endfun
|
||||
|
||||
augroup MICHAEL
|
||||
autocmd!
|
||||
autocmd BufWritePre * :call TrimWhiteSpace()
|
||||
autocmd Filetype yaml setlocal ts=2 sts=2 sw=2 expandtab
|
||||
autocmd Filetype markdown setlocal tw=79 fo+=t
|
||||
autocmd Filetype pandoc setlocal tw=79 fo+=t
|
||||
" format json when writing a buffer.
|
||||
autocmd BufWritePre *.json :silent %!jq
|
||||
augroup END
|
||||
|
||||
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
|
||||
setopt appendhistory
|
||||
setopt sharehistory
|
||||
setopt incappendhistory
|
||||
|
||||
|
||||
autoload -Uz compinit
|
||||
zstyle ':completion:*' menu select
|
||||
zmodload zsh/complist
|
||||
# compinit
|
||||
_comp_options+=(globdots) # Include hidden files.
|
||||
|
||||
autoload -U up-line-or-beginning-search
|
||||
autoload -U down-line-or-beginning-search
|
||||
zle -N up-line-or-beginning-search
|
||||
zle -N down-line-or-beginning-search
|
||||
|
||||
# Colors
|
||||
autoload -Uz colors && colors
|
||||
|
||||
# Load Useful Functions
|
||||
source "$ZDOTDIR/zsh-functions"
|
||||
|
||||
zsh_add_file "zsh-aliases"
|
||||
zsh_add_file "zsh-exports"
|
||||
|
||||
# Plugins
|
||||
zsh_add_plugin "zsh-users/zsh-autosuggestions"
|
||||
zsh_add_plugin "zsh-users/zsh-syntax-highlighting"
|
||||
zsh_add_plugin "sindresorhus/pure"
|
||||
|
||||
# Prompt
|
||||
fpath+="$ZDOTDIR/plugins/pure"
|
||||
autoload -U promptinit; promptinit
|
||||
prompt pure
|
||||
|
||||
cat < "$ZDOTDIR/banner"
|
||||
@@ -1,10 +0,0 @@
|
||||
|
||||
|
||||
_ _
|
||||
_ __ ___ | |__ ___ _ _ ___ | |__
|
||||
| '_ ` _ \ _____ | '_ \ / _ \ | | | |/ __|| '_ \
|
||||
| | | | | ||_____|| | | || (_) || |_| |\__ \| | | |
|
||||
|_| |_| |_| |_| |_| \___/ \__,_||___/|_| |_|
|
||||
|
||||
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
# configure aliases
|
||||
#alias zshconfig="$ZDOTDIR"
|
||||
alias zdots() { nvim "$ZDOTDIR" }
|
||||
alias dots() { nvim ~/.dotfiles }
|
||||
alias reload() { source "$ZDOTDIR/.zshrc" }
|
||||
alias banner() { clear && cat < "$ZDOTDIR/banner" }
|
||||
|
||||
alias mkcd() { mkdir $1 && cd $1 }
|
||||
alias l() { ls -lah "$@" }
|
||||
|
||||
# editor
|
||||
alias vim() { nvim "$@" }
|
||||
|
||||
# git
|
||||
alias g() { git "$@" }
|
||||
alias ga() { git add . }
|
||||
alias gcb() { git checkout -b "$@" }
|
||||
alias gco() { git checkout "$@" }
|
||||
alias gma() { git add . && git commit -m "$1" }
|
||||
alias gs() { git status }
|
||||
|
||||
# move back to old cwd
|
||||
alias bk() { cd "$OLDPWD" }
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
HISTSIZE=200
|
||||
HISTFILE=$ZDOTDIR/history
|
||||
|
||||
# shell
|
||||
export SHELL="$(which zsh)"
|
||||
|
||||
# Allow useful scripts in ~/.bin to be in the search path.
|
||||
export PATH=~/.bin:$PATH
|
||||
|
||||
# Add homebrew to the path
|
||||
if [ -d /opt/homebrew ]; then
|
||||
export PATH=/opt/homebrew/bin:$PATH
|
||||
export PATH=/opt/homebrew/sbin:$PATH
|
||||
fi
|
||||
|
||||
# zsh-completions installed by homebrew
|
||||
if type brew &>/dev/null; then
|
||||
FPATH=$(brew --prefix)/share/zsh-completions:$FPATH
|
||||
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
fi
|
||||
|
||||
export EDITOR="nvim"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user