Skip to content

Commit

Permalink
πŸ’œ
Browse files Browse the repository at this point in the history
  • Loading branch information
mikker committed Jul 16, 2022
1 parent 9fe5454 commit 1a69b1e
Show file tree
Hide file tree
Showing 11 changed files with 104 additions and 31 deletions.
2 changes: 1 addition & 1 deletion bin/refresh-os
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
curl -f "https://api.opensea.io/api/v1/asset/$1/$2/?force_update=true"
curl -f --silent "https://api.opensea.io/api/v1/asset/$1/$2/?force_update=true" -H "X-API-KEY: $OPENSEA_API_KEY"
18 changes: 17 additions & 1 deletion iterm/com.googlecode.iterm2.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3018,6 +3018,10 @@
<string>No</string>
<key>Custom Icon Path</key>
<string>/Users/mikker/Bucket/21319247_787770421395443_7519833377340989830_o.jpg</string>
<key>Custom Tab Title</key>
<string></string>
<key>Custom Window Title</key>
<string>βœ•</string>
<key>Default Bookmark</key>
<string>No</string>
<key>Description</key>
Expand Down Expand Up @@ -3077,6 +3081,8 @@
<integer>0</integer>
<key>Idle Code</key>
<integer>0</integer>
<key>Initial Use Transparency</key>
<false/>
<key>Jobs to Ignore</key>
<array>
<string>rlogin</string>
Expand Down Expand Up @@ -3729,6 +3735,8 @@
</dict>
</array>
</dict>
<key>Subtitle</key>
<string></string>
<key>Sync Title</key>
<false/>
<key>Tags</key>
Expand All @@ -3738,7 +3746,7 @@
<key>Thin Strokes</key>
<integer>1</integer>
<key>Title Components</key>
<integer>256</integer>
<integer>128</integer>
<key>Transparency</key>
<real>0.0</real>
<key>Unicode Version</key>
Expand All @@ -3759,6 +3767,10 @@
<false/>
<key>Use Cursor Guide (Light)</key>
<false/>
<key>Use Custom Tab Title</key>
<true/>
<key>Use Custom Window Title</key>
<true/>
<key>Use HFS Plus Mapping</key>
<false/>
<key>Use Italic Font</key>
Expand Down Expand Up @@ -7826,12 +7838,16 @@
<integer>0</integer>
<key>TabsHaveCloseButton</key>
<false/>
<key>TmuxUsesDedicatedProfile</key>
<true/>
<key>UseBorder</key>
<false/>
<key>UseLionStyleFullscreen</key>
<false/>
<key>UseMetal</key>
<true/>
<key>UseTmuxStatusBar</key>
<true/>
<key>VisualIndicatorForEsc</key>
<false/>
<key>WindowNumber</key>
Expand Down
44 changes: 29 additions & 15 deletions nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ require('packer').startup(function(use)
use 'wincent/ferret'
use 'machakann/vim-highlightedyank'
use { 'prettier/vim-prettier', run = 'yarn install --frozen-lockfile --production' }
use { 'nvim-telescope/telescope.nvim', requires = { {'nvim-lua/plenary.nvim'} } }
use { 'nvim-telescope/telescope.nvim', requires = { { 'nvim-lua/plenary.nvim' } } }
use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' }
use { 'TimUntersberger/neogit', requires = 'nvim-lua/plenary.nvim' }

-- FILE TYPES
use 'etdev/vim-hexcolor'
Expand Down Expand Up @@ -66,31 +67,43 @@ require('packer').startup(function(use)
'VonHeikemen/lsp-zero.nvim',
requires = {
-- LSP Support
{'neovim/nvim-lspconfig'},
{'williamboman/nvim-lsp-installer'},
{ 'neovim/nvim-lspconfig' },
{ 'williamboman/nvim-lsp-installer' },

-- Autocompletion
{'hrsh7th/nvim-cmp'},
{'hrsh7th/cmp-buffer'},
{'hrsh7th/cmp-path'},
{'saadparwaiz1/cmp_luasnip'},
{'hrsh7th/cmp-nvim-lsp'},
{'hrsh7th/cmp-nvim-lua'},
{ 'hrsh7th/nvim-cmp' },
{ 'hrsh7th/cmp-buffer' },
{ 'hrsh7th/cmp-path' },
{ 'saadparwaiz1/cmp_luasnip' },
{ 'hrsh7th/cmp-nvim-lsp' },
{ 'hrsh7th/cmp-nvim-lua' },

-- Snippets
{'L3MON4D3/LuaSnip'},
{ 'L3MON4D3/LuaSnip' },
{ 'rafamadriz/friendly-snippets' },
}
}
use {
"folke/trouble.nvim",
requires = "kyazdani42/nvim-web-devicons",
config = function()
require("trouble").setup {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
}
end
}
end)

-- Add dotfiles to runtimepath
vim.opt.runtimepath = "~/.config/nvim,$VIMRUNTIME"

require"basics"
require"mappings"
require"commands"
require"plugin_config"
require"gui"
require "basics"
require "mappings"
require "commands"
require "plugin_config"
require "gui"

-- Looks
vim.cmd("colorscheme zenbones")
Expand All @@ -112,3 +125,4 @@ lsp.preset('recommended')
lsp.nvim_workspace()
lsp.setup()

require("luasnip.loaders.from_snipmate").lazy_load({ paths = "./snippets" })
6 changes: 4 additions & 2 deletions nvim/lua/basics.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ o.hidden = true
o.number = true

-- Always show tabs and trailing spaces
o.listchars.tab = "»·"
o.listchars.trail = "Β· "
o.listchars = "tab:»·,trail:·"
o.list = true

-- Search and status
Expand All @@ -30,6 +29,9 @@ o.smartcase = true -- ...unless uppercase
o.gdefault = true -- /g by default
o.inccommand = 'nosplit' -- live preview :s commands

o.updatetime = 100 -- faster completion
o.completeopt = { "menuone", "noselect" } -- mostly just for cmp

o.autoindent = true -- indent on new line
o.expandtab = true -- spaces for indentation
o.tabstop = 2
Expand Down
30 changes: 27 additions & 3 deletions nvim/lua/mappings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ map("n", "<leader>j", ":w<cr>")
nrmap("n", "<c-_>", ":set hlsearch!<cr>")

-- old leader is new grep
nrmap("n", "\\", ":Ack")
nrmap("n", "\\", ":Ack ")

-- qq to record macro, Q to apply
map("n", "Q", "@q")
Expand All @@ -25,7 +25,7 @@ map("v", "Q", ":normal Q<cr>")
-- expand %% to dir of current buffer in cmd mode
map("c", "%%", "<c-r>=expand('%:h').'/'<cr>")
-- open file in same dir as current buffer
map("n", "<leader>e", ":e %%")
map("n", "<leader>e", ":e <c-r>=expand('%:h').'/'<cr>")

-- visual line movement
nrmap("n", "k", "gk")
Expand Down Expand Up @@ -62,7 +62,9 @@ nrmap("v", ">", ">gv")
nrmap("n", "<leader>O", ":call system('open .')<cr>")

-- close the bottom window, whatever it es
nrmap("n", "<silent> <c-w>z", ":wincmd z|cclose|lclose")
vim.api.nvim_set_keymap("n", "<c-w>z", ":wincmd z|cclose|lclose<cr>",
{silent = true, noremap = true}
)

-- c-c doesn't trigger InsertLeave so map to escape
nrmap("x", "<c-c>", "<esc>")
Expand Down Expand Up @@ -101,3 +103,25 @@ augroup END
-- Fuzzy find
nrmap('n', '<leader>f', '<cmd>Telescope find_files<cr>')
nrmap('n', '<leader>b', '<cmd>Telescope buffers<cr>')


-- Trouble.nvim
vim.api.nvim_set_keymap("n", "<leader>xx", "<cmd>Trouble<cr>",
{silent = true, noremap = true}
)
vim.api.nvim_set_keymap("n", "<leader>xw", "<cmd>Trouble workspace_diagnostics<cr>",
{silent = true, noremap = true}
)
vim.api.nvim_set_keymap("n", "<leader>xd", "<cmd>Trouble document_diagnostics<cr>",
{silent = true, noremap = true}
)
vim.api.nvim_set_keymap("n", "<leader>xl", "<cmd>Trouble loclist<cr>",
{silent = true, noremap = true}
)
vim.api.nvim_set_keymap("n", "<leader>xq", "<cmd>Trouble quickfix<cr>",
{silent = true, noremap = true}
)
vim.api.nvim_set_keymap("n", "gR", "<cmd>Trouble lsp_references<cr>",
{silent = true, noremap = true}
)

1 change: 1 addition & 0 deletions nvim/nvim
9 changes: 9 additions & 0 deletions nvim/snippets/javascript.snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
snippet desc "describe test clause"
describe("$1", () => {
$0
})

snippet it "it test clause"
it("$1", ${2:async } () => {
$0
})
14 changes: 14 additions & 0 deletions nvim/snippets/typescript.snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
snippet desc "describe test clause"
describe("$1", () => {
$0
})

snippet it "it test clause"
it("$1", () => {
$0
})

snippet ita "async it test clause"
it("$1", async () => {
$0
})
3 changes: 1 addition & 2 deletions nvim/snippets/typescriptreact.snippets
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
snippet cl
console.log($0)
endsnippet
console.log($0)
1 change: 1 addition & 0 deletions sprinkles.symlink/youtube.com.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ window.addEventListener("load", function () {
background: "rgba(255, 255, 255, 0.1)",
zIndex: 9999999,
WebkitBackdropFilter: "blur(20px) grayscale(0.5)",
backdropFilter: "blur(20px) grayscale(0.5)",
display: "flex",
alignItems: "center",
justifyContent: "center",
Expand Down
7 changes: 0 additions & 7 deletions zsh/zshrc.symlink
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,3 @@ fi

# Load fzf
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

# Added by serverless binary installer
export PATH="$HOME/.serverless/bin:$PATH"

# tabtab source for packages
# uninstall by removing these lines
[[ -f ~/.config/tabtab/__tabtab.zsh ]] && . ~/.config/tabtab/__tabtab.zsh || true

0 comments on commit 1a69b1e

Please sign in to comment.