Skip to content

Commit

Permalink
More dotfile updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Primrose committed Nov 5, 2023
1 parent 39243a0 commit d0d1af7
Show file tree
Hide file tree
Showing 14 changed files with 289 additions and 70 deletions.
46 changes: 46 additions & 0 deletions WezTerm/wezterm.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
local wezterm = require("wezterm")

local act = wezterm.action
-- local mux = wezterm.mux

-- wezterm.on("gui-startup", function()
-- local tab, pane, window = mux.spawn_window()
-- window:gui_window():maximize()
-- end)

local config = {}

if wezterm.config_builder then
config = wezterm.config_builder()
end

config.color_scheme = "Tokyo Night"
config.default_cwd = "C:/Dev/repos"
config.default_prog = {
"C:/Program Files/PowerShell/7/pwsh.exe"
}
config.font = wezterm.font("FantasqueSansM Nerd Font Mono")

config.keys = {
{
key = "|",
mods = "CTRL|SHIFT",
action = act.PaneSelect({
mode = "Activate",
}),
},
}

config.inactive_pane_hsb = {
brightness = 0.7,
saturation = 0.8,
}

config.scrollback_lines = 5000

config.use_dead_keys = false

config.window_background_opacity = 0.92

return config

33 changes: 33 additions & 0 deletions home/AppData/Local/nvim/lua/plugins/aerial.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
return {
{
"stevearc/aerial.nvim",
config = function ()
local aerial = require("aerial")

aerial.setup({
layout = {
max_width = { 100, 0.2 },
width = 60
},

on_attach = function ()
local keymap = require("lua.config.utils").keymap

keymap("n", "<leader>af", ":AerialToggle float<CR>", { desc = "Aerial: Open floating Aerial" })
keymap("n", "<leader>al", ":AerialToggle left<CR>", { desc = "Aerial: Toggle left Aerial" })
keymap("n", "<leader>ar", ":AerialToggle right<CR>", { desc = "Aerial: Toggle right Aerial" })

keymap("n", "[", ":AerialPrev<CR>", { desc = "Aerial: " })
keymap("n", "]", ":AerialNext<CR>", { desc = "Aerial: " })
keymap("n", "<leader>ac", ":AerialCloseAll<CR>", { desc = "Aerial: Close all Aerial windows"})
end
})
end,
dependencies = {
"nvim-treesitter/nvim-treesitter",
"nvim-tree/nvim-web-devicons"
},
opts = {},
}
}

8 changes: 8 additions & 0 deletions home/AppData/Local/nvim/lua/plugins/autopairs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ return {
local autopairs = require("nvim-autopairs")

autopairs.setup({
check_comma = true,
check_ts = true, -- Enable treesitter
disable_filetype = {
"TelescopePrompt",
"spectre_panel",
},
fast_wrap = {
map = "<M-w>",
},
ts_config = {
java = false, -- Don't check treesitter in Java
javascript = { "template_string" }, -- Don't add pairs in Javascript template_string treesitter nodes
Expand Down
6 changes: 6 additions & 0 deletions home/AppData/Local/nvim/lua/plugins/git-gutter.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
return {
{
"airblade/vim-gitgutter",
},
}

15 changes: 6 additions & 9 deletions home/AppData/Local/nvim/lua/plugins/jdtls.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ return {
os.execute("mkdir " .. workspace_dir)

local cmd = {
"C:/TrustedApps/Java/jdk-20/bin/java",
"C:/EngTools/Java/jdk-20/bin/java",
"-Declipse.application=org.eclipse.jdt.ls.core.id1",
"-Dosgi.bundles.defaultStartLevel=4",
"-Declipse.product=org.eclipse.jdt.ls.core.product",
Expand All @@ -57,12 +57,8 @@ return {
runtimes = {
{
name = "JavaSE-1.8",
path = "C:/TrustedApps/Java/OpenJdk-8",
path = "C:/EngTools/Java/OpenJdk-8",
},
-- {
-- name = "JavaSE-20",
-- path = "C:/TrustedApps/Java/jdk-20",
-- },
},
updateBuildConfiguration = "interactive",
},
Expand All @@ -76,7 +72,7 @@ return {
url = "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml",
},
},
home = "C:/TrustedApps/Java/OpenJdk-8",
home = "C:/EngTools/Java/OpenJdk-8",
implementationsCodeLens = {
enabled = true,
},
Expand Down Expand Up @@ -168,7 +164,8 @@ return {
dap.continue()
end

keymap("n", "<leader>ad", ":lua Attach_To_Karaf()<CR>")
keymap("n", "<leader>ad", ":lua Attach_To_Karaf()<CR>", { desc = "DAP: Attach to karaf" })
keymap("n", "<leader>sd", ":lua require('dap').disconnect()<CR>", { desc = "DAP: Stop debugging" })

jdtls.start_or_attach({
capabilities = capabilities,
Expand All @@ -183,7 +180,7 @@ return {
on_attach = function(client, bufnr)
jdtls.setup_dap({ hotcodereplace = "auto" })
end,
root_dir = jdtls.setup.find_root({ ".git", "build.gradle", "gradlew", "mvnw", "pom.xml" }),
root_dir = vim.loop.fs_realpath(jdtls.setup.find_root({ ".git", "build.gradle", "gradlew", "mvnw", "pom.xml" })),
settings = settings,
})
end,
Expand Down
3 changes: 3 additions & 0 deletions home/AppData/Local/nvim/lua/plugins/lualine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ return {
"diff",
"diagnostics",
},
lualine_c = {
"aerial",
}
},
})
end,
Expand Down
7 changes: 7 additions & 0 deletions home/AppData/Local/nvim/lua/plugins/nvim-dressing.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
return {
{
"stevearc/dressing.nvim",
opts = {},
},
}

2 changes: 1 addition & 1 deletion home/AppData/Local/nvim/lua/plugins/nvim-spectre.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ return {
config = function ()
local keymap = require("lua.config.utils").keymap

keymap("n", "<leader>sp", ":Spectre<CR>", { desc = "Open Spectre" })
keymap("n", "<leader>sp", ":lua require('spectre').toggle()<CR>", { desc = "Toggle Spectre" })
end,
dependencies = {
"nvim-lua/plenary.nvim",
Expand Down
2 changes: 1 addition & 1 deletion home/AppData/Local/nvim/lua/plugins/nvim-tree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ return {
},
sort_by = "case_sensitive",
view = {
width = 30,
width = 60,
},
})

Expand Down
2 changes: 1 addition & 1 deletion home/AppData/Local/nvim/lua/plugins/sonarlint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ return {
},
server = {
cmd = {
"C:/TrustedApps/Java/jdk-20/bin/java",
"C:/EngTools/Java/jdk-20/bin/java",
"-jar",
vim.fn.stdpath("data") .. "/mason/packages/sonarlint-language-server/extension/server/sonarlint-ls.jar",
"-stdio",
Expand Down
15 changes: 13 additions & 2 deletions home/AppData/Local/nvim/lua/plugins/telescope.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ return {

},
extensions = {
aerial = {
show_nesting = {
["_"] = false,
json = true,
yaml = true,
}
},
file_browser = {
hijack_netrw = true,
mappings = {
Expand All @@ -42,9 +49,10 @@ return {
mappings = {
i = {
["<C-k>"] = lga_actions.quote_prompt(),
["<C-i>"] = lga_actions.quote_prompt({ postfix = " --iglob " }),
["<C-g>"] = lga_actions.quote_prompt({ postfix = " --glob "}),
["<C-t>"] = lga_actions.quote_prompt({ postfix = " -t " }),
}
}
},
}
},
})
Expand All @@ -54,10 +62,12 @@ return {
telescope.load_extension("fzf")
telescope.load_extension("lazygit")
telescope.load_extension("live_grep_args")
telescope.load_extension("aerial")

local keymap = require("lua.config.utils").keymap

keymap("n", "<leader>ex", ":Telescope file_browser path=%:p:h select_buffer=true<CR>", { desc = "Telescope: File Browser" })
keymap("n", "<leader>fa", ":Telescope aerial<CR>", { desc = "Telescope: Find Aerial" })
keymap("n", "<leader>fb", ":lua require('telescope').extensions.dap.list_breakpoints()<CR>", { desc = "Telescope: Find Breakpoints" })
keymap("n", "<leader>ff", ":Telescope find_files<CR>", { desc = "Telescope: Find Files" })
keymap("n", "<leader>fg", ":lua require('telescope').extensions.live_grep_args.live_grep_args()<CR>", { desc = "Telescope: Live Grep" })
Expand All @@ -72,6 +82,7 @@ return {
"nvim-telescope/telescope-dap.nvim",
"nvim-telescope/telescope-live-grep-args.nvim",
"nvim-tree/nvim-web-devicons",
"stevearc/aerial.nvim",
{
"nvim-telescope/telescope-fzf-native.nvim",
build = "make"
Expand Down
Loading

0 comments on commit d0d1af7

Please sign in to comment.