diff --git a/WezTerm/wezterm.lua b/WezTerm/wezterm.lua new file mode 100644 index 0000000..ef1c88b --- /dev/null +++ b/WezTerm/wezterm.lua @@ -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 + diff --git a/home/AppData/Local/nvim/lua/plugins/aerial.lua b/home/AppData/Local/nvim/lua/plugins/aerial.lua new file mode 100644 index 0000000..c6744d5 --- /dev/null +++ b/home/AppData/Local/nvim/lua/plugins/aerial.lua @@ -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", "af", ":AerialToggle float", { desc = "Aerial: Open floating Aerial" }) + keymap("n", "al", ":AerialToggle left", { desc = "Aerial: Toggle left Aerial" }) + keymap("n", "ar", ":AerialToggle right", { desc = "Aerial: Toggle right Aerial" }) + + keymap("n", "[", ":AerialPrev", { desc = "Aerial: " }) + keymap("n", "]", ":AerialNext", { desc = "Aerial: " }) + keymap("n", "ac", ":AerialCloseAll", { desc = "Aerial: Close all Aerial windows"}) + end + }) + end, + dependencies = { + "nvim-treesitter/nvim-treesitter", + "nvim-tree/nvim-web-devicons" + }, + opts = {}, + } +} + diff --git a/home/AppData/Local/nvim/lua/plugins/autopairs.lua b/home/AppData/Local/nvim/lua/plugins/autopairs.lua index bdd21ca..136f6bf 100644 --- a/home/AppData/Local/nvim/lua/plugins/autopairs.lua +++ b/home/AppData/Local/nvim/lua/plugins/autopairs.lua @@ -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 = "", + }, ts_config = { java = false, -- Don't check treesitter in Java javascript = { "template_string" }, -- Don't add pairs in Javascript template_string treesitter nodes diff --git a/home/AppData/Local/nvim/lua/plugins/git-gutter.lua b/home/AppData/Local/nvim/lua/plugins/git-gutter.lua new file mode 100644 index 0000000..bd7f79b --- /dev/null +++ b/home/AppData/Local/nvim/lua/plugins/git-gutter.lua @@ -0,0 +1,6 @@ +return { + { + "airblade/vim-gitgutter", + }, +} + diff --git a/home/AppData/Local/nvim/lua/plugins/jdtls.lua b/home/AppData/Local/nvim/lua/plugins/jdtls.lua index 18ea8d0..ed6ec42 100644 --- a/home/AppData/Local/nvim/lua/plugins/jdtls.lua +++ b/home/AppData/Local/nvim/lua/plugins/jdtls.lua @@ -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", @@ -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", }, @@ -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, }, @@ -168,7 +164,8 @@ return { dap.continue() end - keymap("n", "ad", ":lua Attach_To_Karaf()") + keymap("n", "ad", ":lua Attach_To_Karaf()", { desc = "DAP: Attach to karaf" }) + keymap("n", "sd", ":lua require('dap').disconnect()", { desc = "DAP: Stop debugging" }) jdtls.start_or_attach({ capabilities = capabilities, @@ -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, diff --git a/home/AppData/Local/nvim/lua/plugins/lualine.lua b/home/AppData/Local/nvim/lua/plugins/lualine.lua index 206186a..4d4ea64 100644 --- a/home/AppData/Local/nvim/lua/plugins/lualine.lua +++ b/home/AppData/Local/nvim/lua/plugins/lualine.lua @@ -18,6 +18,9 @@ return { "diff", "diagnostics", }, + lualine_c = { + "aerial", + } }, }) end, diff --git a/home/AppData/Local/nvim/lua/plugins/nvim-dressing.lua b/home/AppData/Local/nvim/lua/plugins/nvim-dressing.lua new file mode 100644 index 0000000..460b758 --- /dev/null +++ b/home/AppData/Local/nvim/lua/plugins/nvim-dressing.lua @@ -0,0 +1,7 @@ +return { + { + "stevearc/dressing.nvim", + opts = {}, + }, +} + diff --git a/home/AppData/Local/nvim/lua/plugins/nvim-spectre.lua b/home/AppData/Local/nvim/lua/plugins/nvim-spectre.lua index a0dd332..7cb6237 100644 --- a/home/AppData/Local/nvim/lua/plugins/nvim-spectre.lua +++ b/home/AppData/Local/nvim/lua/plugins/nvim-spectre.lua @@ -4,7 +4,7 @@ return { config = function () local keymap = require("lua.config.utils").keymap - keymap("n", "sp", ":Spectre", { desc = "Open Spectre" }) + keymap("n", "sp", ":lua require('spectre').toggle()", { desc = "Toggle Spectre" }) end, dependencies = { "nvim-lua/plenary.nvim", diff --git a/home/AppData/Local/nvim/lua/plugins/nvim-tree.lua b/home/AppData/Local/nvim/lua/plugins/nvim-tree.lua index 2e6694f..e5d6f55 100644 --- a/home/AppData/Local/nvim/lua/plugins/nvim-tree.lua +++ b/home/AppData/Local/nvim/lua/plugins/nvim-tree.lua @@ -15,7 +15,7 @@ return { }, sort_by = "case_sensitive", view = { - width = 30, + width = 60, }, }) diff --git a/home/AppData/Local/nvim/lua/plugins/sonarlint.lua b/home/AppData/Local/nvim/lua/plugins/sonarlint.lua index 2f3bac7..fb9ac17 100644 --- a/home/AppData/Local/nvim/lua/plugins/sonarlint.lua +++ b/home/AppData/Local/nvim/lua/plugins/sonarlint.lua @@ -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", diff --git a/home/AppData/Local/nvim/lua/plugins/telescope.lua b/home/AppData/Local/nvim/lua/plugins/telescope.lua index b8da52b..5bce8cd 100644 --- a/home/AppData/Local/nvim/lua/plugins/telescope.lua +++ b/home/AppData/Local/nvim/lua/plugins/telescope.lua @@ -25,6 +25,13 @@ return { }, extensions = { + aerial = { + show_nesting = { + ["_"] = false, + json = true, + yaml = true, + } + }, file_browser = { hijack_netrw = true, mappings = { @@ -42,9 +49,10 @@ return { mappings = { i = { [""] = lga_actions.quote_prompt(), - [""] = lga_actions.quote_prompt({ postfix = " --iglob " }), + [""] = lga_actions.quote_prompt({ postfix = " --glob "}), + [""] = lga_actions.quote_prompt({ postfix = " -t " }), } - } + }, } }, }) @@ -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", "ex", ":Telescope file_browser path=%:p:h select_buffer=true", { desc = "Telescope: File Browser" }) + keymap("n", "fa", ":Telescope aerial", { desc = "Telescope: Find Aerial" }) keymap("n", "fb", ":lua require('telescope').extensions.dap.list_breakpoints()", { desc = "Telescope: Find Breakpoints" }) keymap("n", "ff", ":Telescope find_files", { desc = "Telescope: Find Files" }) keymap("n", "fg", ":lua require('telescope').extensions.live_grep_args.live_grep_args()", { desc = "Telescope: Live Grep" }) @@ -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" diff --git a/home/AppData/Local/nvim/lua/plugins/treesitter.lua b/home/AppData/Local/nvim/lua/plugins/treesitter.lua index 2ffb4df..2bdcf0e 100644 --- a/home/AppData/Local/nvim/lua/plugins/treesitter.lua +++ b/home/AppData/Local/nvim/lua/plugins/treesitter.lua @@ -1,108 +1,179 @@ + + return { { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", config = function () local treesitter = require("nvim-treesitter.configs") + local keymap = require("lua.config.utils").keymap treesitter.setup({ + + -- Get rid of lsp warnings + ignore_install = {}, + modules = {}, + + --------------------------------------------------------------------------- + -- Install commands + + -- Automatically install missing parsers when entering buffers auto_install = true, - autotag = { - enable = true, - }, - context_commentstring = { - enable = true, - }, + + -- Ensure the following parsers are installed ensure_installed = { + "bash", "c", + "diff", "dockerfile", "go", "html", "java", "javascript", + "jsdoc", "json", + "jq", "lua", + "markdown", "markdown_inline", "python", + "query", + "regex", "tsx", "typescript", "vim", "vimdoc", "yaml", }, + + -- Install parsers synchronously + sync_install = false, + + --------------------------------------------------------------------------- + + + --------------------------------------------------------------------------- + -- Modules/Plugins + + -- Autopair plugin + autopairs = { + enable = true, + }, + + -- Autotag plugin + autotag = { + -- Enable autotagging + enable = true, + + -- Enable tag renamimg + enable_rename = true, + + -- Enable close + enable_close = true, + + -- Enable close on slash + enable_close_on_slash = true, + + -- Setup for the following filetypes + filetypes = { + "html", + "javascript", + "javascriptreact", + "jsx", + "markdown", + "tsx", + "typescript", + "typescriptreact", + "xml", + } + }, + + -- The highlight module highlight = { - additional_vim_regex_highlighting = true, - disable = { - "", - }, - enable = true + -- Setting this to true will run `:h syntax` and tree-sitter at the same time. + -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). + -- Using this option may slow down your editor, and you may see some duplicate highlights. + -- Instead of true it can also be a list of languages + additional_vim_regex_highlighting = false, + + -- Disable highlighting for... + disable = {}, + + -- Enable the highlight module + enable = true, }, - ignore_install = {}, + + -- The incremental selection module incremental_selection = { + -- Enable incremental selection enable = true, + + -- Setup keymaps keymaps = { - init_selection = "", - node_decremental = "", - node_incremental = "", - scope_incremental = "", + init_selection = "", + node_incremental = "", + scope_incremental = "gsi", + node_decremental = "", }, }, + + -- The indent plugin indent = { + -- Enable the indent plugin + enable = true, + + -- Disable the indent plugin for the following types disable = { "yaml", }, - enable = true, - }, - modules = {}, - move = { - enable = true, - goto_next_end = { - ["]c"] = "@class.outer", - ["]f"] = "@function.outer", - }, - goto_next_start = { - ["]C"] = "@class.outer", - ["]F"] = "@function.outer", - }, - goto_previous_end = { - ["[c"] = "@class.outer", - ["[f"] = "@function.outer", - }, - goto_previous_start = { - ["[C"] = "@class.outer", - ["[F"] = "@function.outer", - }, - set_jumps = true, }, - swap = { + + -- The rainbow plugin + rainbow = { + -- Enable the rainbow plugin enable = true, - swap_next = { - ["}s"] = "@parameter.inner", - }, - swap_previous = { - ["{s"] = "@parameter.inner", - }, + + -- Also highlight non-bracket delimiters like html tags + extended_mode = true, + + -- Do not enable for files with more than n lines + max_file_lines = 2000, }, - sync_install = false, + + -- The textobjects plugin textobjects = { select = { + -- Enable textobjects plugin enable = true, keymaps = { - ["ci"] = "@class.inner", - ["co"] = "@class.outer", - ["fi"] = "@function.inner", - ["fo"] = "@function.outer", - ["pi"] = "@parameter.inner", - ["po"] = "@parameter.outer", + ["ai"] = { query = "@assignment.inner", desc = "Treesitter: Select inner assignment" }, + ["ao"] = { query = "@assignment.outer", desc = "Treesitter: Select outer assignment" }, + ["bi"] = { query = "@block.inner", desc = "Treesitter: Select inner block" }, + ["bo"] = { query = "@block.outer", desc = "Treesitter: Select outer block" }, + ["ci"] = { query = "@class.inner", desc = "Treesitter: Select inner class" }, + ["co"] = { query = "@class.outer", desc = "Treesitter: Select outer class" }, + ["fi"] = { query = "@function.inner", desc = "Treesitter: Select inner function" }, + ["fo"] = { query = "@function.outer", desc = "Treesitter: Select outer function" }, + ["li"] = { query = "@loop.inner", desc = "Treesitter: Select inner loop" }, + ["lo"] = { query = "@loop.outer", desc = "Treesitter: Select outer loop" }, + ["pi"] = { query = "@parameter.inner", desc = "Treesitter: Select inner parameter" }, + ["po"] = { query = "@parameter.outer", desc = "Treesitter: Select outer parameter" }, }, lookahead = true, }, }, + + --------------------------------------------------------------------------- }) + + -- Add some keymaps + keymap("n", "ic", ":Inspect", { desc = "Treesitter: Inspect highlight group under cursor" }) + keymap("n", "it", ":InspectTree", { desc = "Treesitter: Inspect Tree" }) end, dependencies = { "JoosepAlviste/nvim-ts-context-commentstring", "nvim-treesitter/nvim-treesitter-textobjects", + "p00f/nvim-ts-rainbow", "windwp/nvim-ts-autotag", }, event = { diff --git a/home/AppData/Local/nvim/lua/plugins/typescript-tools.lua b/home/AppData/Local/nvim/lua/plugins/typescript-tools.lua new file mode 100644 index 0000000..cacb974 --- /dev/null +++ b/home/AppData/Local/nvim/lua/plugins/typescript-tools.lua @@ -0,0 +1,23 @@ +return { + { + "pmizio/typescript-tools.nvim", + config = function () + local keymap = require("lua.config.utils").keymap + + require("typescript-tools").setup({ + on_attach = function(_, bufnr) + keymap("n", "ca", ":lua vim.lsp.buf.code_action()", { buffer = bufnr, desc = "LSP: Code Action" }) + keymap("n", "oi", ":TSToolsOrganizeImports", { buffer = bufnr, desc = "LSP: Organize Imports" }) + end, + settings = { + expose_as_code_action = "all", + } + }) + end, + dependencies = { + "neovim/nvim-lspconfig", + "nvim-lua/plenary.nvim", + }, + opts = {}, + } +} diff --git a/home/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1 b/home/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1 index 66763f1..ce14a33 100644 --- a/home/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1 +++ b/home/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1 @@ -1,13 +1,27 @@ -Remove-Item alias:curl -Set-Alias wcurl Invoke-WebRequest +# Remove-Item alias:curl +# Set-Alias wcurl Invoke-WebRequest +#PoshGit Import-Module posh-git + +#Terminal Icons Import-Module -Name Terminal-Icons + +#Z Import-Module -Name z -Import-Module -Name PSReadLine +#PSReadLine +Import-Module PSReadLine +Set-PSReadLineOption -PredictionSource HistoryAndPlugin +Set-PSReadLineOption -PredictionViewStyle ListView +Set-PSReadLineOption -EditMode Windows + +#PowerType +Enable-PowerType + +#PsFzf Import-Module PSFzf -Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+f' -PSReadlineChordReverseHistory 'Ctrl+r' +Set-PsFzfOption -PSReadLineChordProvider "Ctrl+f" -PSReadLineChordReverseHistory "Ctrl+r" function which ($command) { Get-Command -Name $command -ErrorAction SilentlyContinue |