Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
brightpuddle committed Apr 12, 2023
1 parent 0fb8878 commit da42a63
Show file tree
Hide file tree
Showing 15 changed files with 251 additions and 48 deletions.
3 changes: 2 additions & 1 deletion .config/nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ o.foldenable = false
o.grepprg = "rg --color=never"
o.guicursor = "a:blinkon0,i:ver25-iCursor"
o.ignorecase = true
o.laststatus = 2
o.laststatus = 3
o.cmdheight = 0
o.linebreak = true
o.mouse = "a"
o.number = true
Expand Down
2 changes: 2 additions & 0 deletions .config/nvim/lua/config/color.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@ return function()
vim.api.nvim_set_hl(0, "NeoTreeCursorLine", { bg = "#3B4252" })
-- Transparent background
-- vim.api.nvim_set_hl(0, "Normal", { bg = "NONE", fg = "NONE" })
vim.api.nvim_set_hl(0, "NeoTreeNormal", { bg = "#282E39" })
vim.api.nvim_set_hl(0, "NeoTreeWinSeparator", { fg = "#2E3440", bg = "#2E3440" })
end
10 changes: 5 additions & 5 deletions .config/nvim/lua/config/feline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -267,15 +267,15 @@ return function()
},
inactive = {
{
comps.left,
-- comps.left,
-- File info
comps.file.folder,
comps.file.filename,
-- comps.file.folder,
-- comps.file.filename,
},
{},
{
comps.location.percentage,
comps.right,
-- comps.location.percentage,
-- comps.right,
},
},
},
Expand Down
2 changes: 2 additions & 0 deletions .config/nvim/lua/config/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ return function()
diagnostics.eslint_d,
diagnostics.flake8,
diagnostics.hadolint,
diagnostics.npm_groovy_lint,
diagnostics.revive,

-- Code Actions
Expand All @@ -106,6 +107,7 @@ return function()
formatting.fixjson,
formatting.golines,
formatting.isort,
formatting.npm_groovy_lint,
formatting.prettierd.with({
filetypes = {
"css",
Expand Down
4 changes: 4 additions & 0 deletions .config/nvim/lua/config/nav.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@ return function()
k.set({ "n", "i" }, "<C-w>j", "<cmd>NavigatorDown<cr>")
k.set({ "n", "i" }, "<C-w>k", "<cmd>NavigatorUp<cr>")
k.set({ "n", "i" }, "<C-w>l", "<cmd>NavigatorRight<cr>")
k.set({ "n", "i" }, "<C-h>", "<cmd>NavigatorLeft<cr>")
k.set({ "n", "i" }, "<C-j>", "<cmd>NavigatorDown<cr>")
k.set({ "n", "i" }, "<C-k>", "<cmd>NavigatorUp<cr>")
k.set({ "n", "i" }, "<C-l>", "<cmd>NavigatorRight<cr>")
end
8 changes: 8 additions & 0 deletions .config/nvim/lua/config/obsidian.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
return function()
require("obsidian").setup({
dir = "~/notes",
completion = {
nvim_cmp = true,
},
})
end
7 changes: 4 additions & 3 deletions .config/nvim/plugin/10-main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ require("packer").startup({
},
})

use({ "epwalsh/obsidian.nvim", requires = "nvim-lua/plenary.nvim", config = require("config.obsidian") })

-- Debugging
use({ "rcarriga/nvim-dap-ui", opt = true, requires = { "mfussenegger/nvim-dap" } })

Expand Down Expand Up @@ -62,7 +64,6 @@ require("packer").startup({
use({ "ojroques/nvim-bufdel" })

-- tmux split integration
-- use({ "alexghergh/nvim-tmux-navigation", config = require("config.nav") })
use({ "numToStr/Navigator.nvim", config = require("config.nav") })

-- startup time analysis
Expand Down Expand Up @@ -112,12 +113,12 @@ require("packer").startup({
use({ "nvim-treesitter/nvim-treesitter", config = require("config.treesitter") })

-- treesitter syntax tree
use({ "nvim-treesitter/playground" })
-- use({ "nvim-treesitter/playground" })

-- status bar
use({ "kyazdani42/nvim-web-devicons" })
use({
"feline-nvim/feline.nvim",
"freddiehaddad/feline.nvim",
requires = { "kyazdani42/nvim-web-devicons" },
config = require("config.feline"),
after = { "nord-vim" },
Expand Down
9 changes: 9 additions & 0 deletions .config/nvim/plugin/90-keys.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,12 @@ k.set("n", "\\", "<cmd>noh<cr>")
-- Directory Tree
k.set({ "n", "i" }, "<C-o>b", "<cmd>Neotree toggle<cr>")
k.set("n", "<leader>ob", "<cmd>Neotree toggle buffers<cr>")

-- Obsidian follow links
k.set("n", "gf", function()
if require("obsidian").util.cursor_on_markdown_link() then
return "<cmd>ObsidianFollowLink<CR>"
else
return "gf"
end
end, { noremap = false, expr = true })
11 changes: 6 additions & 5 deletions .config/tmux/status.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,26 @@ set -g status-style fg=color251,bg=default
set -g status-interval 10
set -g status-position top
set -g monitor-activity off
set -g status-justify centre
# set -g status-justify left
# set -g status-justify centre
set -g status-justify left

# Center
set-window-option -g window-status-separator ' '

# Active tab
set-window-option -g window-status-current-format " #[fg=brightblack bg=default]"
set-window-option -g window-status-current-format "#[fg=brightblack bg=default]"
set-window-option -ag window-status-current-format "#[fg=#8fbcbb bg=brightblack italics]  "
set-window-option -ag window-status-current-format "#[default italics bg=brightblack fg=default] #I:#W "
set-window-option -ag window-status-current-format "#[fg=brightblack bg=default]"

# Inactive tab
set-window-option -g window-status-format " #[fg=default]  #I:#[default]#W "
set-window-option -g window-status-format "#[default]  #I:#W "


# Left
# Window name
set -g status-left "#[default fg=color244 italics bold] #S"
# set -g status-left "#[default fg=color244 italics bold] #S"
set -g status-left ""


# Right
Expand Down
54 changes: 29 additions & 25 deletions .config/wezterm/wezterm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,30 +40,32 @@ return {
-- Font
font = w.font("RobotoMono Nerd Font", { weight = "Medium" }),
font_size = 15.0,
-- cell_width = 1,
-- cell_width
line_height = 1.1,
--
color_scheme = "nord",
check_for_updates = false,
window_decorations = "RESIZE",
disable_default_key_bindings = true,
native_macos_fullscreen_mode = true,
-- debug_key_events = true,
window_padding = {
left = 8,
right = 8,
top = 8,
bottom = 8,
},
-- window_padding = {
-- left = 8,
-- right = 8,
-- top = 8,
-- bottom = 8,
-- },
enable_tab_bar = false,
-- use_fancy_tab_bar = false,
-- show_tabs_in_tab_bar = false,
-- show_new_tab_button_in_tab_bar = false,
use_fancy_tab_bar = true,
show_tabs_in_tab_bar = false,
show_new_tab_button_in_tab_bar = false,
window_frame = {
-- active_titlebar_bg = "#191c23",
-- inactive_titlebar_bg = "#191c23",
active_titlebar_bg = "#000000",
inactive_titlebar_bg = "#000000",
},
tab_max_width = 8,
colors = {
tab_bar = {
active_tab = {
Expand All @@ -78,28 +80,39 @@ return {
},
scrollback_lines = 3500,
keys = {
-- MacOS defaults
map(",", "CMD", a.SendString("vi ~/.config/wezterm/wezterm.lua\r")),
-- MacOS default
map("s", "CMD", send(ctrl_o, "w")),
map("w", "CMD", send(map("d", "CTRL"))),
map(",", "CMD", a.SendString("vi ~/.config/wezterm/wezterm.lua\r")),
map("z", "CMD", send(ctrl_a, "z")),
map("c", "CMD", a.CopyTo("Clipboard")),
map("v", "CMD", a.PasteFrom("Clipboard")),
map("m", "CMD", a.Hide),
map("h", "CMD", a.HideApplication),
-- map("h", "CMD|SHIFT", a.Hide)
map("n", "CMD", a.SpawnWindow),
map("f", "CMD|SHIFT", a.ToggleFullScreen),
map("=", "CMD", a.IncreaseFontSize),
map("-", "CMD", a.DecreaseFontSize),
map("0", "CMD", a.ResetFontSize),
map("Space", "CTRL|SHIFT", a.ActivateCommandPalette),

-- "Ctrl-A" for tmux
map("a", "CMD", send(ctrl_a)),

-- Split
-- map("d", "CMD", a.SplitVertical({ domain = "CurrentPaneDomain" })),
-- map("d", "CMD|SHIFT", a.SplitHorizontal({ domain = "CurrentPaneDomain" })),
map("d", "CMD", send(ctrl_w, "s")),
map("d", "CMD|SHIFT", send(ctrl_w, "S")),
-- Vim/tmux nav
map("h", "CMD|SHIFT", send(ctrl_w, "h")),
map("j", "CMD|SHIFT", send(ctrl_w, "j")),
map("k", "CMD|SHIFT", send(ctrl_w, "k")),
map("l", "CMD|SHIFT", send(ctrl_w, "l")),
-- "CtrlP"
map("p", "CMD", send(map("p", "CTRL"))),

-- "Ctrl-A" for tmux
map("a", "CMD", send(ctrl_a)),

-- Find/search
map("p", "CMD", send(map("p", "CTRL"))),
map("o", "CMD", send(ctrl_o, "f", "b")),
Expand All @@ -109,23 +122,13 @@ return {
-- Splits / windows
map("Enter", "CMD", send(ctrl_a, "z")),

-- Split
map("d", "CMD", send(ctrl_w, "s")),
map("d", "CMD|SHIFT", send(ctrl_w, "S")),

-- Rotate
map("r", "CMD", send(ctrl_a, "r")),
-- Mirror
map("y", "CMD", send(ctrl_a, "y")),
-- Tab
map("t", "CMD", send(ctrl_a, "n")),

-- Vim/tmux nav
map("h", "CMD|SHIFT", send(ctrl_w, "h")),
map("j", "CMD|SHIFT", send(ctrl_w, "j")),
map("k", "CMD|SHIFT", send(ctrl_w, "k")),
map("l", "CMD|SHIFT", send(ctrl_w, "l")),

-- Vim tab nav
map("]", "CMD", send(ctrl_o, "n")),
map("[", "CMD", send(ctrl_o, "p")),
Expand All @@ -142,4 +145,5 @@ return {
map("j", "CMD", send(ctrl_o, "j")),
map("k", "CMD", send(ctrl_o, "k")),
},
-- },
}
90 changes: 90 additions & 0 deletions .hammerspoon/Spoons/ReloadConfiguration.spoon/docs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
[
{
"Command": [],
"Constant": [],
"Constructor": [],
"Deprecated": [],
"Field": [],
"Function": [],
"Method": [
{
"def": "ReloadConfiguration:bindHotkeys(mapping)",
"desc": "Binds hotkeys for ReloadConfiguration",
"doc": "Binds hotkeys for ReloadConfiguration\n\nParameters:\n * mapping - A table containing hotkey modifier/key details for the following items:\n * reloadConfiguration - This will cause the configuration to be reloaded",
"name": "bindHotkeys",
"parameters": [
" * mapping - A table containing hotkey modifier/key details for the following items:",
" * reloadConfiguration - This will cause the configuration to be reloaded"
],
"signature": "ReloadConfiguration:bindHotkeys(mapping)",
"stripped_doc": "",
"type": "Method"
},
{
"def": "ReloadConfiguration:start()",
"desc": "Start ReloadConfiguration",
"doc": "Start ReloadConfiguration\n\nParameters:\n * None",
"name": "start",
"parameters": [
" * None"
],
"signature": "ReloadConfiguration:start()",
"stripped_doc": "",
"type": "Method"
}
],
"Variable": [
{
"def": "ReloadConfiguration.watch_paths",
"desc": "List of directories to watch for changes, defaults to hs.configdir",
"doc": "List of directories to watch for changes, defaults to hs.configdir",
"name": "watch_paths",
"signature": "ReloadConfiguration.watch_paths",
"stripped_doc": "",
"type": "Variable"
}
],
"desc": "Adds a hotkey to reload the hammerspoon configuration, and a pathwatcher to automatically reload on changes.",
"doc": "Adds a hotkey to reload the hammerspoon configuration, and a pathwatcher to automatically reload on changes.\n\nDownload: [https://github.com/Hammerspoon/Spoons/raw/master/Spoons/ReloadConfiguration.spoon.zip](https://github.com/Hammerspoon/Spoons/raw/master/Spoons/ReloadConfiguration.spoon.zip)",
"items": [
{
"def": "ReloadConfiguration:bindHotkeys(mapping)",
"desc": "Binds hotkeys for ReloadConfiguration",
"doc": "Binds hotkeys for ReloadConfiguration\n\nParameters:\n * mapping - A table containing hotkey modifier/key details for the following items:\n * reloadConfiguration - This will cause the configuration to be reloaded",
"name": "bindHotkeys",
"parameters": [
" * mapping - A table containing hotkey modifier/key details for the following items:",
" * reloadConfiguration - This will cause the configuration to be reloaded"
],
"signature": "ReloadConfiguration:bindHotkeys(mapping)",
"stripped_doc": "",
"type": "Method"
},
{
"def": "ReloadConfiguration:start()",
"desc": "Start ReloadConfiguration",
"doc": "Start ReloadConfiguration\n\nParameters:\n * None",
"name": "start",
"parameters": [
" * None"
],
"signature": "ReloadConfiguration:start()",
"stripped_doc": "",
"type": "Method"
},
{
"def": "ReloadConfiguration.watch_paths",
"desc": "List of directories to watch for changes, defaults to hs.configdir",
"doc": "List of directories to watch for changes, defaults to hs.configdir",
"name": "watch_paths",
"signature": "ReloadConfiguration.watch_paths",
"stripped_doc": "",
"type": "Variable"
}
],
"name": "ReloadConfiguration",
"stripped_doc": "\nDownload: [https://github.com/Hammerspoon/Spoons/raw/master/Spoons/ReloadConfiguration.spoon.zip](https://github.com/Hammerspoon/Spoons/raw/master/Spoons/ReloadConfiguration.spoon.zip)",
"submodules": [],
"type": "Module"
}
]
Loading

0 comments on commit da42a63

Please sign in to comment.