mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-15 06:32:40 +00:00
Merged develop
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
**/.DS_Store
|
||||||
|
**/Brewfile.lock.json
|
||||||
7
.stow-local-ignore
Normal file
7
.stow-local-ignore
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
^/.DS_Store*
|
||||||
|
^/Brewfile*
|
||||||
|
^/README.*
|
||||||
|
^/LICENSE.*
|
||||||
|
|
||||||
|
\.git
|
||||||
|
\.gitignore
|
||||||
35
Makefile
35
Makefile
@@ -1,16 +1,33 @@
|
|||||||
install-brew:
|
bootstrap-homebrew:
|
||||||
|
xcode-select --install | true
|
||||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||||
|
|
||||||
install-brew-recipes:
|
bootsrap-brews:
|
||||||
@brew install stow \
|
@brew bundle \
|
||||||
httpie \
|
--no-lock \
|
||||||
zsh
|
--cleanup \
|
||||||
|
--debug \
|
||||||
|
--file "$(PWD)/macOS/.config/macOS/Brewfile"
|
||||||
|
|
||||||
install-brew-casks:
|
bootstrap-logitech:
|
||||||
@brew install --cask docker \
|
@curl \
|
||||||
google-chrome
|
--output ~/Downloads/logi-options.zip \
|
||||||
|
https://download01.logi.com/web/ftp/pub/techsupport/options/options_installer.zip
|
||||||
|
|
||||||
|
bootstrap-amazon-workdocs:
|
||||||
|
@curl \
|
||||||
|
--output ~/Downloads/AmazonWorkDocsDrive.pkg \
|
||||||
|
https://d3f2hupz96ggz3.cloudfront.net/mac/AmazonWorkDocsDrive.pkg
|
||||||
|
|
||||||
|
bootstrap-app-store:
|
||||||
|
@brew bundle \
|
||||||
|
--no-lock \
|
||||||
|
--cleanup \
|
||||||
|
--debug \
|
||||||
|
--file "$(PWD)/macOS/.config/macOS/AppStore.Brewfile"
|
||||||
|
|
||||||
stow:
|
stow:
|
||||||
@stow --stow --verbose --target ~ */
|
@stow --stow --verbose --target ~ */
|
||||||
|
|
||||||
fresh-install: install-brew install-brew-recipes install-brew-casks stow
|
# Order matters, need to install home-brew first then formula
|
||||||
|
bootstrap: bootstrap-homebrew bootstrap-brews stow bootstrap-logitech bootstrap-amazon-workdocs bootstrap-app-store
|
||||||
|
|||||||
101
README.md
101
README.md
@@ -1,3 +1,104 @@
|
|||||||
# My Dotfiles
|
# My Dotfiles
|
||||||
|
|
||||||
This is my repository for learning dotfiles.
|
This is my repository for learning dotfiles.
|
||||||
|
|
||||||
|
It currently will install homebrew and the following homebrew formula.
|
||||||
|
|
||||||
|
```
|
||||||
|
fd
|
||||||
|
git
|
||||||
|
mas
|
||||||
|
neovim
|
||||||
|
node
|
||||||
|
ripgrep
|
||||||
|
stow
|
||||||
|
swift-format
|
||||||
|
zsh
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
It will also install the following homebrew casks in the `~/Applications` directory.
|
||||||
|
|
||||||
|
```
|
||||||
|
docker
|
||||||
|
google-chrome
|
||||||
|
iterm2
|
||||||
|
microsoft-teams
|
||||||
|
obs
|
||||||
|
paw
|
||||||
|
sketchup-pro
|
||||||
|
```
|
||||||
|
|
||||||
|
And the following fonts.
|
||||||
|
|
||||||
|
```
|
||||||
|
font-inconsolata-nerd-font
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
The following applications will be installed from the macOS app store.
|
||||||
|
|
||||||
|
```
|
||||||
|
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.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
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.
|
||||||
|
|
||||||
|
```
|
||||||
|
make bootstrap
|
||||||
|
```
|
||||||
|
|
||||||
|
This start by installing homebrew, then install the required homebrew formulas and casks. Next it will use `gnu-stow` to symlink configuration files to the appropriate locations. And finally, it will download applications from the `App Store`.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
```
|
||||||
|
make bootstrap-homebrew
|
||||||
|
```
|
||||||
|
|
||||||
|
Once homebrew is installed, if you'd like to install the homebrew formula and casks (located in `macOS/.config/macOS/Brewfile`) then you can run the following command.
|
||||||
|
|
||||||
|
```
|
||||||
|
make bootstrap-brews
|
||||||
|
```
|
||||||
|
|
||||||
|
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
|
||||||
|
```
|
||||||
|
|
||||||
|
And finally to download the app store applications run.
|
||||||
|
|
||||||
|
```
|
||||||
|
make bootstrap-app-store
|
||||||
|
```
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
[core]
|
||||||
|
excludesfile = ~/.config/git/gitignore
|
||||||
|
|
||||||
[user]
|
[user]
|
||||||
name = Michael Housh
|
name = Michael Housh
|
||||||
email = mhoush@houshhomeenergy.com
|
email = mhoush@houshhomeenergy.com
|
||||||
37
git/.config/git/gitignore
Normal file
37
git/.config/git/gitignore
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# Compiled source #
|
||||||
|
###################
|
||||||
|
*.com
|
||||||
|
*.class
|
||||||
|
*.dll
|
||||||
|
*.exe
|
||||||
|
*.o
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Packages #
|
||||||
|
############
|
||||||
|
# it's better to unpack these files and commit the raw source
|
||||||
|
# git has its own built in compression methods
|
||||||
|
*.7z
|
||||||
|
*.dmg
|
||||||
|
*.gz
|
||||||
|
*.iso
|
||||||
|
*.jar
|
||||||
|
*.rar
|
||||||
|
*.tar
|
||||||
|
*.zip
|
||||||
|
|
||||||
|
# Logs and databases #
|
||||||
|
######################
|
||||||
|
*.log
|
||||||
|
*.sql
|
||||||
|
*.sqlite
|
||||||
|
|
||||||
|
# OS generated files #
|
||||||
|
######################
|
||||||
|
.DS_Store
|
||||||
|
.DS_Store?
|
||||||
|
._*
|
||||||
|
.Spotlight-V100
|
||||||
|
.Trashes
|
||||||
|
ehthumbs.db
|
||||||
|
Thumbs.db
|
||||||
336
macOS/.config/iterm/profile.json
Normal file
336
macOS/.config/iterm/profile.json
Normal file
@@ -0,0 +1,336 @@
|
|||||||
|
{
|
||||||
|
"Ansi 7 Color" : {
|
||||||
|
"Green Component" : 0.73333334922790527,
|
||||||
|
"Red Component" : 0.73333334922790527,
|
||||||
|
"Blue Component" : 0.73333334922790527
|
||||||
|
},
|
||||||
|
"Tags" : [
|
||||||
|
|
||||||
|
],
|
||||||
|
"Ansi 12 Color" : {
|
||||||
|
"Green Component" : 0.3333333432674408,
|
||||||
|
"Red Component" : 0.3333333432674408,
|
||||||
|
"Blue Component" : 1
|
||||||
|
},
|
||||||
|
"Ansi 8 Color" : {
|
||||||
|
"Green Component" : 0.3333333432674408,
|
||||||
|
"Red Component" : 0.3333333432674408,
|
||||||
|
"Blue Component" : 0.3333333432674408
|
||||||
|
},
|
||||||
|
"Ansi 9 Color" : {
|
||||||
|
"Green Component" : 0.3333333432674408,
|
||||||
|
"Red Component" : 1,
|
||||||
|
"Blue Component" : 0.3333333432674408
|
||||||
|
},
|
||||||
|
"Bold Color" : {
|
||||||
|
"Green Component" : 1,
|
||||||
|
"Red Component" : 1,
|
||||||
|
"Blue Component" : 1
|
||||||
|
},
|
||||||
|
"Ansi 5 Color" : {
|
||||||
|
"Green Component" : 0,
|
||||||
|
"Red Component" : 0.73333334922790527,
|
||||||
|
"Blue Component" : 0.73333334922790527
|
||||||
|
},
|
||||||
|
"Use Non-ASCII Font" : false,
|
||||||
|
"Rows" : 40,
|
||||||
|
"Default Bookmark" : "No",
|
||||||
|
"Non-ASCII Anti Aliased" : true,
|
||||||
|
"Use Bright Bold" : true,
|
||||||
|
"Ansi 10 Color" : {
|
||||||
|
"Green Component" : 1,
|
||||||
|
"Red Component" : 0.3333333432674408,
|
||||||
|
"Blue Component" : 0.3333333432674408
|
||||||
|
},
|
||||||
|
"Ambiguous Double Width" : false,
|
||||||
|
"Jobs to Ignore" : [
|
||||||
|
"rlogin",
|
||||||
|
"ssh",
|
||||||
|
"slogin",
|
||||||
|
"telnet"
|
||||||
|
],
|
||||||
|
"Ansi 15 Color" : {
|
||||||
|
"Green Component" : 1,
|
||||||
|
"Red Component" : 1,
|
||||||
|
"Blue Component" : 1
|
||||||
|
},
|
||||||
|
"Foreground Color" : {
|
||||||
|
"Green Component" : 0.73333334922790527,
|
||||||
|
"Red Component" : 0.73333334922790527,
|
||||||
|
"Blue Component" : 0.73333334922790527
|
||||||
|
},
|
||||||
|
"Bound Hosts" : [
|
||||||
|
|
||||||
|
],
|
||||||
|
"Working Directory" : "\/Users\/michael",
|
||||||
|
"Blinking Cursor" : false,
|
||||||
|
"Disable Window Resizing" : true,
|
||||||
|
"Sync Title" : false,
|
||||||
|
"Prompt Before Closing 2" : false,
|
||||||
|
"BM Growl" : true,
|
||||||
|
"Command" : "",
|
||||||
|
"Description" : "Default",
|
||||||
|
"Mouse Reporting" : true,
|
||||||
|
"Screen" : -1,
|
||||||
|
"Selection Color" : {
|
||||||
|
"Green Component" : 0.8353000283241272,
|
||||||
|
"Red Component" : 0.70980000495910645,
|
||||||
|
"Blue Component" : 1
|
||||||
|
},
|
||||||
|
"Columns" : 120,
|
||||||
|
"Idle Code" : 0,
|
||||||
|
"Ansi 13 Color" : {
|
||||||
|
"Green Component" : 0.3333333432674408,
|
||||||
|
"Red Component" : 1,
|
||||||
|
"Blue Component" : 1
|
||||||
|
},
|
||||||
|
"Custom Command" : "No",
|
||||||
|
"ASCII Anti Aliased" : true,
|
||||||
|
"Non Ascii Font" : "icomoon 12",
|
||||||
|
"Vertical Spacing" : 1,
|
||||||
|
"Use Bold Font" : true,
|
||||||
|
"Option Key Sends" : 0,
|
||||||
|
"Selected Text Color" : {
|
||||||
|
"Green Component" : 0,
|
||||||
|
"Red Component" : 0,
|
||||||
|
"Blue Component" : 0
|
||||||
|
},
|
||||||
|
"Background Color" : {
|
||||||
|
"Green Component" : 0,
|
||||||
|
"Red Component" : 0,
|
||||||
|
"Blue Component" : 0
|
||||||
|
},
|
||||||
|
"Character Encoding" : 4,
|
||||||
|
"Ansi 11 Color" : {
|
||||||
|
"Green Component" : 1,
|
||||||
|
"Red Component" : 1,
|
||||||
|
"Blue Component" : 0.3333333432674408
|
||||||
|
},
|
||||||
|
"Use Italic Font" : true,
|
||||||
|
"Unlimited Scrollback" : false,
|
||||||
|
"Keyboard Map" : {
|
||||||
|
"0xf700-0x260000" : {
|
||||||
|
"Text" : "[1;6A",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0x37-0x40000" : {
|
||||||
|
"Text" : "0x1f",
|
||||||
|
"Action" : 11
|
||||||
|
},
|
||||||
|
"0x32-0x40000" : {
|
||||||
|
"Text" : "0x00",
|
||||||
|
"Action" : 11
|
||||||
|
},
|
||||||
|
"0xf709-0x20000" : {
|
||||||
|
"Text" : "[17;2~",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0xf70c-0x20000" : {
|
||||||
|
"Text" : "[20;2~",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0xf729-0x20000" : {
|
||||||
|
"Text" : "[1;2H",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0xf72b-0x40000" : {
|
||||||
|
"Text" : "[1;5F",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0xf705-0x20000" : {
|
||||||
|
"Text" : "[1;2Q",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0xf703-0x260000" : {
|
||||||
|
"Text" : "[1;6C",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0xf700-0x220000" : {
|
||||||
|
"Text" : "[1;2A",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0xf701-0x280000" : {
|
||||||
|
"Text" : "0x1b 0x1b 0x5b 0x42",
|
||||||
|
"Action" : 11
|
||||||
|
},
|
||||||
|
"0x38-0x40000" : {
|
||||||
|
"Text" : "0x7f",
|
||||||
|
"Action" : 11
|
||||||
|
},
|
||||||
|
"0x33-0x40000" : {
|
||||||
|
"Text" : "0x1b",
|
||||||
|
"Action" : 11
|
||||||
|
},
|
||||||
|
"0xf703-0x220000" : {
|
||||||
|
"Text" : "[1;2C",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0xf701-0x240000" : {
|
||||||
|
"Text" : "[1;5B",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0xf70d-0x20000" : {
|
||||||
|
"Text" : "[21;2~",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0xf702-0x260000" : {
|
||||||
|
"Text" : "[1;6D",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0xf729-0x40000" : {
|
||||||
|
"Text" : "[1;5H",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0xf706-0x20000" : {
|
||||||
|
"Text" : "[1;2R",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0x34-0x40000" : {
|
||||||
|
"Text" : "0x1c",
|
||||||
|
"Action" : 11
|
||||||
|
},
|
||||||
|
"0xf700-0x280000" : {
|
||||||
|
"Text" : "0x1b 0x1b 0x5b 0x41",
|
||||||
|
"Action" : 11
|
||||||
|
},
|
||||||
|
"0x2d-0x40000" : {
|
||||||
|
"Text" : "0x1f",
|
||||||
|
"Action" : 11
|
||||||
|
},
|
||||||
|
"0xf70e-0x20000" : {
|
||||||
|
"Text" : "[23;2~",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0xf702-0x220000" : {
|
||||||
|
"Text" : "[1;2D",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0xf703-0x280000" : {
|
||||||
|
"Text" : "0x1b 0x1b 0x5b 0x43",
|
||||||
|
"Action" : 11
|
||||||
|
},
|
||||||
|
"0xf700-0x240000" : {
|
||||||
|
"Text" : "[1;5A",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0xf707-0x20000" : {
|
||||||
|
"Text" : "[1;2S",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0xf70a-0x20000" : {
|
||||||
|
"Text" : "[18;2~",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0x35-0x40000" : {
|
||||||
|
"Text" : "0x1d",
|
||||||
|
"Action" : 11
|
||||||
|
},
|
||||||
|
"0xf70f-0x20000" : {
|
||||||
|
"Text" : "[24;2~",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0xf703-0x240000" : {
|
||||||
|
"Text" : "[1;5C",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0xf701-0x260000" : {
|
||||||
|
"Text" : "[1;6B",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0xf702-0x280000" : {
|
||||||
|
"Text" : "0x1b 0x1b 0x5b 0x44",
|
||||||
|
"Action" : 11
|
||||||
|
},
|
||||||
|
"0xf72b-0x20000" : {
|
||||||
|
"Text" : "[1;2F",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0x36-0x40000" : {
|
||||||
|
"Text" : "0x1e",
|
||||||
|
"Action" : 11
|
||||||
|
},
|
||||||
|
"0xf708-0x20000" : {
|
||||||
|
"Text" : "[15;2~",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0xf701-0x220000" : {
|
||||||
|
"Text" : "[1;2B",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0xf70b-0x20000" : {
|
||||||
|
"Text" : "[19;2~",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0xf702-0x240000" : {
|
||||||
|
"Text" : "[1;5D",
|
||||||
|
"Action" : 10
|
||||||
|
},
|
||||||
|
"0xf704-0x20000" : {
|
||||||
|
"Text" : "[1;2P",
|
||||||
|
"Action" : 10
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Window Type" : 0,
|
||||||
|
"Background Image Location" : "",
|
||||||
|
"Blur" : false,
|
||||||
|
"Scrollback Lines" : 1000,
|
||||||
|
"Send Code When Idle" : false,
|
||||||
|
"Close Sessions On End" : true,
|
||||||
|
"Terminal Type" : "xterm-256color",
|
||||||
|
"Visual Bell" : true,
|
||||||
|
"Flashing Bell" : false,
|
||||||
|
"Silence Bell" : false,
|
||||||
|
"Ansi 14 Color" : {
|
||||||
|
"Green Component" : 1,
|
||||||
|
"Red Component" : 0.3333333432674408,
|
||||||
|
"Blue Component" : 1
|
||||||
|
},
|
||||||
|
"Name" : "mhoush",
|
||||||
|
"Cursor Text Color" : {
|
||||||
|
"Green Component" : 1,
|
||||||
|
"Red Component" : 1,
|
||||||
|
"Blue Component" : 1
|
||||||
|
},
|
||||||
|
"Shortcut" : "",
|
||||||
|
"Cursor Color" : {
|
||||||
|
"Green Component" : 0.73333334922790527,
|
||||||
|
"Red Component" : 0.73333334922790527,
|
||||||
|
"Blue Component" : 0.73333334922790527
|
||||||
|
},
|
||||||
|
"Transparency" : 0.14805401741190161,
|
||||||
|
"Ansi 1 Color" : {
|
||||||
|
"Green Component" : 0,
|
||||||
|
"Red Component" : 0.73333334922790527,
|
||||||
|
"Blue Component" : 0
|
||||||
|
},
|
||||||
|
"Horizontal Spacing" : 1,
|
||||||
|
"Custom Directory" : "No",
|
||||||
|
"Ansi 4 Color" : {
|
||||||
|
"Green Component" : 0,
|
||||||
|
"Red Component" : 0,
|
||||||
|
"Blue Component" : 0.73333334922790527
|
||||||
|
},
|
||||||
|
"Ansi 0 Color" : {
|
||||||
|
"Green Component" : 0,
|
||||||
|
"Red Component" : 0,
|
||||||
|
"Blue Component" : 0
|
||||||
|
},
|
||||||
|
"Guid" : "3B878A03-0EF2-4A8C-B1FD-7DEF4A0ABF6F",
|
||||||
|
"Ansi 3 Color" : {
|
||||||
|
"Green Component" : 0.73333334922790527,
|
||||||
|
"Red Component" : 0.73333334922790527,
|
||||||
|
"Blue Component" : 0
|
||||||
|
},
|
||||||
|
"Normal Font" : "InconsolataNerdFontCompleteM-Regular 14",
|
||||||
|
"Ansi 2 Color" : {
|
||||||
|
"Green Component" : 0.73333334922790527,
|
||||||
|
"Red Component" : 0,
|
||||||
|
"Blue Component" : 0
|
||||||
|
},
|
||||||
|
"Right Option Key Sends" : 0,
|
||||||
|
"Ansi 6 Color" : {
|
||||||
|
"Green Component" : 0.73333334922790527,
|
||||||
|
"Red Component" : 0,
|
||||||
|
"Blue Component" : 0.73333334922790527
|
||||||
|
}
|
||||||
|
}
|
||||||
2
macOS/.config/macOS/AppStore.Brewfile
Normal file
2
macOS/.config/macOS/AppStore.Brewfile
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
mas "pwSafe", id: "520993579"
|
||||||
|
mas "Xcode", id: "497799835"
|
||||||
29
macOS/.config/macOS/Brewfile
Normal file
29
macOS/.config/macOS/Brewfile
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
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"
|
||||||
|
|
||||||
|
# casks
|
||||||
|
cask "docker"
|
||||||
|
cask "google-chrome"
|
||||||
|
cask "iterm2"
|
||||||
|
cask "obs"
|
||||||
|
cask "paw"
|
||||||
|
cask "sketchup-pro"
|
||||||
|
cask "microsoft-teams"
|
||||||
|
|
||||||
|
# fonts
|
||||||
|
cask "font-inconsolata-nerd-font"
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
require('plugins')
|
require('plugins')
|
||||||
|
|
||||||
-- Key maps
|
-- Key maps
|
||||||
require('keymaps')
|
require('mappings')
|
||||||
|
|
||||||
-- Common settings
|
-- Common settings
|
||||||
require('settings')
|
require('settings')
|
||||||
@@ -12,4 +12,3 @@ require('autocmd')
|
|||||||
|
|
||||||
-- Theme
|
-- Theme
|
||||||
require('theme')
|
require('theme')
|
||||||
|
|
||||||
|
|||||||
112
nvim/.config/nvim/lua/config/cmp.lua
Normal file
112
nvim/.config/nvim/lua/config/cmp.lua
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
-- Setup nvim-cmp.
|
||||||
|
local cmp = require "cmp"
|
||||||
|
local lspkind = require("lspkind")
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
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"}})
|
||||||
|
})
|
||||||
37
nvim/.config/nvim/lua/config/diffview.lua
Normal file
37
nvim/.config/nvim/lua/config/diffview.lua
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
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"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
16
nvim/.config/nvim/lua/config/lsp-installer.lua
Normal file
16
nvim/.config/nvim/lua/config/lsp-installer.lua
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
local lsp_installer = require("nvim-lsp-installer")
|
||||||
|
|
||||||
|
-- Register a handler that will be called for all installed servers.
|
||||||
|
-- Alternatively, you may also register handlers on specific server instances instead (see example below).
|
||||||
|
lsp_installer.on_server_ready(function(server)
|
||||||
|
local opts = {}
|
||||||
|
|
||||||
|
-- (optional) Customize the options passed to the server
|
||||||
|
-- if server.name == "tsserver" then
|
||||||
|
-- opts.root_dir = function() ... end
|
||||||
|
-- end
|
||||||
|
|
||||||
|
-- This setup() function is exactly the same as lspconfig's setup function.
|
||||||
|
-- Refer to https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
||||||
|
server:setup(opts)
|
||||||
|
end)
|
||||||
198
nvim/.config/nvim/lua/config/lsp.lua
Normal file
198
nvim/.config/nvim/lua/config/lsp.lua
Normal file
@@ -0,0 +1,198 @@
|
|||||||
|
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', '<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").update_capabilities(capabilities)
|
||||||
|
|
||||||
|
local servers = {
|
||||||
|
"gopls", "bashls", "jedi_language_server", "dockerls", "terraformls",
|
||||||
|
"tsserver", "texlab", "yamlls", "jsonls"
|
||||||
|
}
|
||||||
|
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
|
||||||
|
|
||||||
|
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}
|
||||||
|
-- }
|
||||||
|
-- }
|
||||||
|
-- }
|
||||||
|
-- }
|
||||||
32
nvim/.config/nvim/lua/config/neogit.lua
Normal file
32
nvim/.config/nvim/lua/config/neogit.lua
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
local neogit = require('neogit')
|
||||||
|
--neogit.config.use_magit_keybindings()
|
||||||
|
|
||||||
|
neogit.setup {
|
||||||
|
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"] = "",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -88,7 +88,7 @@ require("nvim-tree").setup {
|
|||||||
-- side of the tree, can be one of 'left' | 'right' | 'top' | 'bottom'
|
-- side of the tree, can be one of 'left' | 'right' | 'top' | 'bottom'
|
||||||
side = "left",
|
side = "left",
|
||||||
-- if true the tree will resize itself after opening a file
|
-- if true the tree will resize itself after opening a file
|
||||||
auto_resize = false,
|
auto_resize = true,
|
||||||
mappings = {
|
mappings = {
|
||||||
-- custom only false will merge the list with the default mappings
|
-- custom only false will merge the list with the default mappings
|
||||||
-- if true, it will only use your list to set the mappings
|
-- if true, it will only use your list to set the mappings
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
-- disable v
|
--isable v
|
||||||
-- local presets = require("which-key.plugins.presets")
|
-- local presets = require("which-key.plugins.presets")
|
||||||
-- presets.operators["v"] = nil
|
-- presets.operators["v"] = nil
|
||||||
require("which-key").setup {
|
require("which-key").setup {
|
||||||
@@ -63,8 +63,8 @@ require("which-key").setup {
|
|||||||
i = {"j", "k"},
|
i = {"j", "k"},
|
||||||
v = {"j", "k"}
|
v = {"j", "k"}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
local wk = require("which-key")
|
local wk = require("which-key")
|
||||||
default_options = {noremap = true, silent = true}
|
default_options = {noremap = true, silent = true}
|
||||||
|
|
||||||
@@ -72,8 +72,17 @@ default_options = {noremap = true, silent = true}
|
|||||||
--wk.register({ga = {"<Plug>(EasyAlign)", "Align", mode = "x"}})
|
--wk.register({ga = {"<Plug>(EasyAlign)", "Align", mode = "x"}})
|
||||||
|
|
||||||
-- Register all leader based mappings
|
-- Register all leader based mappings
|
||||||
|
local wk = require("which-key")
|
||||||
|
-- As an example, we will create the following mappings:
|
||||||
|
-- * <leader>ff find files
|
||||||
|
-- * <leader>fr show recent files
|
||||||
|
-- * <leader>fb Foobar
|
||||||
|
-- we'll document:
|
||||||
|
-- * <leader>fn new file
|
||||||
|
-- * <leader>fe edit file
|
||||||
|
-- and hide <leader>1
|
||||||
wk.register({
|
wk.register({
|
||||||
["<Tab>"] = {"<cmd>e#<cr>", "Switch to previously opened buffer"},
|
["<leader>"] = {
|
||||||
b = {
|
b = {
|
||||||
name = "Buffers",
|
name = "Buffers",
|
||||||
b = {
|
b = {
|
||||||
@@ -81,41 +90,21 @@ wk.register({
|
|||||||
"Find buffer"
|
"Find buffer"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
g = {
|
||||||
|
name = "Git",
|
||||||
|
c = { "<cmd>Neogit Commit<cr>", "Git Commit" },
|
||||||
|
g = { "<cmd>Neogit<cr>", "Open NeoGit" }
|
||||||
|
},
|
||||||
f = {
|
f = {
|
||||||
name = "Files",
|
name = "File",
|
||||||
s = {"<cmd>w<cr>", "Save Buffer"},
|
f = { "<cmd>Telescope find_files<cr>", "Find File" },
|
||||||
f = {
|
r = { "<cmd>Telescope oldfiles<cr>", "Open Recent File" },
|
||||||
"<cmd>lua require'telescope.builtin'.find_files({ find_command = {'fd', '--hidden', '--type', 'file', '--follow'}})<cr>",
|
n = { "<cmd>enew<cr>", "New File" },
|
||||||
"Find File"
|
|
||||||
},
|
|
||||||
l = {"<cmd>Lf<cr>", "Open LF"},
|
|
||||||
p = {"<cmd>NvimTreeToggle<cr>", "Toogle Tree"},
|
|
||||||
r = {"<cmd>Telescope oldfiles<cr>", "Open Recent File"},
|
|
||||||
T = {"<cmd>NvimTreeFindFile<CR>", "Find in Tree"}
|
|
||||||
},
|
},
|
||||||
s = {
|
},
|
||||||
name = "Search",
|
s = {
|
||||||
c = {"<cmd>Telescope colorscheme<cr>", "Colorscheme"},
|
name = "Search",
|
||||||
h = {"<cmd>Telescope help_tags<cr>", "Find Help"},
|
c = {"<cmd>Telescope colorscheme<cr>", "Colorscheme" }
|
||||||
M = {"<cmd>Telescope man_pages<cr>", "Man Pages"},
|
}
|
||||||
R = {"<cmd>Telescope registers<cr>", "Registers"},
|
|
||||||
t = {"<cmd>Telescope live_grep<cr>", "Text"},
|
})
|
||||||
s = {"<cmd>Telescope grep_string<cr>", "Text under cursor"},
|
|
||||||
k = {"<cmd>Telescope keymaps<cr>", "Keymaps"},
|
|
||||||
C = {"<cmd>Telescope commands<cr>", "Commands"},
|
|
||||||
p = {"<cmd>Telescope projects<cr>", "Projects"},
|
|
||||||
P = {
|
|
||||||
"<cmd>lua require('telescope.builtin.internal').colorscheme({enable_preview = true})<cr>",
|
|
||||||
"Colorscheme with Preview"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
w = {
|
|
||||||
name = "Window",
|
|
||||||
q = {"<cmd>:q<cr>", "Close"},
|
|
||||||
s = {"<cmd>:split<cr>", "Horizontal Split"},
|
|
||||||
t = {"<c-w>t", "Move to new tab"},
|
|
||||||
["="] = {"<c-w>=", "Equally size"},
|
|
||||||
v = {"<cmd>:vsplit<cr>", "Verstical Split"},
|
|
||||||
w = {"<c-w>x", "Swap"}
|
|
||||||
},
|
|
||||||
}, {prefix = "<leader>", mode = "n", default_options})
|
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
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 = ","
|
|
||||||
|
|
||||||
-- easier escape key mapping
|
|
||||||
keymap('i', 'jk', '<ESC>', default_options)
|
|
||||||
|
|
||||||
keymap('n', '<c-s>', ':w<CR>', default_options)
|
|
||||||
keymap('i', '<c-s>', '<ESC>:w<CR>a', default_options)
|
|
||||||
|
|
||||||
-- 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)
|
|
||||||
keymap('n', '<c-l>', '<c-w>l', default_options)
|
|
||||||
|
|
||||||
-- refresh config
|
|
||||||
--keymap('n', '<Leader>so', ':so $MYVIMRC<CR>', default_opts)
|
|
||||||
|
|
||||||
--keymap('n', '<C-n>', ':NvimTreeToggle<CR>', default_opts)
|
|
||||||
-- find files
|
|
||||||
--keymap('n', '<Leader>f', ':Telescope find_files<cr>', default_opts)
|
|
||||||
|
|
||||||
33
nvim/.config/nvim/lua/mappings.lua
Normal file
33
nvim/.config/nvim/lua/mappings.lua
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
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 = " "
|
||||||
|
|
||||||
|
-- easier escape key mapping
|
||||||
|
keymap('i', 'jk', '<ESC>', default_options)
|
||||||
|
|
||||||
|
keymap('n', '<c-s>', ':w<CR>', default_options)
|
||||||
|
keymap('i', '<c-s>', '<ESC>:w<CR>a', default_options)
|
||||||
|
|
||||||
|
-- paste over currently selected text without yanking it
|
||||||
|
keymap("v", "p", "\"_dP", default_options)
|
||||||
|
|
||||||
|
-- buffer focus
|
||||||
|
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)
|
||||||
|
keymap('n', '<c-l>', '<c-w>l', default_options)
|
||||||
|
|
||||||
|
-- Resizing panes
|
||||||
|
keymap("n", "<Left>", ":vertical resize +1<CR>", default_options)
|
||||||
|
keymap("n", "<Right>", ":vertical resize -1<CR>", default_options)
|
||||||
|
keymap("n", "<Up>", ":resize -1<CR>", default_options)
|
||||||
|
keymap("n", "<Down>", ":resize +1<CR>", default_options)
|
||||||
|
|
||||||
|
-- Move selected line / block of text in visual mode
|
||||||
|
keymap("x", "K", ":move '<-2<CR>gv-gv", default_options)
|
||||||
|
keymap("x", "J", ":move '>+1<CR>gv-gv", default_options)
|
||||||
@@ -54,8 +54,49 @@ use {
|
|||||||
|
|
||||||
use "nvim-treesitter/nvim-treesitter-textobjects"
|
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")}
|
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")
|
||||||
|
}
|
||||||
|
|
||||||
-- Theme
|
-- Theme
|
||||||
use {
|
use {
|
||||||
'EdenEast/nightfox.nvim',
|
'EdenEast/nightfox.nvim',
|
||||||
|
|||||||
@@ -1,24 +1,3 @@
|
|||||||
-- Nightfox
|
-- Nightfox
|
||||||
require('nightfox').load('nordfox')
|
require('nightfox').load('nordfox')
|
||||||
|
|
||||||
-- Tokyo Night
|
|
||||||
-- Example config in Lua
|
|
||||||
--vim.g.tokyonight_style = "storm"
|
|
||||||
--vim.g.tokyonight_italic_functions = true
|
|
||||||
--vim.g.tokyonight_sidebars = { "qf", "vista_kind", "terminal", "packer" }
|
|
||||||
|
|
||||||
-- Change the "hint" color to the "orange" color, and make the "error" color bright red
|
|
||||||
--vim.g.tokyonight_colors = { hint = "orange", error = "#ff0000" }
|
|
||||||
|
|
||||||
-- Load the colorscheme
|
|
||||||
--vim.cmd[[colorscheme tokyonight]]
|
|
||||||
|
|
||||||
-- Nord
|
|
||||||
-- Example config in lua
|
|
||||||
--vim.g.nord_contrast = true
|
|
||||||
--vim.g.nord_borders = false
|
|
||||||
--vim.g.nord_disable_background = false
|
|
||||||
--vim.g.nord_italic = false
|
|
||||||
|
|
||||||
-- Load the colorscheme
|
|
||||||
--require('nord').set()
|
|
||||||
|
|||||||
@@ -69,24 +69,126 @@ end
|
|||||||
time([[try_loadstring definition]], false)
|
time([[try_loadstring definition]], false)
|
||||||
time([[Defining packer_plugins]], true)
|
time([[Defining packer_plugins]], true)
|
||||||
_G.packer_plugins = {
|
_G.packer_plugins = {
|
||||||
|
["bufdelete.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/michael/.local/share/nvim/site/pack/packer/start/bufdelete.nvim",
|
||||||
|
url = "https://github.com/famiu/bufdelete.nvim"
|
||||||
|
},
|
||||||
|
["cmp-buffer"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/michael/.local/share/nvim/site/pack/packer/start/cmp-buffer",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-buffer"
|
||||||
|
},
|
||||||
|
["cmp-calc"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/michael/.local/share/nvim/site/pack/packer/start/cmp-calc",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-calc"
|
||||||
|
},
|
||||||
|
["cmp-cmdline"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/michael/.local/share/nvim/site/pack/packer/start/cmp-cmdline",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-cmdline"
|
||||||
|
},
|
||||||
|
["cmp-emoji"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/michael/.local/share/nvim/site/pack/packer/start/cmp-emoji",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-emoji"
|
||||||
|
},
|
||||||
|
["cmp-nvim-lsp"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/michael/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
|
||||||
|
},
|
||||||
|
["cmp-path"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/michael/.local/share/nvim/site/pack/packer/start/cmp-path",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-path"
|
||||||
|
},
|
||||||
|
["cmp-spell"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/michael/.local/share/nvim/site/pack/packer/start/cmp-spell",
|
||||||
|
url = "https://github.com/f3fora/cmp-spell"
|
||||||
|
},
|
||||||
|
["cmp-vsnip"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/michael/.local/share/nvim/site/pack/packer/start/cmp-vsnip",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-vsnip"
|
||||||
|
},
|
||||||
|
["diffview.nvim"] = {
|
||||||
|
commands = { "DiffviewOpen", "DiffviewClose", "DiffviewToggleFiles", "DiffviewFocusFiles" },
|
||||||
|
config = { 'require("config/diffview")' },
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
only_cond = false,
|
||||||
|
path = "/Users/michael/.local/share/nvim/site/pack/packer/opt/diffview.nvim",
|
||||||
|
url = "https://github.com/sindrets/diffview.nvim"
|
||||||
|
},
|
||||||
|
["lsp_signature.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/michael/.local/share/nvim/site/pack/packer/start/lsp_signature.nvim",
|
||||||
|
url = "https://github.com/ray-x/lsp_signature.nvim"
|
||||||
|
},
|
||||||
|
["lspkind-nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/michael/.local/share/nvim/site/pack/packer/start/lspkind-nvim",
|
||||||
|
url = "https://github.com/onsails/lspkind-nvim"
|
||||||
|
},
|
||||||
["lualine.nvim"] = {
|
["lualine.nvim"] = {
|
||||||
config = { 'require("config/lualine")' },
|
config = { 'require("config/lualine")' },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/michael/.local/share/nvim/site/pack/packer/start/lualine.nvim",
|
path = "/Users/michael/.local/share/nvim/site/pack/packer/start/lualine.nvim",
|
||||||
url = "https://github.com/nvim-lualine/lualine.nvim"
|
url = "https://github.com/nvim-lualine/lualine.nvim"
|
||||||
},
|
},
|
||||||
|
neogit = {
|
||||||
|
commands = { "Neogit" },
|
||||||
|
config = { 'require("config/neogit")' },
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = true,
|
||||||
|
only_cond = false,
|
||||||
|
path = "/Users/michael/.local/share/nvim/site/pack/packer/opt/neogit",
|
||||||
|
url = "https://github.com/TimUntersberger/neogit"
|
||||||
|
},
|
||||||
["nightfox.nvim"] = {
|
["nightfox.nvim"] = {
|
||||||
config = { 'require("config/nightfox")' },
|
config = { 'require("config/nightfox")' },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/michael/.local/share/nvim/site/pack/packer/start/nightfox.nvim",
|
path = "/Users/michael/.local/share/nvim/site/pack/packer/start/nightfox.nvim",
|
||||||
url = "https://github.com/EdenEast/nightfox.nvim"
|
url = "https://github.com/EdenEast/nightfox.nvim"
|
||||||
},
|
},
|
||||||
|
["nvim-cmp"] = {
|
||||||
|
config = { 'require("config/cmp")' },
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/michael/.local/share/nvim/site/pack/packer/start/nvim-cmp",
|
||||||
|
url = "https://github.com/hrsh7th/nvim-cmp"
|
||||||
|
},
|
||||||
|
["nvim-lsp-installer"] = {
|
||||||
|
config = { 'require("config/lsp-installer")' },
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/michael/.local/share/nvim/site/pack/packer/start/nvim-lsp-installer",
|
||||||
|
url = "https://github.com/williamboman/nvim-lsp-installer"
|
||||||
|
},
|
||||||
|
["nvim-lspconfig"] = {
|
||||||
|
config = { 'require("config/lsp")' },
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/michael/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
|
||||||
|
url = "https://github.com/neovim/nvim-lspconfig"
|
||||||
|
},
|
||||||
["nvim-tree.lua"] = {
|
["nvim-tree.lua"] = {
|
||||||
config = { 'require("config/nvim-tree")' },
|
config = { 'require("config/nvim-tree")' },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/michael/.local/share/nvim/site/pack/packer/start/nvim-tree.lua",
|
path = "/Users/michael/.local/share/nvim/site/pack/packer/start/nvim-tree.lua",
|
||||||
url = "https://github.com/kyazdani42/nvim-tree.lua"
|
url = "https://github.com/kyazdani42/nvim-tree.lua"
|
||||||
},
|
},
|
||||||
|
["nvim-treesitter"] = {
|
||||||
|
config = { 'require("config/treesitter")' },
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/michael/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
|
||||||
|
url = "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||||
|
},
|
||||||
|
["nvim-treesitter-textobjects"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/michael/.local/share/nvim/site/pack/packer/start/nvim-treesitter-textobjects",
|
||||||
|
url = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects"
|
||||||
|
},
|
||||||
["nvim-web-devicons"] = {
|
["nvim-web-devicons"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/michael/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
|
path = "/Users/michael/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
|
||||||
@@ -107,26 +209,67 @@ _G.packer_plugins = {
|
|||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/michael/.local/share/nvim/site/pack/packer/start/telescope.nvim",
|
path = "/Users/michael/.local/share/nvim/site/pack/packer/start/telescope.nvim",
|
||||||
url = "https://github.com/nvim-telescope/telescope.nvim"
|
url = "https://github.com/nvim-telescope/telescope.nvim"
|
||||||
|
},
|
||||||
|
["which-key.nvim"] = {
|
||||||
|
config = { 'require("config/which")' },
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
only_cond = false,
|
||||||
|
path = "/Users/michael/.local/share/nvim/site/pack/packer/opt/which-key.nvim",
|
||||||
|
url = "https://github.com/folke/which-key.nvim"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
time([[Defining packer_plugins]], false)
|
time([[Defining packer_plugins]], false)
|
||||||
-- Config for: nvim-tree.lua
|
-- Config for: nvim-lsp-installer
|
||||||
time([[Config for nvim-tree.lua]], true)
|
time([[Config for nvim-lsp-installer]], true)
|
||||||
require("config/nvim-tree")
|
require("config/lsp-installer")
|
||||||
time([[Config for nvim-tree.lua]], false)
|
time([[Config for nvim-lsp-installer]], false)
|
||||||
|
-- Config for: nvim-cmp
|
||||||
|
time([[Config for nvim-cmp]], true)
|
||||||
|
require("config/cmp")
|
||||||
|
time([[Config for nvim-cmp]], false)
|
||||||
-- Config for: nightfox.nvim
|
-- Config for: nightfox.nvim
|
||||||
time([[Config for nightfox.nvim]], true)
|
time([[Config for nightfox.nvim]], true)
|
||||||
require("config/nightfox")
|
require("config/nightfox")
|
||||||
time([[Config for nightfox.nvim]], false)
|
time([[Config for nightfox.nvim]], false)
|
||||||
|
-- Config for: nvim-lspconfig
|
||||||
|
time([[Config for nvim-lspconfig]], true)
|
||||||
|
require("config/lsp")
|
||||||
|
time([[Config for nvim-lspconfig]], false)
|
||||||
-- Config for: telescope.nvim
|
-- Config for: telescope.nvim
|
||||||
time([[Config for telescope.nvim]], true)
|
time([[Config for telescope.nvim]], true)
|
||||||
require("config/telescope")
|
require("config/telescope")
|
||||||
time([[Config for telescope.nvim]], false)
|
time([[Config for telescope.nvim]], false)
|
||||||
|
-- Config for: nvim-treesitter
|
||||||
|
time([[Config for nvim-treesitter]], true)
|
||||||
|
require("config/treesitter")
|
||||||
|
time([[Config for nvim-treesitter]], false)
|
||||||
|
-- Config for: nvim-tree.lua
|
||||||
|
time([[Config for nvim-tree.lua]], true)
|
||||||
|
require("config/nvim-tree")
|
||||||
|
time([[Config for nvim-tree.lua]], false)
|
||||||
-- Config for: lualine.nvim
|
-- Config for: lualine.nvim
|
||||||
time([[Config for lualine.nvim]], true)
|
time([[Config for lualine.nvim]], true)
|
||||||
require("config/lualine")
|
require("config/lualine")
|
||||||
time([[Config for lualine.nvim]], false)
|
time([[Config for lualine.nvim]], false)
|
||||||
|
|
||||||
|
-- Command lazy-loads
|
||||||
|
time([[Defining lazy-load commands]], true)
|
||||||
|
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file Neogit lua require("packer.load")({'neogit'}, { cmd = "Neogit", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
|
||||||
|
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file DiffviewOpen lua require("packer.load")({'diffview.nvim'}, { cmd = "DiffviewOpen", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
|
||||||
|
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file DiffviewClose lua require("packer.load")({'diffview.nvim'}, { cmd = "DiffviewClose", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
|
||||||
|
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file DiffviewToggleFiles lua require("packer.load")({'diffview.nvim'}, { cmd = "DiffviewToggleFiles", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
|
||||||
|
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file DiffviewFocusFiles lua require("packer.load")({'diffview.nvim'}, { cmd = "DiffviewFocusFiles", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
|
||||||
|
time([[Defining lazy-load commands]], false)
|
||||||
|
|
||||||
|
vim.cmd [[augroup packer_load_aucmds]]
|
||||||
|
vim.cmd [[au!]]
|
||||||
|
-- Event lazy-loads
|
||||||
|
time([[Defining lazy-load event autocommands]], true)
|
||||||
|
vim.cmd [[au VimEnter * ++once lua require("packer.load")({'which-key.nvim'}, { event = "VimEnter *" }, _G.packer_plugins)]]
|
||||||
|
time([[Defining lazy-load event autocommands]], false)
|
||||||
|
vim.cmd("augroup END")
|
||||||
if should_profile then save_profiles() end
|
if should_profile then save_profiles() end
|
||||||
|
|
||||||
end)
|
end)
|
||||||
|
|||||||
4
zsh/.config/zsh/.zcompcache/brew_all_commands
Normal file
4
zsh/.config/zsh/.zcompcache/brew_all_commands
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
list=( ${(Q)"${(z)$(<<\EO:list
|
||||||
|
'aspell-dictionaries' 'determine-rebottle-runners' 'postgresql-upgrade-database' 'services'
|
||||||
|
EO:list
|
||||||
|
)}"} )
|
||||||
@@ -19,3 +19,5 @@ zsh_add_file "zsh-aliases"
|
|||||||
zsh_add_file "zsh-zinit"
|
zsh_add_file "zsh-zinit"
|
||||||
|
|
||||||
export EDITOR="nvim"
|
export EDITOR="nvim"
|
||||||
|
|
||||||
|
cat < "$ZDOTDIR/banner"
|
||||||
|
|||||||
10
zsh/.config/zsh/banner
Normal file
10
zsh/.config/zsh/banner
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
|
||||||
|
_ _
|
||||||
|
_ __ ___ | |__ ___ _ _ ___ | |__
|
||||||
|
| '_ ` _ \ _____ | '_ \ / _ \ | | | |/ __|| '_ \
|
||||||
|
| | | | | ||_____|| | | || (_) || |_| |\__ \| | | |
|
||||||
|
|_| |_| |_| |_| |_| \___/ \__,_||___/|_| |_|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,9 +1,15 @@
|
|||||||
# configure aliases
|
# configure aliases
|
||||||
#alias zshconfig="vim ~/.zshrc"
|
#alias zshconfig="$ZDOTDIR"
|
||||||
#alias reloadzsh="source ~/.zshrc"
|
|
||||||
alias mkcd() { mkdir $1 && cd $1 }
|
alias mkcd() { mkdir $1 && cd $1 }
|
||||||
alias l() { ls -lah "$@" }
|
alias l() { ls -lah "$@" }
|
||||||
|
|
||||||
# editor
|
# editor
|
||||||
alias vim() { nvim "$@" }
|
alias vim() { nvim "$@" }
|
||||||
|
|
||||||
|
# git
|
||||||
|
alias g() { git "$@" }
|
||||||
|
alias ga() { git add . }
|
||||||
|
alias gma() { git add . && git commit -m "$1" }
|
||||||
|
alias gs() { git status }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user