Skip to content

Commit

Permalink
lua
Browse files Browse the repository at this point in the history
  • Loading branch information
saitonakamura committed Apr 23, 2024
1 parent f83b55f commit 03afa3a
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 37 deletions.
7 changes: 0 additions & 7 deletions .fdignore

This file was deleted.

40 changes: 22 additions & 18 deletions macos.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## macos

* set lang change to option space
* set caps lock to esc
* set keyboard repeat rate to fast
- set lang change to option space
- set caps lock to esc
- set keyboard repeat rate to fast

## brew

Expand All @@ -18,12 +18,12 @@ https://1password.com/downloads/mac/

## app store stuff

* ominvore
* xcode
* 1password for safari
* vimari
* magnet
* slack
- ominvore
- xcode
- 1password for safari
- vimari
- magnet
- slack

## middle

Expand All @@ -43,8 +43,8 @@ ln -s ~/dotfiles/.config/kitty ~/.config/kitty

## ssh

* copy keys
- copy keys

```sh
brew install keychain
```
Expand Down Expand Up @@ -93,8 +93,8 @@ defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false
defaults delete -g ApplePressAndHoldEnabled
```

* enable settings sync
* disable context-dependent extensions
- enable settings sync
- disable context-dependent extensions

## neovim

Expand Down Expand Up @@ -122,17 +122,22 @@ git clone --depth=1 https://github.com/savq/paq-nvim.git \

```sh
brew install neovide
# TODO fix version?
ln -sfv /opt/homebrew/Cellar/neovide/0.11.1/Neovide.app /Applications/Neovide.app
mkdir ~/.config/neovide
ln -sfn ~/dotfiles/neovide/config.toml ~/.config/neovide/config.toml
```

````
## starship
https://starship.rs/guide/
```sh
mkdir -p ~/.config
ln -sfn ~/dotfiles/.config/starship.toml ~/.config/starship.toml
```
````

## omz

Expand Down Expand Up @@ -160,7 +165,7 @@ $(brew --prefix)/opt/fzf/install
git clone https://github.com/Aloxaf/fzf-tab ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-tab
```

* cleanup bash stuff
- cleanup bash stuff

## bat

Expand All @@ -182,7 +187,6 @@ https://github.com/sharkdp/fd#on-macos

```sh
brew install fd
ln -sfn ~/dotfiles/.fdignore ~/.fdignore
```

## code
Expand All @@ -197,7 +201,7 @@ mkdir ~/code
curl -fsSL https://fnm.vercel.app/install | bash -s -- --skip-shell
```

* restart shell
- restart shell

```sh
fnm install --lts --corepack-enabled
Expand All @@ -219,4 +223,4 @@ brew install python

```sh
pip3 install pipenv --user
```
```
3 changes: 3 additions & 0 deletions neovide/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# [font]
# normal = ['Caskadyia Nerd Font']
# size = 12
2 changes: 1 addition & 1 deletion nvim/lua/config/lazy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ require("lazy").setup({
version = false, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver
},
install = { colorscheme = { "tokyonight", "habamax" } },
install = { colorscheme = { "tokyonight" } },
checker = { enabled = true }, -- automatically check for plugin updates
performance = {
rtp = {
Expand Down
18 changes: 17 additions & 1 deletion nvim/lua/config/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,21 @@
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here
if vim.g.neovide then
vim.o.guifont = "Caskadyia Nerd Font:h12"
vim.g.neovide_input_ime = false
vim.g.neovide_input_macos_alt_is_meta = true
vim.g.neovide_theme = "auto"
-- vim.o.guifont = { "CaskadyiaCove Nerd Font", ":h12" }
-- vim.o.guifont = "CaskadyiaCove Nerd Font:h12"
-- vim.keymap.set("n", "<D-s>", ":w<CR>") -- Save
vim.keymap.set("v", "<D-c>", '"+y') -- Copy
vim.keymap.set("n", "<D-v>", '"+P') -- Paste normal mode
vim.keymap.set("v", "<D-v>", '"+P') -- Paste visual mode
vim.keymap.set("c", "<D-v>", "<C-R>+") -- Paste command mode
vim.keymap.set("i", "<D-v>", '<ESC>l"+Pli') -- Paste insert mode

-- Allow clipboard copy paste in neovim
vim.api.nvim_set_keymap("", "<D-v>", "+p<CR>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("!", "<D-v>", "<C-R>+", { noremap = true, silent = true })
vim.api.nvim_set_keymap("t", "<D-v>", "<C-\\><C-n>pi", { noremap = true, silent = true })
vim.api.nvim_set_keymap("v", "<D-v>", "<C-R>+", { noremap = true, silent = true })
end
16 changes: 16 additions & 0 deletions nvim/lua/plugins/colors.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
return {
{
"f-person/auto-dark-mode.nvim",
config = {
update_interval = 1000,
set_dark_mode = function()
vim.api.nvim_set_option("background", "dark")
vim.cmd("colorscheme tokyonight")
end,
set_light_mode = function()
vim.api.nvim_set_option("background", "light")
vim.cmd("colorscheme tokyonight")
end,
},
},
}
13 changes: 6 additions & 7 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,16 @@ mkdir ~/.config/nvim
ln -sfn ~/dotfiles/.zshrc ~/.zshrc
ln -sfn ~/dotfiles/.zshenv ~/.zshenv
ln -sfn ~/dotfiles/init.vim ~/.config/nvim/init.vim
ln -sfn ~/dotfiles/.fdignore ~/.fdignore
ln -sfn ~/dotfiles/.ideavimrc ~/.ideavimrc
ln -sfn ~/dotfiles/.p10k.zsh ~/.p10k.zsh
ln -sfn ~/dotfiles/.gitconfig ~/.gitconfig
ln -sfn ~/dotfiles/.yarnrc.yml ~/.yarnrc.yml

install-npm-langservers() {
npm install -g vim-language-server
npm install -g vscode-css-languageserver-bin
npm install -g vscode-html-languageserver-bin
npm install -g vscode-json-languageserver
npm install -g typescript typescript-language-server
npm install -g bash-language-server
npm install -g vim-language-server
npm install -g vscode-css-languageserver-bin
npm install -g vscode-html-languageserver-bin
npm install -g vscode-json-languageserver
npm install -g typescript typescript-language-server
npm install -g bash-language-server
}
8 changes: 5 additions & 3 deletions ubuntu-wsl.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ sudo apt update && sudo apt upgrade -y

## ssh

* copy
- copy

```sh
sudo apt install keychain -y
chmod go-r ~/.ssh/*
```

## install gh

https://github.com/cli/cli/blob/trunk/docs/install_linux.md#debian-ubuntu-linux-raspberry-pi-os-apt

```sh
Expand Down Expand Up @@ -119,7 +121,6 @@ https://github.com/sharkdp/fd#on-ubuntu
sudo apt install fd-find -y
mkdir -p ~/.local/bin
ln -s /usr/bin/fdfind ~/.local/bin/fd
ln -sfn ~/dotfiles/.fdignore ~/.fdignore
```

## fnm
Expand Down Expand Up @@ -164,4 +165,5 @@ mkdir -p ~/.local/bin
ln -s /usr/bin/batcat ~/.local/bin/bat
```

restart shell
restart shell

0 comments on commit 03afa3a

Please sign in to comment.